:root {
  --accent: #6f91a8;
  --accent-rgb: 111, 145, 168;
  --bg: #07090b;
  --bg-soft: #0c1116;
  --text: #ece9e1;
  --muted: #a7abb0;
  --hairline: rgba(255, 255, 255, 0.14);
  --panel: rgba(15, 18, 21, 0.78);
  --wave-1: #101c23;
  --wave-2: #13252e;
  --wave-3: #17303b;
  --wave-4: #1b3945;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

.app,
.app * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.app ::selection {
  color: inherit;
  background: transparent;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  transition: background-color 800ms ease, color 800ms ease;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app {
  isolation: isolate;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  background:
    radial-gradient(ellipse 58% 48% at 48% 38%, rgba(var(--accent-rgb), 0.09), transparent 65%),
    linear-gradient(160deg, var(--bg-soft), var(--bg) 52%, var(--bg-soft));
  transition: background 900ms ease;
}

.backdrop,
.vignette,
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  z-index: -1;
  overflow: hidden;
}

.halo {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.16), transparent 70%);
  transition: background 900ms ease;
}

.halo-main {
  width: 38vw;
  height: 38vw;
  left: 21vw;
  top: 5vh;
  animation: drift-main 12s ease-in-out infinite alternate;
}

.halo-side {
  width: 24vw;
  height: 24vw;
  right: -4vw;
  top: 24vh;
  opacity: 0.65;
  animation: drift-side 15s ease-in-out infinite alternate;
}

.moon {
  position: absolute;
  width: clamp(160px, 18vw, 310px);
  aspect-ratio: 1;
  left: 50%;
  top: 43%;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 42% 42%, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-rgb), 0.018) 55%, transparent 73%);
  box-shadow: 0 0 90px rgba(var(--accent-rgb), 0.08);
  transition: all 900ms ease;
}

.landscape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 1;
  transition: opacity 1.2s ease;
}

