/* saudade.now — zero-chrome, zero-brand raw surface system */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ground: #FFFFFF;
  --ink: #111111;
  --struck: #8E8E8E;
  --whisper: #111111;
  --whisper-dim: rgba(17, 17, 17, 0.56);
  --hair: rgba(17, 17, 17, 0.16);
  --serif: "Times New Roman", Times, Georgia, serif;
  --mono: "Courier New", Courier, monospace;
  --sub: Arial, Helvetica, sans-serif;
}

body.is-night[data-world="tachado"],
body.is-night[data-world="rooms"],
body.is-night[data-world="langs"],
body.is-night[data-world="composer"] {
  --ground: #000000;
  --ink: #EDEDED;
  --struck: #6E6E6E;
  --whisper: rgba(237, 237, 237, 0.88);
  --whisper-dim: rgba(237, 237, 237, 0.56);
  --hair: rgba(237, 237, 237, 0.18);
}

body[data-world="aqui"] {
  --ground: #F1EEE6;
  --ink: #3B3B3D;
  --struck: #7A7A7D;
  --whisper: #3B3B3D;
  --whisper-dim: rgba(59, 59, 61, 0.62);
  --hair: rgba(59, 59, 61, 0.22);
}

body[data-world="copia"] {
  --ground: #141414;
  --ink: #141414;
  --struck: #141414;
  --whisper: rgba(244, 243, 238, 0.88);
  --whisper-dim: rgba(244, 243, 238, 0.58);
  --hair: rgba(20, 20, 20, 0.25);
}

body[data-world="vaho"],
body[data-world="photo"] {
  --ground: #0B0A09;
  --ink: #FFFFFF;
  --struck: rgba(255, 255, 255, 0.55);
  --whisper: rgba(255, 255, 255, 0.9);
  --whisper-dim: rgba(255, 255, 255, 0.62);
  --hair: rgba(255, 255, 255, 0.2);
}

body[data-world="cajon"] {
  --ground: #0A0A09;
  --ink: #E8E5DE;
  --struck: #6E6A63;
  --whisper: rgba(232, 229, 222, 0.88);
  --whisper-dim: rgba(232, 229, 222, 0.54);
  --hair: rgba(232, 229, 222, 0.14);
}

body[data-world="recibo"] {
  --ground: #121211;
  --ink: #191918;
  --struck: #6D6C68;
  --whisper: rgba(244, 243, 238, 0.88);
  --whisper-dim: rgba(244, 243, 238, 0.56);
  --hair: rgba(25, 25, 24, 0.24);
}