.gufeng-motif-layer,
.modern-ambient-echo-layer,
.gufeng-night-layer,
.gufeng-silk-texture,
.modern-contour-layer,
.time-atmosphere {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gufeng-motif-layer,
.modern-ambient-echo-layer,
.gufeng-night-layer {
  overflow: visible;
  opacity: 0;
  color: rgba(164, 160, 137, 0.2);
  transform-box: fill-box;
  transform-origin: center;
  transition:
    color 900ms ease,
    opacity 1.2s ease,
    translate 1.2s ease,
    scale 1.2s ease,
    rotate 1.2s ease;
}

.modern-ambient-echo-layer {
  color: rgba(var(--accent-rgb), 0.25);
}

html[data-scene="landscape"] .gufeng-motif-layer.has-motif {
  opacity: 0.72;
}

html[data-scene="landscape"][data-gufeng-landform="off"] .landscape {
  opacity: 0;
}

html[data-scene="landscape"][data-gufeng-motif="cloud"] .gufeng-motif-layer {
  color: rgba(142, 144, 133, 0.24);
  opacity: 0.82;
  animation: gufeng-cloud-drift 42s ease-in-out infinite alternate;
}

html[data-scene="landscape"][data-gufeng-motif="apsara"] .gufeng-motif-layer {
  color: rgba(180, 154, 108, 0.22);
  opacity: 0.7;
  animation: gufeng-apsara-drift 38s ease-in-out infinite alternate;
}

html[data-scene="landscape"][data-gufeng-motif="caisson"] .gufeng-motif-layer {
  color: rgba(166, 139, 91, 0.24);
  opacity: 0.58;
}

html[data-scene="landscape"][data-gufeng-motif="floral"] .gufeng-motif-layer {
  color: rgba(154, 123, 102, 0.2);
  opacity: 0.62;
  animation: gufeng-ornament-breathe 40s ease-in-out infinite alternate;
}

html[data-scene="landscape"][data-gufeng-motif="lattice"] .gufeng-motif-layer {
  color: rgba(137, 146, 137, 0.22);
  opacity: 0.64;
}

html[data-scene="landscape"][data-gufeng-motif="branches"] .gufeng-motif-layer {
  color: rgba(107, 121, 108, 0.27);
  opacity: 0.74;
}

html[data-scene="landscape"][data-gufeng-motif="seasonal"] .gufeng-motif-layer {
  color: rgba(132, 143, 140, 0.26);
  opacity: 0.7;
  animation: gufeng-bird-drift 46s ease-in-out infinite alternate;
}

html[data-scene="landscape"][data-gufeng-motif="tile"] .gufeng-motif-layer {
  color: rgba(151, 123, 78, 0.23);
  opacity: 0.72;
}

.gufeng-night-layer {
  --night-ornament-x: 0%;
  --night-ornament-y: 0%;
  --night-ornament-scale: 1;
  --night-ornament-rotate: 0deg;
  color: rgba(155, 172, 192, 0.55);
  translate: var(--night-ornament-x) var(--night-ornament-y);
  scale: var(--night-ornament-scale);
  rotate: var(--night-ornament-rotate);
}

html[data-night-ornament="off"] .gufeng-night-layer {
  display: none;
}

html[data-scene="landscape"][data-time="night"] .gufeng-night-layer {
  opacity: 0.5;
}

.gufeng-silk-texture {
  z-index: 0;
  opacity: 0;
  background:
    repeating-linear-gradient(4deg, rgba(191, 178, 146, 0.035) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(92deg, rgba(198, 184, 151, 0.028) 0 1px, transparent 1px 7px),
    radial-gradient(ellipse at 24% 32%, rgba(180, 159, 118, 0.075), transparent 44%);
  mix-blend-mode: soft-light;
  transition: opacity 1.2s ease;
}

.modern-contour-layer {
  overflow: visible;
  color: rgba(var(--accent-rgb), 0.52);
  opacity: 0;
  transition: color 900ms ease, opacity 1.2s ease;
}

.modern-contour-fill {
  fill: currentColor;
  fill-opacity: 0.1;
}

.modern-contour-line {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.34;
  stroke-width: 1.4;
}

.modern-contour-line.secondary {
  stroke-opacity: 0.2;
  stroke-width: 1;
}

html[data-scene="landscape"][data-gufeng-motif="silk"] .gufeng-silk-texture {
  opacity: 0.78;
}

.time-atmosphere {
  inset: -8%;
  width: 116%;
  height: 116%;
  opacity: 0.8;
  transition: background 1.6s ease, opacity 1.2s ease;
}

html[data-time="dawn"] .time-atmosphere {
  background:
    radial-gradient(ellipse at 18% 73%, rgba(186, 111, 73, 0.15), transparent 44%),
    radial-gradient(ellipse at 82% 10%, rgba(111, 139, 153, 0.1), transparent 38%);
}

html[data-time="day"] .time-atmosphere {
  background:
    radial-gradient(ellipse at 74% 12%, rgba(173, 197, 199, 0.1), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 55%);
}

html[data-time="dusk"] .time-atmosphere {
  background:
    radial-gradient(ellipse at 18% 78%, rgba(181, 101, 63, 0.17), transparent 48%),
    radial-gradient(ellipse at 84% 18%, rgba(70, 80, 116, 0.12), transparent 44%);
}

html[data-time="night"] .time-atmosphere {
  background:
    radial-gradient(ellipse at 80% 10%, rgba(61, 80, 122, 0.18), transparent 46%),
    linear-gradient(155deg, rgba(24, 34, 60, 0.08), transparent 62%);
  opacity: 0.68;
}

html[data-time="neutral"] .time-atmosphere {
  opacity: 0;
}

html[data-appearance="light"] .gufeng-motif-layer {
  color: rgba(74, 82, 75, 0.19);
}

html[data-appearance="light"][data-gufeng-motif="apsara"] .gufeng-motif-layer,
html[data-appearance="light"][data-gufeng-motif="caisson"] .gufeng-motif-layer,
html[data-appearance="light"][data-gufeng-motif="floral"] .gufeng-motif-layer,
html[data-appearance="light"][data-gufeng-motif="tile"] .gufeng-motif-layer {
  color: rgba(126, 96, 59, 0.2);
}

html[data-appearance="light"][data-gufeng-motif="branches"] .gufeng-motif-layer {
  color: rgba(70, 87, 73, 0.21);
}

html[data-appearance="light"][data-gufeng-motif="seasonal"] .gufeng-motif-layer {
  color: rgba(70, 84, 82, 0.21);
}

html[data-appearance="light"] .gufeng-night-layer {
  color: rgba(78, 98, 123, 0.4);
}

html[data-appearance="light"][data-scene="landscape"][data-gufeng-motif="silk"] .gufeng-silk-texture {
  opacity: 0.58;
  mix-blend-mode: multiply;
}

.ridge {
  transform-origin: 50% 100%;
  transition: fill 900ms ease;
}

.ridge-far {
  fill: var(--wave-1);
  opacity: 0.72;
  animation: breathe-far 11s ease-in-out infinite alternate;
}

.ridge-mid {
  fill: var(--wave-2);
  opacity: 0.78;
  animation: breathe-mid 13s ease-in-out infinite alternate;
}

.ridge-near {
  fill: var(--wave-3);
  opacity: 0.86;
  animation: breathe-near 15s ease-in-out infinite alternate;
}

.ridge-front {
  fill: var(--wave-4);
  opacity: 0.9;
  animation: breathe-front 17s ease-in-out infinite alternate;
}

.mist {
  position: absolute;
  left: -20%;
  width: 140%;
  height: 14vh;
  min-height: 80px;
  border-radius: 50%;
  filter: blur(28px);
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.09), transparent 76%);
  transition: background 900ms ease;
}

.mist-one {
  top: 61%;
  animation: mist 12s ease-in-out infinite alternate;
}

.mist-two {
  top: 73%;
  opacity: 0.55;
  animation: mist 15s ease-in-out infinite alternate-reverse;
}

.grain {
  opacity: 0.1;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.72'/%3E%3C/svg%3E");
}

.vignette {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.44) 116%);
}

.bottombar {
  position: absolute;
  right: auto;
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
}

.bottombar {
  bottom: 18px;
}

.poem-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 8vh 10vw 14vh;
}