html, body {
  width: 100%;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.stage {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-x: hidden;
}

.stage.is-cutting > .surface {
  visibility: hidden;
}

.surface {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  width: 100%;
}

/* ---------- 1. TACHADO ---------- */
.view-tachado {
  padding: 112px 28px 40px;
  font-size: 22px;
  line-height: 1.32;
  max-width: 24em;
}
@media (min-width: 860px) {
  .view-tachado {
    padding: 148px 132px 48px;
    font-size: 28px;
    max-width: 28em;
  }
}
.view-tachado p {
  margin: 0;
  white-space: pre-line;
}
.view-tachado .to-line {
  font-style: italic;
  color: var(--struck);
  margin-bottom: 0.9em;
  font-size: 0.82em;
}
.view-tachado .struck-line {
  color: var(--ink);
  text-decoration: none;
  display: block;
  min-height: 1.32em;
}
.view-tachado .struck-line.is-struck {
  color: var(--struck);
  text-decoration: line-through;
  text-decoration-thickness: 1.4px;
}
.view-tachado .live-line {
  display: block;
  margin-top: 0.08em;
}
.view-tachado .note-meta {
  margin-top: 1.5em;
  font-size: 0.68em;
  color: var(--struck);
}
.caret {
  display: inline-block;
  width: 2px;
  height: 0.94em;
  background: currentColor;
  vertical-align: -0.12em;
  margin-left: 2px;
  animation: caret-blink 1060ms steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* ---------- 2. AQUÍ ---------- */
.view-aqui {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: min(26dvh, 210px) 28px 48px;
}
@media (min-width: 860px) {
  .view-aqui { padding: min(28dvh, 230px) 64px 48px; }
}
.aqui-hit {
  position: relative;
  width: 100%;
  cursor: crosshair;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.aqui-svg {
  width: 100%;
  height: 86px;
  display: block;
  overflow: visible;
}
.aqui-stroke-path {
  opacity: 0.78;
}
.aqui-tick-line {
  opacity: 1;
}
.aqui-readout {
  margin-top: 6px;
  font-size: 16px;
  font-style: italic;
  color: var(--ink);
}
.aqui-live {
  margin-top: 22px;
  font-size: 21px;
  line-height: 1.38;
  color: var(--ink);
  max-width: 24em;
  white-space: pre-line;
}
@media (min-width: 860px) {
  .aqui-live { font-size: 25px; }
}
.aqui-ask {
  margin-top: 22px;
  font-size: 18px;
}
.plain-link {
  background: none;
  border: none;
  padding: 10px 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.2px;
  cursor: pointer;
  display: inline-block;
}

/* ---------- 3. COPIA DE COPIA ---------- */
.view-copia-wrap {
  min-height: calc(100dvh - 84px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px 18px;
  overflow: hidden;
}
.copia-sheet {
  position: relative;
  width: min(100%, 540px);
  min-height: min(76dvh, 660px);
  background: #F4F3EE;
  color: #141414;
  transform: rotate(-1.3deg);
  padding: 84px 36px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.62;
  overflow: hidden;
}
@media (min-width: 860px) {
  .copia-sheet {
    padding: 96px 52px 54px;
    font-size: 21px;
  }
}
.copia-body p { margin-bottom: 1.4em; white-space: pre-line; }
.copia-meta { font-size: 0.72em; letter-spacing: 0.02em; }
.copia-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 18px;
  background: rgba(255, 255, 255, 0.78);
  top: -24px;
  pointer-events: none;
}
.copia-bar.is-sweeping {
  animation: copier-sweep 1100ms linear 1 forwards;
}
@keyframes copier-sweep {
  from { top: -24px; }
  to { top: 105%; }
}

/* ---------- 4. VAHO ---------- */
.view-vaho {
  position: relative;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px 110px;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
.vaho-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
  z-index: 0;
  pointer-events: none;
}
@media (min-width: 860px) {
  .vaho-bg {
    max-width: 540px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.78;
  }
}
.vaho-fog {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 440px;
  opacity: 1;
  transition: opacity 9000ms linear;
}
.vaho-fog.is-fading { opacity: 0.05; }
.vaho-fog.is-breathing {
  transition: opacity 600ms linear;
  opacity: 1;
}
.vaho-word {
  font-size: clamp(32px, 8vw, 48px);
  line-height: 1.2;
  color: #E2E7E8;
  letter-spacing: 0.01em;
  white-space: pre-line;
  text-shadow: 0 0 12px rgba(185, 192, 194, 0.35);
}
.vaho-under {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  font-size: 16px;
  font-style: italic;
  color: #B9C0C2;
  text-align: center;
}

/* ---------- 5. PHOTO / SUBTITLE ---------- */
.view-photo {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0B0A09;
}
.view-photo img {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (min-width: 860px) {
  .view-photo img {
    height: 92dvh;
    width: auto;
    max-width: 92vw;
    top: 50%;
    left: 50%;
    inset: auto;
    transform: translate(-50%, -50%);
    object-fit: contain;
  }
}
.photo-caption {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 21dvh;
  width: min(88vw, 640px);
  font: 400 18px/1.32 var(--sub);
  color: #FFFFFF;
  text-align: center;
  white-space: pre-line;
  text-shadow: 0 0 3px #000000, 0 1px 4px #000000, 0 2px 12px rgba(0, 0, 0, 0.92);
  z-index: 3;
  opacity: 0;
  animation: sub-cut 1ms steps(1) 650ms forwards;
}
@media (min-width: 860px) {
  .photo-caption {
    bottom: 13dvh;
    font-size: 22px;
  }
}
@keyframes sub-cut { to { opacity: 1; } }

/* ---------- 6. EL CAJÓN (3 RESTOS — MUSE) ---------- */
.view-cajon {
  max-width: 500px;
  margin: 0 auto;
  padding: 52px 26px 40px;
  display: flex;
  flex-direction: column;
  gap: 38px;
}
.cajon-photo-wrap {
  width: 78%;
  margin-left: 5%;
  transform: rotate(-1.4deg);
}
.cajon-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #141311;
}
.cajon-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 62%;
  display: block;
}
.cajon-cap {
  margin-top: 8px;
  font-size: 14px;
  font-style: italic;
  color: #848078;
}
.cajon-voice-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: none;
  color: inherit;
  width: 100%;
  padding: 8px 0;
  cursor: pointer;
  text-align: left;
}
.cajon-voice-time {
  font-family: var(--mono);
  font-size: 13px;
  color: #848078;
  min-width: 38px;
}
.cajon-voice-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #5C5952;
  margin-top: 4px;
}
.cajon-native {
  margin-top: 12px;
  font-size: 20px;
  line-height: 1.38;
  color: #E8E5DE;
}
.cajon-attempt {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.4;
  font-style: italic;
  color: #8A867D;
}
.cajon-residue s {
  display: block;
  color: #5C5952;
  font-size: 18px;
  line-height: 1.38;
}
.cajon-residue p {
  font-size: 20px;
  line-height: 1.4;
  margin-top: 4px;
}

/* ---------- 7. RECIBO (SENT NOTE VARIANT) ---------- */
.view-recibo-wrap {
  min-height: calc(100dvh - 84px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}
.recibo-strip {
  width: min(100%, 340px);
  background: #ECEBE6;
  color: #1B1B1A;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
  padding: 36px 26px 40px;
  transform: rotate(0.9deg);
}
.recibo-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.recibo-dash {
  margin: 14px 0;
  border-top: 1px dashed #3F3E3B;
}
.recibo-note {
  white-space: pre-line;
  margin-top: 8px;
}

/* ---------- 8. BACK ROOMS ---------- */
.view-rooms {
  padding: 112px 28px 40px;
  max-width: 24em;
  font-size: 22px;
  line-height: 1.45;
}
@media (min-width: 860px) {
  .view-rooms {
    padding: 148px 132px 48px;
    font-size: 27px;
  }
}
.rooms-intro {
  color: var(--struck);
  margin-bottom: 1.2em;
}
.rooms-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45em;
}
.rooms-list a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1.2px;
  padding: 6px 0;
  display: inline-block;
}

/* ---------- 9. COMPOSER (SAME PAGE CLEARS, ZERO MODAL) ---------- */
.view-composer {
  padding: 72px 28px 64px;
  max-width: 580px;
}
@media (min-width: 860px) {
  .view-composer {
    padding: 96px 132px 64px;
    max-width: 780px;
  }
}
.comp-intro {
  font-size: 22px;
  line-height: 1.32;
  margin-bottom: 28px;
}
@media (min-width: 860px) {
  .comp-intro { font-size: 26px; }
}
.comp-intro s { color: var(--struck); display: block; }
.comp-twin-hint {
  font-size: 15px;
  font-style: italic;
  color: var(--struck);
  margin-bottom: 20px;
}
.comp-field {
  margin-bottom: 20px;
}
.comp-label {
  display: block;
  font-size: 15px;
  color: var(--struck);
  margin-bottom: 4px;
}
.comp-input, .comp-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hair);
  color: var(--ink);
  font: 400 20px/1.38 var(--serif);
  padding: 8px 0;
  outline: none;
  resize: none;
}
.comp-input:focus, .comp-textarea:focus {
  border-bottom-color: var(--ink);
}
.comp-input::placeholder, .comp-textarea::placeholder {
  color: var(--struck);
  opacity: 0.65;
  font-style: italic;
}
.comp-struck-live {
  margin-top: 6px;
  min-height: 22px;
  font-size: 17px;
  color: var(--struck);
  text-decoration: line-through;
}
.comp-surfaces {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 8px;
  font-size: 16px;
  color: var(--struck);
}
.comp-surfaces button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 8px 0;
}
.comp-surfaces button.is-active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.comp-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 24px;
  font-size: 20px;
}
.comp-status {
  margin-top: 16px;
  font-size: 16px;
  color: var(--ink);
  min-height: 22px;
}
.comp-link-out {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--struck);
  word-break: break-all;
}
.comp-honesty {
  margin-top: 28px;
  font-size: 14px;
  font-style: italic;
  color: var(--struck);
}