.poem-card {
  isolation: isolate;
  position: relative;
  width: min(900px, 70vw);
  transform: translateY(-3vh);
  text-align: center;
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modern-etching-layer,
.modern-silk-texture {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.modern-etching-layer {
  color: rgba(255, 255, 255, 0.28);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition:
    color 900ms ease,
    opacity 1.2s ease,
    translate 1.2s ease,
    scale 1.2s ease,
    rotate 1.2s ease;
}

.modern-silk-texture {
  opacity: 0;
  background:
    repeating-linear-gradient(5deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(94deg, rgba(var(--accent-rgb), 0.035) 0 1px, transparent 1px 8px),
    radial-gradient(ellipse at 22% 30%, rgba(255, 255, 255, 0.08), transparent 46%);
  mix-blend-mode: soft-light;
  transition: opacity 1.2s ease;
}

.poem-card > .poem,
.poem-card > .poem-meta,
.poem-card > .poem-footer > .poem-clock {
  position: relative;
  z-index: 2;
}

.poem-card .brand-signature {
  z-index: 2;
}

html:not(.poem-ready) .poem-card {
  opacity: 0;
}

.poem-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: clamp(20px, 2.8vh, 30px);
  color: var(--text);
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  transition: color 900ms ease, opacity 300ms ease;
}

.poem-clock time {
  font-size: clamp(0.9rem, 1.15vw, 1.08rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.78;
}

.poem-clock span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0.9;
}

.brand-signature {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #c94d46;
  opacity: 0.37;
  transition: color 800ms ease, opacity 220ms ease, transform 220ms ease;
}

.brand-signature svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.brand-ridge,
.brand-water {
  fill: currentColor;
}

.brand-dot {
  fill: #7f2930;
}

.poem-card:hover .brand-signature {
  opacity: 0.68;
  transform: translateY(-1px);
}

html[data-scene="landscape"] .poem-footer {
  position: relative;
  margin-top: clamp(20px, 2.8vh, 30px);
}

html[data-scene="landscape"] .poem-clock {
  position: static;
  margin: 0;
  transform: none;
}

html[data-scene="landscape"] .brand-signature {
  top: 50%;
  right: calc(50% + 48px);
  bottom: auto;
  transform: translateY(-50%);
}

html[data-scene="landscape"] .poem-card:hover .brand-signature {
  transform: translateY(calc(-50% - 1px));
}

.poem {
  min-height: 2.6em;
  margin: 0;
  font-size: clamp(2rem, 4.1vw, 4.8rem);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0.16em;
  text-wrap: balance;
  text-shadow: 0 0 70px rgba(var(--accent-rgb), 0.16);
  transition: color 900ms ease, text-shadow 900ms ease;
}

.poem.long {
  font-size: clamp(1.7rem, 3.5vw, 4rem);
}

.poem.very-long {
  font-size: clamp(1.45rem, 2.9vw, 3.25rem);
  line-height: 1.58;
  letter-spacing: 0.12em;
}

.poem-line {
  --optical-offset: 0em;
  display: block;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(var(--optical-offset), 16px, 0);
  animation: line-in 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.poem-line.has-terminal-punctuation {
  --optical-offset: 0.32em;
}

.poem-line:nth-child(2) {
  animation-delay: 140ms;
}

.poem-line.initial-line {
  opacity: 1;
  transform: translate3d(var(--optical-offset), 0, 0);
  animation: none;
}

.poem-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(28px, 4.5vh, 48px);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.16em;
}

.poem-meta .title {
  color: var(--text);
  transition: color 800ms ease;
}

.poem-source-link {
  text-decoration: none;
  cursor: pointer;
}

.poem-source-link:hover {
  color: var(--accent);
}

.poem-source-link:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 5px;
  border-radius: 2px;
}

.color-signature {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(24px, 5.8vw, 100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  color: var(--accent);
  transform: translateY(-52%);
  opacity: 0.2;
  transition: color 900ms ease, opacity 500ms ease;
}

.color-signature span {
  font-size: clamp(3.1rem, 7.4vw, 8.5rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.08;
  writing-mode: vertical-rl;
}

.color-signature small {
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
}

.hint {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  opacity: 0.62;
}

.actions {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  opacity: 0.28;
  transition: opacity 180ms ease, background 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.actions:hover,
.actions:focus-within {
  border-color: var(--hairline);
  background: rgba(8, 10, 12, 0.18);
  opacity: 0.9;
  backdrop-filter: blur(16px);
}

.icon-button,
.close-button,
.text-button,
.segmented button {
  border: 0;
  cursor: pointer;
}

.icon-button {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.icon-button:hover:not(:disabled) {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.12);
  transform: translateY(-1px);
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.28;
}

.primary-action.loading:disabled {
  cursor: wait;
  opacity: 0.65;
}

.primary-action.loading svg {
  animation: spin 900ms linear infinite;
}

.icon-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-action {
  color: var(--muted);
  background: transparent;
}

.primary-action:hover {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  filter: none;
}

.action-divider {
  width: 1px;
  height: 16px;
  margin: 0 2px;
  background: var(--hairline);
}

#favoriteButton[aria-pressed="true"] {
  color: #d63845;
}

#favoriteButton[aria-pressed="true"] svg {
  fill: currentColor;
}

.motion-off-icon,
html[data-motion="off"] .motion-on-icon {
  display: none;
}

html[data-motion="off"] .motion-off-icon {
  display: block;
}

.settings {
  position: absolute;
  z-index: 11;
  top: 0;
  right: 0;
  display: flex;
  width: min(420px, calc(100vw - 24px));
  height: 100%;
  padding: clamp(30px, 5vh, 52px) clamp(24px, 3.4vw, 42px);
  flex-direction: column;
  overflow-y: auto;
  border-left: 1px solid var(--hairline);
  background: var(--panel);
  backdrop-filter: blur(32px) saturate(1.15);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: scaleX(0.985);
  transform-origin: right center;
  visibility: hidden;
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    visibility 0s linear 260ms,
    background 700ms ease;
}

.settings.open {
  opacity: 1;
  pointer-events: auto;
  transform: scaleX(1);
  visibility: visible;
  transition-delay: 0s;
}

.settings::-webkit-scrollbar {
  width: 4px;
}

.settings::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.24);
}