/* ---------- 10. RECIPIENT ACTIONS ---------- */
.rec-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: baseline;
  font-size: 19px;
}
.rec-actions a, .rec-actions button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.2px;
  cursor: pointer;
  padding: 10px 0;
}
.rec-sublinks {
  margin-top: 6px;
  display: flex;
  gap: 18px;
  font-size: 14.5px;
  color: var(--struck);
}
.rec-sublinks a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 8px 0;
}

/* ---------- 11. THE WHISPER (ONLY CHROME ON SITE) ---------- */
.whisper {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 14px 28px calc(env(safe-area-inset-bottom, 0px) + 18px);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 16px;
  color: var(--whisper);
}
@media (min-width: 860px) {
  .whisper {
    padding: 18px 132px 32px;
    font-size: 17px;
  }
}
body[data-world="photo"] .whisper,
body[data-world="vaho"] .whisper {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(11, 10, 9, 0.78), rgba(11, 10, 9, 0));
}
.whisper.is-hidden {
  visibility: hidden;
  pointer-events: none;
}
.whisper-left, .whisper-right {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 18px;
}
.whisper button, .whisper a, .whisper span.w-dim {
  background: none;
  border: none;
  font: inherit;
  font-size: 14.5px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: 10px 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.whisper span.w-dim { cursor: default; }
.whisper .w-primary {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1.2px;
}
.whisper .w-dim {
  color: var(--whisper-dim);
}
.whisper .w-langs {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--whisper-dim);
}
.whisper .w-langs button.is-current {
  color: var(--whisper);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.whisper .w-dot {
  opacity: 0.4;
  user-select: none;
}
.w-lang-tray {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 4px;
  color: var(--whisper-dim);
}
.w-lang-tray button {
  padding: 6px 0;
  min-height: 36px;
  font-size: 14.5px;
}
.w-lang-tray button.is-current {
  color: var(--whisper);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.cajon-switch-tongue {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- 12. DEDICATED RAW 15-TONGUE INDEX ---------- */
.view-langs {
  padding: 76px 28px 56px;
  max-width: 680px;
}
@media (min-width: 860px) {
  .view-langs {
    padding: 108px 132px 64px;
    max-width: 920px;
  }
}
.langs-intro {
  font-size: 20px;
  line-height: 1.38;
  font-style: italic;
  color: var(--struck);
  margin-bottom: 28px;
}
@media (min-width: 860px) {
  .langs-intro { font-size: 23px; margin-bottom: 36px; }
}
.langs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.langs-list li {
  border-top: 1px solid var(--hair);
}
.langs-list li:last-child {
  border-bottom: 1px solid var(--hair);
}
.lang-row-btn {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  padding: 15px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.lang-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 19px;
}
.langs-list li.is-current .lang-row-name {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1.3px;
}
.lang-row-mark {
  font-size: 13.5px;
  font-style: italic;
  color: var(--struck);
}
.lang-row-line {
  font-size: 15.5px;
  line-height: 1.38;
  color: var(--struck);
}
.lang-row-btn:hover .lang-row-line,
.lang-row-btn:focus-visible .lang-row-line {
  color: var(--ink);
}
.whisper .w-all-langs {
  color: var(--whisper);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  .aqui-stroke-path.is-drawing { animation: none; stroke-dashoffset: 0; }
  .aqui-tick-line.is-delayed { animation: none; opacity: 1; }
  .copia-bar.is-sweeping { animation: none; display: none; }
  .photo-caption { animation: none; opacity: 1; }
  .vaho-fog { transition: none; }
}