.settings-head {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: clamp(30px, 5.5vh, 58px);
}

.settings-head div,
.setting-copy {
  display: flex;
  flex-direction: column;
}

.settings-head div {
  gap: 10px;
}

.settings-head span {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.settings-head strong {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.close-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 200;
  line-height: 1;
}

.close-button:hover {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.1);
}

.setting-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}

.setting-copy {
  gap: 7px;
}

.setting-copy strong {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.setting-copy span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  min-width: 64px;
  padding: 7px 12px;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.source-badge[data-state="loading"] {
  opacity: 0.65;
}

.source-badge[data-state="offline"] {
  color: var(--muted);
}

.segmented button {
  min-width: 46px;
  padding: 7px 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  transition: all 180ms ease;
}

.search-engines button {
  min-width: 40px;
  padding-inline: 8px;
}

.segmented button.selected {
  background: var(--accent);
  color: var(--bg);
}

.text-button {
  padding: 7px 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.text-button:hover {
  color: var(--text);
}

.text-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.settings.favorites-panel {
  overflow: hidden;
}

.favorites-panel .settings-head {
  margin-bottom: clamp(26px, 5vh, 44px);
}

.favorites-list {
  display: flex;
  min-height: 0;
  margin-right: -10px;
  padding-right: 10px;
  flex: 1;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(var(--accent-rgb), 0.3) transparent;
  scrollbar-width: thin;
}

.favorites-list::-webkit-scrollbar {
  width: 4px;
}

.favorites-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.3);
}

.favorites-empty {
  margin: auto;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  opacity: 0.62;
}

.favorite-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}

.favorite-item:first-child {
  padding-top: 0;
}

.favorite-quote {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.08em;
}

.favorite-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 11px;
}

.favorite-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-item-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.favorite-item-action {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.favorite-item-action:hover {
  color: var(--text);
}

.favorites-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

.favorites-footer > span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.08em;
  opacity: 0.62;
}

.favorites-footer-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
}

.favorites-footer-divider {
  width: 1px;
  height: 12px;
  background: var(--hairline);
}

.privacy-note {
  flex: 0 0 auto;
  margin: auto 0 0;
  padding-top: 24px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  opacity: 0.62;
}

.scrim {
  position: absolute;
  z-index: 10;
  inset: 0;
  background: rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(2px);
}

.toast {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 112px;
  padding: 10px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 200ms ease, transform 200ms ease;
  backdrop-filter: blur(16px);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

html[data-appearance="light"] {
  --hairline: rgba(30, 31, 32, 0.13);
}

html[data-appearance="light"] .vignette {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(82, 67, 54, 0.13) 118%);
}

html[data-appearance="light"] .grain {
  opacity: 0.075;
  mix-blend-mode: multiply;
}

html[data-appearance="light"] .brand-signature {
  opacity: 0.43;
}

html[data-appearance="light"] .actions {
  background: transparent;
}

html[data-appearance="light"] .actions:hover,
html[data-appearance="light"] .actions:focus-within {
  background: rgba(255, 252, 245, 0.42);
}

/* Modern scene: a quiet desktop, with the poem as its only window. */
html[data-scene="macos"] .app {
  background:
    radial-gradient(circle at 13% 12%, rgba(var(--accent-rgb), 0.4), transparent 31%),
    radial-gradient(circle at 88% 18%, rgba(115, 91, 210, 0.32), transparent 34%),
    radial-gradient(circle at 70% 88%, rgba(203, 83, 140, 0.23), transparent 38%),
    linear-gradient(145deg, #071017 0%, #11152b 50%, #1c112b 100%);
}

html[data-scene="macos"] .backdrop::before {
  position: absolute;
  inset: -28%;
  content: "";
  background:
    conic-gradient(from 198deg at 52% 48%, transparent 0 18%, rgba(var(--accent-rgb), 0.18) 27%, transparent 40% 62%, rgba(142, 89, 196, 0.17) 72%, transparent 84%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 54%);
  filter: blur(68px);
  opacity: 0.82;
  animation: desktop-aurora 14s ease-in-out infinite alternate;
}

html[data-scene="macos"] .time-atmosphere {
  inset: -6%;
  width: 112%;
  height: 112%;
  opacity: 0.92;
  mix-blend-mode: screen;
}

html[data-scene="macos"][data-time="dawn"] .time-atmosphere {
  background:
    radial-gradient(ellipse 54% 42% at 10% 88%, rgba(232, 144, 82, 0.27), rgba(194, 89, 54, 0.11) 46%, transparent 74%),
    radial-gradient(ellipse 38% 28% at 28% 82%, rgba(var(--accent-rgb), 0.12), transparent 72%),
    linear-gradient(28deg, rgba(242, 176, 112, 0.055), transparent 44%);
  opacity: 0.96;
}

html[data-scene="macos"][data-time="day"] .time-atmosphere {
  background:
    radial-gradient(ellipse 72% 54% at 50% -8%, rgba(255, 255, 255, 0.19), rgba(192, 218, 228, 0.085) 47%, transparent 76%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 48%);
  opacity: 0.9;
}

html[data-scene="macos"][data-time="dusk"] .time-atmosphere {
  background:
    radial-gradient(ellipse 84% 17% at 50% 76%, rgba(230, 126, 72, 0.25), rgba(184, 75, 58, 0.1) 52%, transparent 78%),
    linear-gradient(180deg, transparent 57%, rgba(224, 119, 72, 0.045) 65%, rgba(122, 69, 91, 0.075) 75%, transparent 86%),
    radial-gradient(ellipse 42% 34% at 88% 16%, rgba(82, 91, 145, 0.14), transparent 72%);
  opacity: 0.98;
}

html[data-scene="macos"][data-time="night"] .time-atmosphere {
  background:
    radial-gradient(ellipse 54% 42% at 82% 6%, rgba(78, 103, 174, 0.25), rgba(45, 62, 111, 0.1) 48%, transparent 76%),
    radial-gradient(ellipse 70% 24% at 56% 82%, rgba(54, 76, 126, 0.11), transparent 74%),
    linear-gradient(155deg, rgba(21, 32, 65, 0.11), transparent 62%);
  opacity: 0.86;
}

html[data-scene="macos"][data-time="neutral"] .time-atmosphere {
  opacity: 0;
}

html[data-scene="macos"] .landscape,
html[data-scene="macos"] .mist,
html[data-scene="macos"] .gufeng-silk-texture {
  display: none;
}

html[data-scene="macos"][data-gufeng-landform="on"] .modern-contour-layer {
  opacity: 0.44;
  mix-blend-mode: screen;
  animation: modern-contour-drift 46s ease-in-out infinite alternate;
}

html[data-scene="macos"][data-modern-motif-role="ambient"] .gufeng-motif-layer.has-motif {
  color: rgba(var(--accent-rgb), 0.3);
  opacity: 0.3;
  filter: blur(0.25px) drop-shadow(0 0 46px rgba(var(--accent-rgb), 0.08));
  mix-blend-mode: screen;
  animation: modern-projection-drift 48s ease-in-out infinite alternate;
}

html[data-scene="macos"] .gufeng-motif-layer,
html[data-scene="macos"] .modern-ambient-echo-layer,
html[data-scene="macos"] .modern-etching-layer {
  translate: var(--modern-shift-x, 0) var(--modern-shift-y, 0);
  scale: var(--modern-scale, 1);
  rotate: var(--modern-rotate, 0deg);
}

html[data-scene="macos"][data-modern-motif-role="ambient"] .modern-ambient-echo-layer.has-motif {
  color: rgba(var(--accent-rgb), 0.25);
  opacity: var(--modern-layer-opacity, 0.09);
  filter: blur(var(--modern-layer-blur, 24px));
  mix-blend-mode: screen;
  animation: modern-echo-drift 64s ease-in-out infinite alternate;
}

html[data-scene="macos"][data-gufeng-motif="cloud"] .gufeng-motif-layer.has-motif {
  opacity: 0.34;
}

html[data-scene="macos"][data-gufeng-motif="floral"] .gufeng-motif-layer.has-motif {
  color: rgba(var(--accent-rgb), 0.26);
  opacity: 0.24;
  animation-duration: 52s;
}

html[data-scene="macos"][data-gufeng-motif="apsara"] .gufeng-motif-layer.has-motif {
  color: rgba(var(--accent-rgb), 0.26);
  opacity: 0.24;
  animation-duration: 48s;
}

html[data-scene="macos"][data-gufeng-motif="branches"] .gufeng-motif-layer.has-motif {
  opacity: 0.32;
  animation-duration: 54s;
}

html[data-scene="macos"][data-gufeng-motif="seasonal"] .gufeng-motif-layer.has-motif {
  opacity: 0.27;
  animation-duration: 58s;
}

html[data-scene="macos"][data-time="night"] .gufeng-night-layer {
  color: rgba(var(--accent-rgb), 0.58);
  opacity: 0.28;
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.18));
  mix-blend-mode: screen;
}

html[data-scene="macos"][data-modern-motif-role="etching"] .modern-etching-layer.has-motif {
  display: block;
  opacity: 0.32;
  mix-blend-mode: soft-light;
}

html[data-scene="macos"][data-gufeng-motif="caisson"] .modern-etching-layer.has-motif {
  opacity: 0.28;
}

html[data-scene="macos"][data-gufeng-motif="lattice"] .modern-etching-layer.has-motif {
  opacity: 0.2;
}

html[data-scene="macos"][data-gufeng-motif="tile"] .modern-etching-layer.has-motif {
  opacity: 0.24;
}

html[data-scene="macos"][data-modern-motif-role="texture"] .modern-silk-texture {
  display: block;
  opacity: 0.58;
}

html[data-scene="macos"][data-appearance="light"][data-gufeng-landform="on"] .modern-contour-layer {
  color: rgba(63, 72, 91, 0.3);
  opacity: 0.36;
  mix-blend-mode: multiply;
}

html[data-scene="macos"][data-appearance="light"][data-modern-motif-role="ambient"] .gufeng-motif-layer.has-motif {
  color: rgba(57, 64, 83, 0.24);
  opacity: 0.28;
  filter: blur(0.2px);
  mix-blend-mode: multiply;
}

html[data-scene="macos"][data-appearance="light"][data-gufeng-motif="floral"] .gufeng-motif-layer.has-motif {
  opacity: 0.22;
}

html[data-scene="macos"][data-appearance="light"][data-gufeng-motif="apsara"] .gufeng-motif-layer.has-motif {
  opacity: 0.21;
}

html[data-scene="macos"][data-appearance="light"][data-modern-motif-role="ambient"] .modern-ambient-echo-layer.has-motif {
  color: rgba(57, 64, 83, 0.2);
  opacity: var(--modern-layer-opacity, 0.09);
  mix-blend-mode: multiply;
}

html[data-scene="macos"][data-appearance="light"][data-time="night"] .gufeng-night-layer {
  color: rgba(62, 78, 110, 0.42);
  opacity: 0.18;
  mix-blend-mode: multiply;
}

html[data-scene="macos"][data-appearance="light"] .time-atmosphere {
  opacity: 0.68;
  mix-blend-mode: soft-light;
}

html[data-scene="macos"][data-appearance="light"][data-time="dawn"] .time-atmosphere {
  opacity: 0.74;
}

html[data-scene="macos"][data-appearance="light"][data-time="dusk"] .time-atmosphere {
  opacity: 0.78;
}

html[data-scene="macos"][data-appearance="light"][data-time="night"] .time-atmosphere {
  opacity: 0.64;
  mix-blend-mode: multiply;
}

html[data-scene="macos"][data-appearance="light"][data-time="neutral"] .time-atmosphere {
  opacity: 0;
}

html[data-scene="macos"][data-appearance="light"][data-modern-motif-role="etching"] .modern-etching-layer.has-motif {
  color: rgba(56, 62, 82, 0.3);
  opacity: 0.28;
  mix-blend-mode: multiply;
}

html[data-scene="macos"][data-appearance="light"][data-gufeng-motif="lattice"] .modern-etching-layer.has-motif {
  opacity: 0.18;
}

html[data-scene="macos"][data-appearance="light"][data-gufeng-motif="caisson"] .modern-etching-layer.has-motif {
  opacity: 0.22;
}

html[data-scene="macos"][data-appearance="light"][data-gufeng-motif="tile"] .modern-etching-layer.has-motif {
  opacity: 0.2;
}

html[data-scene="macos"][data-appearance="light"][data-modern-motif-role="texture"] .modern-silk-texture {
  opacity: 0.42;
  background:
    repeating-linear-gradient(5deg, rgba(72, 67, 78, 0.035) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(94deg, rgba(var(--accent-rgb), 0.045) 0 1px, transparent 1px 8px),
    radial-gradient(ellipse at 22% 30%, rgba(255, 255, 255, 0.13), transparent 46%);
  mix-blend-mode: multiply;
}

html[data-scene="macos"] .halo {
  filter: blur(48px);
}

html[data-scene="macos"] .halo-main {
  top: -16vh;
  left: -9vw;
  width: 63vw;
  height: 63vw;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.36), transparent 66%);
}

html[data-scene="macos"] .halo-side {
  top: 17vh;
  right: -13vw;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(125, 86, 199, 0.31), transparent 67%);
  opacity: 0.76;
}

html[data-scene="macos"] .moon {
  top: 93%;
  left: 55%;
  width: 64vw;
  max-width: none;
  border: 0;
  background: radial-gradient(circle, rgba(233, 112, 159, 0.19), rgba(var(--accent-rgb), 0.08) 43%, transparent 70%);
  box-shadow: none;
  filter: blur(42px);
  opacity: 0.8;
  animation: desktop-glow 13s ease-in-out infinite alternate;
}

html[data-scene="macos"] .grain {
  opacity: 0.035;
  mix-blend-mode: soft-light;
}

html[data-scene="macos"] .vignette {
  background: radial-gradient(ellipse at center, transparent 48%, rgba(1, 4, 12, 0.2) 118%);
}

html[data-scene="macos"] .poem-stage {
  padding: 64px 6vw 92px;
}

html[data-scene="macos"] .poem-card {
  display: flex;
  width: min(1120px, 84vw);
  min-height: min(56vh, 620px);
  flex-direction: column;
  justify-content: center;
  padding: clamp(52px, 6.2vh, 72px) clamp(42px, 6.4vw, 88px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045));
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.24), inset 0 1px rgba(255, 255, 255, 0.08);
  transform: translateY(-1.5vh);
  backdrop-filter: blur(34px) saturate(1.25);
}

html[data-scene="macos"] .poem-card::before,
html[data-scene="macos"] .poem-card::after {
  position: absolute;
  z-index: 1;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

html[data-scene="macos"] .poem-card::before {
  inset: -24%;
  background: linear-gradient(
    112deg,
    transparent 28%,
    rgba(255, 255, 255, 0.085) 43%,
    rgba(var(--accent-rgb), 0.06) 51%,
    transparent 66%
  );
  opacity: 0.72;
  transform: translate3d(-18%, -5%, 0) rotate(-3deg);
  mix-blend-mode: screen;
  animation: modern-glass-refraction 34s ease-in-out infinite alternate;
}

html[data-scene="macos"] .poem-card::after {
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 22%),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.06), transparent 18% 82%, rgba(var(--accent-rgb), 0.04));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.13),
    inset 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px rgba(var(--accent-rgb), 0.035);
  opacity: 0.7;
  mix-blend-mode: screen;
}

html[data-scene="macos"] .brand-signature {
  right: clamp(20px, 2.4vw, 28px);
  bottom: clamp(18px, 2.2vh, 24px);
}

html[data-scene="macos"] .poem {
  font-size: clamp(2rem, 3.7vw, 4.25rem);
  line-height: 1.58;
  letter-spacing: 0.13em;
  text-shadow: 0 4px 38px rgba(0, 0, 0, 0.16);
}

html[data-scene="macos"] .poem.long {
  font-size: clamp(1.7rem, 3.1vw, 3.5rem);
}

html[data-scene="macos"] .poem.very-long {
  font-size: clamp(1.4rem, 2.65vw, 3rem);
}

html[data-scene="macos"] .poem-meta {
  margin-top: clamp(26px, 3.6vh, 38px);
}

html[data-scene="macos"] .color-signature {
  display: none;
}

html[data-scene="macos"] .bottombar {
  right: auto;
  bottom: 18px;
  left: 50%;
  justify-content: center;
  transform: translateX(-50%);
}

html[data-scene="macos"] .hint {
  display: none;
}

html[data-scene="macos"] .actions {
  padding: 4px;
  border-color: transparent;
  opacity: 0.2;
}

html[data-scene="macos"] .actions:hover,
html[data-scene="macos"] .actions:focus-within {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(16, 19, 29, 0.36);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.17), inset 0 1px rgba(255, 255, 255, 0.09);
  opacity: 0.9;
  backdrop-filter: blur(22px) saturate(1.2);
}

html[data-scene="macos"][data-appearance="light"] .app {
  background:
    radial-gradient(circle at 12% 13%, rgba(var(--accent-rgb), 0.36), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(157, 136, 224, 0.32), transparent 35%),
    radial-gradient(circle at 69% 90%, rgba(244, 164, 190, 0.3), transparent 39%),
    linear-gradient(145deg, #dcecf3 0%, #e9e4f3 51%, #f3e3ed 100%);
}

html[data-scene="macos"][data-appearance="light"] .poem-card {
  border-color: rgba(255, 255, 255, 0.52);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(250, 252, 255, 0.18));
  box-shadow: 0 38px 90px rgba(67, 71, 95, 0.16), inset 0 1px rgba(255, 255, 255, 0.58);
}

html[data-scene="macos"][data-appearance="light"] .poem-card::before {
  opacity: 0.44;
  mix-blend-mode: soft-light;
}

html[data-scene="macos"][data-appearance="light"] .poem-card::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 22%),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.045), transparent 18% 82%, rgba(103, 92, 126, 0.025));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.26),
    inset 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px rgba(var(--accent-rgb), 0.025);
  opacity: 0.56;
  mix-blend-mode: soft-light;
}

html[data-scene="macos"][data-appearance="light"] .poem {
  text-shadow: 0 4px 36px rgba(91, 84, 112, 0.1);
}

html[data-scene="macos"][data-appearance="light"] .actions:hover,
html[data-scene="macos"][data-appearance="light"] .actions:focus-within {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 36px rgba(66, 69, 89, 0.14), inset 0 1px rgba(255, 255, 255, 0.55);
}


html[data-motion="off"] .backdrop *,
html[data-motion="off"] .backdrop::before,
html[data-motion="off"] .backdrop::after,
html[data-motion="off"] .backdrop *::before,
html[data-motion="off"] .backdrop *::after {
  animation-play-state: paused !important;
}

html[data-motion="off"][data-scene="macos"] .poem-card::before {
  animation-play-state: paused !important;
}

@keyframes line-in {
  to { opacity: 1; transform: translate3d(var(--optical-offset), 0, 0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes drift-main {
  to { transform: translate(6vw, 3vh) scale(1.12); }
}

@keyframes drift-side {
  to { transform: translate(-5vw, -4vh) scale(1.16); }
}

@keyframes breathe-far {
  to { transform: translate3d(-3%, 1.3%, 0) scaleX(1.055); }
}

@keyframes breathe-mid {
  to { transform: translate3d(3%, -1.2%, 0) scaleX(1.065); }
}

@keyframes breathe-near {
  to { transform: translate3d(-2.4%, 1%, 0) scaleX(1.055); }
}

@keyframes breathe-front {
  to { transform: translate3d(2%, 0.8%, 0) scaleX(1.045); }
}

@keyframes mist {
  to { transform: translateX(11%) scaleY(1.26); opacity: 0.42; }
}

@keyframes gufeng-cloud-drift {
  to { transform: translate3d(1.2vw, -0.5vh, 0); opacity: 0.76; }
}

@keyframes gufeng-apsara-drift {
  to { transform: translate3d(-0.7vw, 0.6vh, 0) rotate(-0.45deg); }
}

@keyframes gufeng-ornament-breathe {
  to { transform: translate3d(0.55vw, -0.3vh, 0); opacity: 0.76; }
}

@keyframes gufeng-bird-drift {
  to { transform: translate3d(-0.9vw, 0.45vh, 0); opacity: 0.78; }
}

@keyframes modern-projection-drift {
  from { transform: translate3d(-0.35vw, 0.15vh, 0) scale(1.035); }
  to { transform: translate3d(0.7vw, -0.45vh, 0) scale(1.065); }
}

@keyframes modern-contour-drift {
  from { transform: translate3d(-0.25vw, 0.2vh, 0) scale(1.015); }
  to { transform: translate3d(0.55vw, -0.3vh, 0) scale(1.035); }
}

@keyframes modern-echo-drift {
  from { transform: translate3d(-0.45vw, 0.25vh, 0); }
  to { transform: translate3d(0.7vw, -0.4vh, 0); }
}

@keyframes modern-glass-refraction {
  from { transform: translate3d(-18%, -5%, 0) rotate(-3deg); }
  to { transform: translate3d(16%, 4%, 0) rotate(-3deg); }
}

@keyframes desktop-aurora {
  to { transform: translate3d(6%, -4%, 0) rotate(9deg) scale(1.09); opacity: 1; }
}

@keyframes desktop-glow {
  to { transform: translate(-45%, -54%) scale(1.14); opacity: 0.95; }
}

@media (max-width: 800px) {
  .poem-stage {
    padding: 7vh 8vw 18vh;
  }

  .poem-card {
    width: min(92vw, 680px);
    transform: translateY(-2vh);
  }

  .color-signature {
    top: 22%;
    right: 16px;
    opacity: 0.12;
  }

  .hint {
    display: none;
  }

  .poem {
    line-height: 1.72;
  }

  html[data-scene="landscape"][data-gufeng-motif="apsara"] .gufeng-motif-layer {
    opacity: 0.28;
  }

  html[data-scene="macos"][data-gufeng-motif="apsara"] .gufeng-motif-layer.has-motif {
    opacity: 0.22;
  }

  html[data-scene="macos"] .modern-ambient-echo-layer {
    display: none;
  }

  html[data-scene="macos"] .poem-stage {
    padding: 58px 18px 82px;
  }

  html[data-scene="macos"] .poem-card {
    width: min(720px, calc(100vw - 36px));
    min-height: min(52vh, 480px);
    padding: 52px 28px 46px;
    border-radius: 24px;
  }

  html[data-scene="macos"] .poem {
    line-height: 1.66;
  }

}

@media (max-width: 520px) {
  .app {
    min-height: 460px;
  }

  .poem-stage {
    padding-bottom: 19vh;
  }

  .poem {
    font-size: clamp(1.65rem, 7.5vw, 2.35rem);
    letter-spacing: 0.1em;
  }

  .poem.long {
    font-size: clamp(1.42rem, 6.4vw, 2rem);
  }

  .poem.very-long {
    font-size: clamp(1.18rem, 5.4vw, 1.72rem);
    letter-spacing: 0.06em;
  }

  .poem-meta {
    gap: 7px;
    font-size: 11px;
  }

  .poem-clock {
    gap: 5px;
    margin-top: 20px;
  }

  .poem-clock span {
    font-size: 8px;
  }

  .brand-signature {
    width: 24px;
    height: 24px;
  }

  .bottombar {
    justify-content: center;
  }

  .actions {
    gap: 2px;
    opacity: 0.52;
  }

  .icon-button {
    width: 32px;
    height: 32px;
  }

  .settings-head {
    margin-bottom: 5vh;
  }

  .settings {
    overflow-y: auto;
  }

  html[data-scene="macos"] .poem-card {
    min-height: min(50vh, 420px);
    padding: 48px 20px 42px;
    border-radius: 21px;
  }


}

@media (hover: none) {
  .actions {
    opacity: 0.52;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
