:root {
  --paper: #f4efe4;
  --paper-soft: #faf6ec;
  --paper-deep: #e9e0cf;
  --ink: #1d2926;
  --ink-soft: #52605a;
  --ink-faint: #87908a;
  --jade: #35564f;
  --jade-soft: #708b82;
  --vermilion: #a64036;
  --vermilion-soft: #c97768;
  --gold: #ab8750;
  --line: rgba(33, 48, 44, 0.14);
  --line-strong: rgba(33, 48, 44, 0.26);
  --shadow: 0 22px 60px rgba(48, 42, 30, 0.12);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --rainbow-1: #c96f6b;
  --rainbow-2: #d59a5c;
  --rainbow-3: #87a57c;
  --rainbow-4: #6e9ba4;
  --rainbow-5: #8a80a5;
  --safe-bottom: 0px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 68px;
  --poem-scale: 1;
  color-scheme: light;
}

body[data-theme="night"] {
  --paper: #161c1b;
  --paper-soft: #1d2523;
  --paper-deep: #111716;
  --ink: #eee7d8;
  --ink-soft: #bbb3a3;
  --ink-faint: #8e918a;
  --jade: #aac8be;
  --jade-soft: #89a39b;
  --vermilion: #d88573;
  --vermilion-soft: #b9695c;
  --gold: #d1b374;
  --line: rgba(238, 231, 216, 0.16);
  --line-strong: rgba(238, 231, 216, 0.29);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 9%, rgba(255, 255, 255, 0.68), transparent 31%),
    radial-gradient(circle at 87% 24%, rgba(198, 170, 126, 0.12), transparent 27%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 46%),
    var(--paper);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.23;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body[data-theme="night"]:before {
  opacity: 0.1;
  mix-blend-mode: screen;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

svg {
  overflow: visible;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon .fill-icon,
.fill-icon {
  fill: currentColor;
  stroke: none;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  transform: translateY(-160%);
  padding: 8px 12px;
  color: var(--paper-soft);
  background: var(--ink);
  border-radius: 4px;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
  width: 100%;
}

.main {
  width: 100%;
  min-height: 70vh;
  outline: none;
}

body.player-open .main {
  padding-bottom: 92px;
}

.view {
  display: none;
  animation: view-in 0.52s ease both;
}

.view.is-active {
  display: block;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.desktop-header {
  display: none;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.brand-logo svg {
  width: 100%;
  height: 100%;
}

.brand-logo .rainbow {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

.brand-logo .r1 {
  stroke: var(--rainbow-1);
}

.brand-logo .r2 {
  stroke: var(--rainbow-2);
}

.brand-logo .r3 {
  stroke: var(--rainbow-3);
}

.brand-logo .r4 {
  stroke: var(--rainbow-4);
}

.brand-logo .logo-sun {
  fill: var(--vermilion);
}

.brand-logo-small {
  width: 38px;
  height: 30px;
}

.brand-logo-large {
  width: 124px;
  height: 98px;
}

.brand-logo-tiny {
  width: 26px;
  height: 21px;
}

/* Boot */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.82), transparent 34%),
    var(--paper);
  transition: opacity 0.3s ease, visibility 0.3s;
}

.boot-screen.is-ready {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-mark {
  position: relative;
  text-align: center;
}

.boot-cloud {
  position: absolute;
  width: 180px;
  height: 58px;
  border-top: 1px solid rgba(57, 82, 75, 0.18);
  border-radius: 50%;
  filter: blur(0.2px);
}

.boot-cloud.cloud-a {
  top: 40px;
  left: -118px;
  transform: rotate(-9deg);
}

.boot-cloud.cloud-b {
  top: 83px;
  right: -114px;
  transform: rotate(10deg);
}

.boot-screen .brand-logo {
  margin: 0 auto 16px;
  animation: logo-breathe 2.2s ease-in-out infinite;
}

.boot-screen .rainbow {
  stroke-dasharray: 125;
  stroke-dashoffset: 125;
  animation: draw-rainbow 1.2s ease forwards;
}

.boot-screen .r2 {
  animation-delay: 0.1s;
}

.boot-screen .r3 {
  animation-delay: 0.2s;
}

.boot-screen .r4 {
  animation-delay: 0.3s;
}

@keyframes draw-rainbow {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes logo-breathe {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.boot-title {
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: 0.17em;
}

.boot-sub {
  margin-top: 8px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.16em;
}

.boot-line {
  width: 124px;
  height: 1px;
  margin: 28px auto 0;
  overflow: hidden;
  background: var(--line);
}

.boot-line span {
  display: block;
  width: 46%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--vermilion), transparent);
  animation: boot-slide 1.2s ease-in-out infinite;
}

@keyframes boot-slide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(300%);
  }
}

/* Shared type */
.rainbow-rule {
  display: flex;
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
}

.rainbow-rule i {
  flex: 1;
}

.rainbow-rule i:nth-child(1) {
  background: var(--rainbow-1);
}

.rainbow-rule i:nth-child(2) {
  background: var(--rainbow-2);
}

.rainbow-rule i:nth-child(3) {
  background: var(--rainbow-3);
}

.rainbow-rule i:nth-child(4) {
  background: var(--rainbow-4);
}

.rainbow-rule i:nth-child(5) {
  background: var(--rainbow-5);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.section-heading .eyebrow {
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.section-heading a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--vermilion);
  font-size: 13px;
}

.section-heading a .icon {
  width: 15px;
  height: 15px;
}

.quiet {
  color: var(--ink-soft);
}

.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 5px;
  border: 1px solid var(--vermilion);
  border-radius: 50%;
  color: var(--vermilion);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1;
}

.eyebrow-label {
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.btn-primary,
.btn-ghost,
.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 2px;
  font-size: 15px;
  letter-spacing: 0.08em;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  color: #fbf6ec;
  background: var(--vermilion);
  box-shadow: 0 8px 22px rgba(166, 64, 54, 0.19);
}

.btn-ghost {
  color: var(--jade);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.14);
}

.btn-quiet {
  min-height: 38px;
  padding: 7px 12px;
  color: var(--ink-soft);
}

.btn-primary:active,
.btn-ghost:active,
.btn-quiet:active {
  transform: scale(0.97);
}

.btn-primary .icon,
.btn-ghost .icon,
.btn-quiet .icon {
  width: 18px;
  height: 18px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--ink-soft);
  transition: background 0.18s ease, color 0.18s ease;
}

.icon-button:active {
  background: rgba(53, 86, 79, 0.09);
}

.icon-button.is-fav {
  color: var(--vermilion);
}

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

/* Home */
.home {
  padding: 0 0 32px;
}

.home-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 15px;
  border-bottom: 1px solid var(--line);
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.home-brand-copy {
  display: block;
}

.home-brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.15;
}

.home-brand-copy small {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.home-date {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.05em;
}

.home-date span {
  display: block;
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.hero-poem {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  padding: 42px 26px 78px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  isolation: isolate;
}

.hero-poem:before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(circle at 76% 28%, rgba(213, 195, 153, 0.35), transparent 15%),
    radial-gradient(circle at 16% 42%, rgba(86, 119, 109, 0.09), transparent 27%),
    linear-gradient(180deg, transparent 58%, rgba(86, 109, 96, 0.06));
}

.hero-poem:after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -16%;
  bottom: 32px;
  width: 78%;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(208, 198, 166, 0.32), transparent 62%);
  filter: blur(20px);
}

.hero-art {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.hero-moon {
  position: absolute;
  top: 106px;
  right: 11%;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 31%, rgba(255, 252, 231, 0.98), rgba(224, 207, 161, 0.43) 62%, rgba(210, 194, 152, 0.07) 70%);
  box-shadow: 0 0 60px rgba(220, 203, 159, 0.23);
}

.hero-mountains {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 46%;
}

.petal {
  position: absolute;
  width: 8px;
  height: 5px;
  border-radius: 100% 0 100% 0;
  background: rgba(190, 111, 98, 0.24);
  transform: rotate(30deg);
}

.petal.p1 {
  left: 8%;
  top: 39%;
}

.petal.p2 {
  left: 17%;
  top: 68%;
  width: 6px;
  height: 4px;
}

.petal.p3 {
  right: 22%;
  bottom: 27%;
  width: 7px;
  height: 4px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.2em;
}

.hero-kicker:before,
.hero-kicker:after {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--line-strong);
}

.hero-title {
  margin: 20px 0 15px;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: 0.12em;
}

.hero-lines {
  max-width: 520px;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.95;
  letter-spacing: 0.09em;
}

.hero-lines p {
  margin: 0;
}

.hero-author {
  margin-top: 13px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.13em;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 25px;
}

.hero-actions .btn-ghost,
.hero-actions .btn-primary {
  min-width: 106px;
}

.hero-fav {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
}

.hero-footnote {
  position: relative;
  z-index: 2;
  margin-top: 34px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.home-body {
  padding: 30px 20px 0;
}

.author-grid {
  display: flex;
  gap: 11px;
  margin: 0 -20px;
  padding: 0 20px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.author-grid::-webkit-scrollbar {
  display: none;
}

.author-card {
  position: relative;
  min-width: 142px;
  flex: 1 0 142px;
  min-height: 174px;
  padding: 18px 15px 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.04));
  text-align: left;
}

.author-card:after {
  content: "";
  position: absolute;
  right: -21px;
  bottom: -24px;
  width: 82px;
  height: 82px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.author-card .author-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 41px;
  height: 41px;
  margin-bottom: 14px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 21px;
}

.author-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.author-card .author-years {
  margin-top: 2px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.author-card .author-count {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 12px;
}

.author-card .author-count strong {
  margin-right: 3px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.author-card .author-arrow {
  position: absolute;
  right: 15px;
  top: 18px;
  color: var(--ink-faint);
}

.author-card .author-arrow .icon {
  width: 15px;
  height: 15px;
}

.quote-section {
  margin-top: 34px;
}

.quote-list {
  border-top: 1px solid var(--line);
}

.quote-item {
  display: block;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}

.quote-item blockquote {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.quote-item cite {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.06em;
}

.game-invite {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  margin-top: 30px;
  padding: 20px 22px;
  overflow: hidden;
  color: #f7f1e5;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(120deg, #284941, #345e54);
}

.game-invite:after {
  content: "月";
  position: absolute;
  right: 19%;
  top: -16px;
  color: rgba(255, 255, 255, 0.055);
  font-family: var(--serif);
  font-size: 130px;
  line-height: 1;
}

.game-invite h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.game-invite p {
  position: relative;
  z-index: 1;
  margin: 3px 0 0;
  color: rgba(247, 241, 229, 0.7);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.game-invite .invite-seal {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(244, 232, 208, 0.68);
  border-radius: 50%;
  color: #f2e5cd;
  font-family: var(--serif);
  font-size: 25px;
}

.mini-note {
  margin: 25px 2px 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.75;
}

/* Library */
.library {
  padding: 28px 20px 42px;
}

.page-heading {
  text-align: center;
}

.page-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.14em;
}

.page-heading p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.library .rainbow-rule {
  margin: 20px auto 24px;
  max-width: 720px;
  opacity: 0.78;
}

.search-wrap {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  color: var(--ink-faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 50px;
  padding: 0 44px 0 45px;
  outline: none;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.14);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.04em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--jade-soft);
  box-shadow: 0 0 0 4px rgba(74, 107, 98, 0.07);
}

.search-input::placeholder {
  color: var(--ink-faint);
}

.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration {
  display: none;
  -webkit-appearance: none;
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink-faint);
  transform: translateY(-50%);
}

.search-clear .icon {
  width: 16px;
  height: 16px;
}

.filter-scroll {
  margin: 19px -20px 0;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  min-width: max-content;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.filter-button {
  position: relative;
  padding: 10px 0 13px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.09em;
}

.filter-button.is-active {
  color: var(--vermilion);
}

.filter-button.is-active:after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--vermilion);
}

.theme-scroll {
  margin: 17px -20px 0;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.theme-scroll::-webkit-scrollbar {
  display: none;
}

.theme-row {
  display: flex;
  gap: 8px;
  min-width: max-content;
}

.theme-chip {
  min-height: 30px;
  padding: 4px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.theme-chip.is-active {
  color: var(--paper-soft);
  border-color: var(--jade);
  background: var(--jade);
}

.library-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 860px;
  margin: 28px auto 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.library-meta strong {
  color: var(--ink-soft);
  font-weight: 500;
}

.random-poem {
  margin-left: 10px;
  padding: 2px 0;
  color: var(--vermilion);
  border-bottom: 1px solid rgba(166, 64, 54, 0.34);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.library-meta select {
  padding: 4px 0;
  outline: none;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
}

.poem-list {
  max-width: 860px;
  margin: 8px auto 0;
  border-top: 1px solid var(--line);
}

.load-hint {
  padding: 12px 4px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
}

.poem-row {
  position: relative;
  display: block;
  padding: 18px 8px 18px 18px;
  border-bottom: 1px solid var(--line);
}

.poem-row:before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 0;
  width: 2px;
  background: var(--paper-deep);
}

.poem-row.is-curated:before {
  background: var(--vermilion-soft);
}

.poem-row-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.poem-row h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.poem-row .tag-note {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 0 5px;
  border: 1px solid rgba(166, 64, 54, 0.35);
  color: var(--vermilion);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.poem-row .tag-note.is-supplement {
  color: var(--gold);
  border-color: rgba(171, 135, 80, 0.38);
}

.poem-row-author {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.poem-row-excerpt {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.03em;
}

.poem-row-meta {
  display: flex;
  gap: 8px;
  margin-top: 9px;
  color: var(--ink-faint);
  font-size: 10px;
}

.poem-row-meta span + span:before {
  content: "·";
  margin-right: 8px;
  color: var(--line-strong);
}

.search-hit {
  color: var(--vermilion);
  background: rgba(166, 64, 54, 0.07);
}

.load-more-wrap {
  padding: 24px 0 12px;
  text-align: center;
}

.load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 22px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.empty-state {
  padding: 62px 12px;
  color: var(--ink-faint);
  text-align: center;
}

.empty-state .seal {
  width: 45px;
  height: 45px;
  margin: 0 auto 16px;
  font-size: 20px;
}

.empty-state h3 {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.empty-state p {
  margin: 8px 0 0;
  font-size: 12px;
}

/* Detail */
.detail-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 14px 6px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

body[data-theme="night"] .detail-topbar {
  background: var(--paper);
}

.detail-topbar-title {
  max-width: 56%;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-topbar-actions {
  display: flex;
  gap: 2px;
}

.detail-sheet {
  max-width: 760px;
  margin: 0 auto;
  padding: 33px 22px 76px;
}

.poem-head {
  text-align: center;
}

.poem-mass {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 17px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.meta-pill.is-red {
  color: var(--vermilion);
  border-color: rgba(166, 64, 54, 0.3);
}

.meta-pill.is-gold {
  color: var(--gold);
  border-color: rgba(171, 135, 80, 0.4);
}

.poem-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0.1em;
}

.poem-subtitle {
  margin-top: 9px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.theme-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 17px;
}

.theme-inline span {
  color: var(--jade-soft);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.theme-inline span:not(:last-child):after {
  content: "·";
  margin-left: 6px;
  color: var(--line-strong);
}

.reading-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 24px 0 3px;
}

.reading-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 45px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.reading-tool .icon {
  width: 16px;
  height: 16px;
}

.reading-tool.is-active {
  color: var(--vermilion);
  border-color: rgba(166, 64, 54, 0.34);
}

.poem-text-wrap {
  position: relative;
  min-height: 154px;
  margin: 28px 0 0;
  padding: 6px 0;
}

.poem-text {
  font-family: var(--serif);
  font-size: calc(23px * var(--poem-scale));
  line-height: 2.35;
  letter-spacing: 0.1em;
  text-align: center;
  transition: font-size 0.18s ease;
}

.poem-text p {
  margin: 0;
}

.poem-text.is-vertical {
  display: inline-block;
  max-height: 62vh;
  min-height: 260px;
  padding: 0 2px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  text-align: right;
  writing-mode: vertical-rl;
  -webkit-writing-mode: vertical-rl;
  line-height: 2.2;
  -webkit-overflow-scrolling: touch;
}

.poem-text.is-vertical p {
  display: inline-block;
  margin: 0 0 0 13px;
}

.poem-text-wrap.is-vertical {
  overflow-x: auto;
  text-align: center;
}

.variant-note {
  margin-top: 20px;
  padding: 10px 12px;
  border-left: 2px solid var(--gold);
  color: var(--ink-faint);
  background: rgba(171, 135, 80, 0.05);
  font-size: 11px;
  line-height: 1.7;
}

.detail-rule {
  margin: 35px 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

.detail-tabs {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 0;
  border-bottom: 1px solid var(--line);
}

.detail-tab {
  position: relative;
  padding: 17px 0 14px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.1em;
}

.detail-tab.is-active {
  color: var(--vermilion);
}

.detail-tab.is-active:after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--vermilion);
}

.note-panel {
  min-height: 250px;
  padding: 25px 1px 10px;
  animation: panel-in 0.35s ease both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.note-intro {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.04em;
}

.note-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 26px 0 13px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.note-heading:before {
  content: "";
  width: 15px;
  height: 1px;
  background: var(--vermilion);
}

.note-list {
  margin: 0;
}

.note-item {
  display: flex;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px dotted var(--line);
}

.note-item dt {
  flex: 0 0 66px;
  color: var(--jade);
  font-family: var(--serif);
  font-size: 16px;
}

.note-item dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

.translation-copy,
.appreciation-copy {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2.05;
  letter-spacing: 0.035em;
}

.translation-copy p,
.appreciation-copy p {
  margin: 0 0 16px;
}

.source-box {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.source-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 7px 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.source-row span:first-child {
  color: var(--ink-faint);
}

.source-row span:last-child {
  text-align: right;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.detail-actions .btn-ghost,
.detail-actions .btn-primary {
  flex: 1 0 130px;
}

.nearby-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.nearby-nav a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 47%;
  padding: 16px 0;
  font-family: var(--serif);
  font-size: 13px;
}

.nearby-nav a:last-child {
  text-align: right;
}

.nearby-nav small {
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 10px;
}

/* Player */
.player {
  position: fixed;
  z-index: 40;
  right: 12px;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 11px);
  left: 12px;
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(250, 246, 236, 0.9);
  box-shadow: 0 15px 38px rgba(37, 33, 24, 0.16);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transform: translateY(110%);
  transition: transform 0.32s ease;
}

body[data-theme="night"] .player {
  background: rgba(30, 38, 36, 0.92);
}

.player.is-visible {
  transform: translateY(0);
}

.player-main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--paper-soft);
  background: var(--ink);
}

.player-main .icon {
  width: 20px;
  height: 20px;
}

.player-info {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 10px;
  padding: 0 10px;
  text-align: left;
}

.equalizer {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 24px;
  height: 24px;
}

.equalizer i {
  display: block;
  width: 2px;
  height: 8px;
  background: var(--vermilion);
  animation: eq 0.8s ease-in-out infinite alternate paused;
}

.equalizer i:nth-child(2) {
  height: 14px;
  animation-delay: -0.2s;
}

.equalizer i:nth-child(3) {
  height: 10px;
  animation-delay: -0.4s;
}

.equalizer i:nth-child(4) {
  height: 18px;
  animation-delay: -0.6s;
}

.equalizer i:nth-child(5) {
  height: 7px;
  animation-delay: -0.1s;
}

.player.is-playing .equalizer i {
  animation-play-state: running;
}

.player.is-loading .equalizer i {
  animation-play-state: running;
  opacity: 0.45;
}

@keyframes eq {
  0% {
    transform: scaleY(0.45);
  }
  100% {
    transform: scaleY(1);
  }
}

.player-copy {
  display: block;
  min-width: 0;
}

.player-copy strong,
.player-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-copy strong {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}

.player-copy small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.player-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 33px;
  height: 36px;
  padding: 0 5px;
  color: var(--ink-soft);
  font-size: 10px;
}

.player-mini .icon {
  width: 17px;
  height: 17px;
}

.player-close {
  color: var(--ink-faint);
}

.player-close .icon {
  width: 15px;
  height: 15px;
}

/* Game */
.game-page {
  padding: 28px 20px 46px;
}

.game-page .page-heading h1 {
  font-size: 48px;
}

.game-stage {
  max-width: 620px;
  margin: 26px auto 0;
}

.seal-stage {
  position: relative;
  min-height: 235px;
  overflow: hidden;
  text-align: center;
}

.seal-stage .stage-cloud {
  position: absolute;
  width: 280px;
  height: 95px;
  border-top: 1px solid var(--line);
  border-radius: 50%;
}

.seal-stage .stage-cloud.cloud-left {
  left: -40px;
  top: 82px;
  transform: rotate(-9deg);
}

.seal-stage .stage-cloud.cloud-right {
  right: -52px;
  top: 135px;
  transform: rotate(11deg);
}

.big-seal {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 134px;
  height: 134px;
  margin: 28px auto 18px;
  border: 2px solid rgba(166, 64, 54, 0.78);
  border-radius: 50%;
  color: #f8efe2;
  background:
    radial-gradient(circle at 35% 31%, rgba(255, 255, 255, 0.19), transparent 27%),
    repeating-radial-gradient(circle at 50% 50%, rgba(120, 37, 30, 0.08) 0 2px, transparent 2px 5px),
    var(--vermilion);
  box-shadow: 0 0 0 7px rgba(166, 64, 54, 0.08), 0 12px 34px rgba(166, 64, 54, 0.22);
  font-family: var(--serif);
  font-size: 70px;
  line-height: 1;
}

.big-seal:before,
.big-seal:after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 244, 226, 0.38);
  border-radius: 50%;
  pointer-events: none;
}

.big-seal:before {
  inset: 8px;
}

.big-seal:after {
  inset: 15px;
  border-style: dashed;
}

.game-stats {
  position: absolute;
  z-index: 3;
  top: 36px;
  right: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.9;
  text-align: left;
}

.game-stats strong {
  margin-left: 3px;
  color: var(--vermilion);
  font-size: 20px;
  font-weight: 500;
}

.game-question {
  margin: 7px 0 15px;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.07em;
  text-align: center;
}

.game-options {
  border-top: 1px solid var(--line);
}

.game-option {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 59px;
  padding: 10px 12px 10px 3px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.game-option .option-index {
  flex: 0 0 32px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 13px;
}

.game-option .option-text {
  flex: 1;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0.025em;
}

.game-option .option-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  height: 24px;
  color: transparent;
}

.game-option .option-mark .icon {
  width: 17px;
  height: 17px;
}

.game-option.is-correct {
  background: rgba(77, 116, 94, 0.08);
}

.game-option.is-correct .option-mark {
  color: #547c63;
}

.game-option.is-wrong {
  background: rgba(166, 64, 54, 0.08);
}

.game-option.is-wrong .option-mark {
  color: var(--vermilion);
}

.game-option:disabled {
  cursor: default;
}

.game-feedback {
  min-height: 39px;
  padding: 10px 2px 0;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.game-feedback strong {
  color: var(--jade);
  font-weight: 500;
}

.game-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.game-actions .btn-primary {
  flex: 1;
}

.game-char-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 7px;
}

.game-char {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 17px;
}

.game-char.is-active {
  color: #f8efe2;
  border-color: var(--vermilion);
  background: var(--vermilion);
}

.game-best {
  margin-top: 13px;
  color: var(--ink-faint);
  font-size: 11px;
  text-align: center;
}

.game-rules {
  max-width: 620px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.9;
}

/* Mine */
.mine-page {
  padding: 28px 20px 46px;
}

.mine-inner {
  max-width: 860px;
  margin: 0 auto;
}

.mine-hero {
  position: relative;
  padding: 26px 20px 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  text-align: center;
}

.mine-hero:before {
  content: "";
  position: absolute;
  top: -110px;
  left: 50%;
  width: 330px;
  height: 220px;
  border: 1px solid rgba(171, 135, 80, 0.14);
  border-radius: 50%;
  transform: translateX(-50%);
}

.mine-hero .mine-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  border: 1px solid var(--vermilion);
  border-radius: 50%;
  color: var(--vermilion);
  font-family: var(--serif);
  font-size: 31px;
}

.mine-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
  letter-spacing: 0.13em;
}

.mine-hero p {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.mine-stats {
  display: flex;
  justify-content: center;
  margin-top: 23px;
}

.mine-stat {
  flex: 1;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.mine-stat:last-child {
  border-right: 0;
}

.mine-stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.3;
}

.mine-stat span {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.mine-account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.26);
  text-align: left;
}

body[data-theme="night"] .mine-account {
  background: rgba(255, 255, 255, 0.04);
}

.mine-account-icon,
.mine-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.mine-account-icon {
  border: 1px solid var(--line-strong);
  color: var(--jade);
}

.mine-account-icon .icon {
  width: 19px;
  height: 19px;
}

.mine-avatar {
  border: 1px solid var(--vermilion);
  color: var(--vermilion);
  font-family: var(--serif);
  font-size: 17px;
}

.mine-account-text {
  flex: 1;
  min-width: 0;
}

.mine-account-text strong {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mine-account-text span {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.mine-account-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
}

.mine-account-actions .btn-quiet {
  min-height: 32px;
  padding: 5px 9px;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.mine-account-login {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 16px;
  border: 0;
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

@media (max-width: 560px) {
  .mine-account {
    flex-wrap: wrap;
  }

  .mine-account-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.section-heading .section-note {
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.section-heading .section-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--vermilion);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
}

.login-card {
  display: flex;
  flex-direction: column;
}

.login-lead {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: 0.03em;
}

.login-field {
  margin-bottom: 14px;
}

.login-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.login-field input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0.06em;
  -webkit-appearance: none;
  appearance: none;
}

body[data-theme="night"] .login-field input {
  background: rgba(0, 0, 0, 0.2);
}

.login-field input:focus {
  border-color: var(--vermilion);
  box-shadow: 0 0 0 3px rgba(166, 64, 54, 0.12);
  outline: none;
}

.login-code-row {
  display: flex;
  gap: 10px;
}

.login-code-row input {
  flex: 1;
  min-width: 0;
}

.login-send {
  flex: 0 0 auto;
  min-width: 116px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--jade);
  border-radius: 2px;
  background: transparent;
  color: var(--jade);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.18s ease, opacity 0.18s ease;
}

.login-send:hover:not(:disabled) {
  background: rgba(53, 86, 79, 0.09);
}

.login-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.login-hint {
  margin: 2px 0 16px;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.75;
}

.login-hint.is-error {
  color: var(--vermilion);
}

.login-submit {
  width: 100%;
  min-height: 48px;
  border: 0;
  font-family: var(--sans);
  font-size: 15px;
  cursor: pointer;
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.login-note {
  margin: 14px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.8;
}

.empty-retry {
  margin-top: 16px;
}

.mine-section {
  margin-top: 28px;
}

.mine-section h2 {
  margin: 0 0 13px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.09em;
}

.mine-list {
  border-top: 1px solid var(--line);
}

.mine-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}

.mine-row-main {
  flex: 1;
  min-width: 0;
}

.mine-row strong {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mine-row small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mine-row > .icon {
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
}

.settings-list {
  border-top: 1px solid var(--line);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}

.setting-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.setting-label .icon {
  width: 17px;
  height: 17px;
  color: var(--ink-faint);
}

.setting-value {
  color: var(--ink-soft);
  font-size: 12px;
}

.setting-segment {
  display: flex;
  border: 1px solid var(--line);
}

.setting-segment button {
  min-width: 46px;
  height: 30px;
  color: var(--ink-faint);
  font-size: 10px;
}

.setting-segment button.is-active {
  color: var(--paper-soft);
  background: var(--jade);
}

.about-note {
  margin-top: 26px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.85;
}

.about-note a {
  color: var(--jade-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: stretch;
  min-height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  border-top: 1px solid var(--line);
  background: rgba(248, 244, 234, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

body[data-theme="night"] .bottom-nav {
  background: rgba(22, 28, 27, 0.95);
}

.bottom-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.bottom-nav a.is-active {
  color: var(--vermilion);
}

.bottom-nav a.is-active:before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 26px;
  height: 1px;
  background: var(--vermilion);
  transform: translateX(-50%);
}

.nav-glyph {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 23px;
}

.nav-glyph-home:before {
  content: "";
  width: 16px;
  height: 13px;
  border: 1px solid currentColor;
  border-top: 0;
}

.nav-glyph-home:after {
  content: "";
  position: absolute;
  top: 2px;
  width: 12px;
  height: 12px;
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
  transform: rotate(45deg);
}

.nav-glyph-home i {
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 8px;
  border-left: 1px solid currentColor;
}

.nav-glyph-home b {
  display: none;
}

.nav-glyph-book:before,
.nav-glyph-book:after {
  content: "";
  position: absolute;
  top: 3px;
  width: 9px;
  height: 16px;
  border: 1px solid currentColor;
}

.nav-glyph-book:before {
  left: 2px;
  border-radius: 3px 0 0 3px;
}

.nav-glyph-book:after {
  right: 2px;
  border-radius: 0 3px 3px 0;
}

.nav-glyph-seal {
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
}

.nav-glyph-mine:before {
  content: "";
  position: absolute;
  top: 2px;
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.nav-glyph-mine:after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 17px;
  height: 9px;
  border: 1px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

/* Toast */
.toast {
  position: fixed;
  z-index: 120;
  right: 20px;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 24px);
  left: 20px;
  max-width: 420px;
  margin: 0 auto;
  padding: 11px 15px;
  border: 1px solid var(--line);
  color: var(--paper-soft);
  background: rgba(29, 41, 38, 0.92);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.player-open .toast {
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 88px);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(20, 26, 24, 0.48);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fade-in 0.22s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal-sheet {
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  background: var(--paper-soft);
  box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.22);
  animation: sheet-up 0.32s cubic-bezier(0.2, 0.8, 0.25, 1) both;
  -webkit-overflow-scrolling: touch;
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-soft);
}

.modal-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.modal-head .icon-button {
  width: 36px;
  height: 36px;
}

.modal-body {
  padding: 20px 18px calc(24px + var(--safe-bottom));
}

.voice-list {
  border-top: 1px solid var(--line);
}

.voice-option {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 13px;
  min-height: 69px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.voice-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--jade);
  font-family: var(--serif);
  font-size: 20px;
}

.voice-copy {
  flex: 1;
  min-width: 0;
}

.voice-copy strong {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.voice-copy small {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.5;
}

.voice-check {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
}

.voice-option.is-active .voice-check {
  color: var(--paper-soft);
  border-color: var(--vermilion);
  background: var(--vermilion);
}

.voice-check .icon {
  width: 13px;
  height: 13px;
}

.voice-group-label {
  margin: 25px 0 8px;
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.voice-note {
  margin: 17px 0 0;
  padding: 11px 12px;
  color: var(--ink-faint);
  background: rgba(53, 86, 79, 0.04);
  font-size: 10px;
  line-height: 1.7;
}

.tempo-row {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.tempo-button {
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}

.tempo-button.is-active {
  color: var(--paper-soft);
  background: var(--jade);
  border-color: var(--jade);
}

.recite-card {
  text-align: center;
}

.recite-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.recite-author {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 11px;
}

.recite-lines {
  margin: 28px auto;
  max-width: 560px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 2.25;
  letter-spacing: 0.09em;
}

.recite-line {
  min-height: 42px;
  opacity: 0.18;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.recite-line.is-revealed {
  opacity: 1;
}

.recite-line .masked {
  letter-spacing: 0.35em;
}

.recite-hint-count {
  color: var(--ink-faint);
  font-size: 10px;
}

.recite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-top: 20px;
}

.poster-wrap {
  text-align: center;
}

.poster-preview {
  width: min(100%, 360px);
  margin: 6px auto 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.poster-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.poster-actions .btn-primary,
.poster-actions .btn-ghost {
  min-width: 120px;
}

.result-card {
  padding: 13px 0 8px;
  text-align: center;
}

.result-card .seal {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  font-size: 28px;
}

.result-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
}

.result-score {
  margin: 14px 0;
  font-family: var(--serif);
  font-size: 54px;
  color: var(--vermilion);
}

.result-score small {
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 11px;
}

.result-meta {
  color: var(--ink-soft);
  font-size: 12px;
}

/* Desktop */
@media (min-width: 860px) {
  body:before {
    opacity: 0.16;
  }

  .app-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
  }

  .desktop-header {
    display: flex;
    align-items: center;
    min-height: 78px;
    border-bottom: 1px solid var(--line);
  }

  .desktop-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-right: 45px;
    font-family: var(--serif);
    font-size: 24px;
    letter-spacing: 0.12em;
  }

  .desktop-brand-copy {
    display: block;
  }

  .desktop-brand-copy > span {
    display: block;
    line-height: 1.1;
  }

  .desktop-brand-copy small {
    display: block;
    margin-top: 3px;
    color: var(--ink-faint);
    font-family: var(--serif);
    font-size: 9px;
    letter-spacing: 0.18em;
  }

  .desktop-nav {
    display: flex;
    align-self: stretch;
    gap: 34px;
  }

  .desktop-nav a {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 14px;
    letter-spacing: 0.08em;
  }

  .desktop-nav a.is-active {
    color: var(--vermilion);
  }

  .desktop-nav a.is-active:after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 16px;
    left: 0;
    height: 1px;
    background: var(--vermilion);
  }

  .header-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    margin-left: auto;
    color: var(--ink-soft);
  }

  .bottom-nav {
    display: none;
  }

  .main {
    padding-bottom: 76px;
  }

  body.player-open .main {
    padding-bottom: 104px;
  }

  .home-mobile-head {
    display: none;
  }

  .home {
    padding-top: 12px;
  }

  .hero-poem {
    min-height: 560px;
    margin-top: 16px;
    padding: 76px 55px 92px;
    border: 1px solid var(--line);
    text-align: left;
  }

  .hero-content {
    max-width: 660px;
    margin: 0;
  }

  .hero-title {
    font-size: 54px;
  }

  .hero-lines {
    max-width: 620px;
    margin-left: 0;
    font-size: 24px;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-moon {
    top: 80px;
    right: 9%;
    width: 180px;
    height: 180px;
  }

  .hero-footnote {
    text-align: right;
  }

  .home-body {
    padding: 42px 0 0;
  }

  .author-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .author-card {
    min-width: 0;
    min-height: 190px;
    padding: 24px 21px;
  }

  .author-card h3 {
    font-size: 28px;
  }

  .home-lower {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 54px;
    align-items: start;
    margin-top: 44px;
  }

  .quote-section,
  .game-invite {
    margin-top: 0;
  }

  .game-invite {
    min-height: 210px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .game-invite .invite-seal {
    position: absolute;
    right: 24px;
    bottom: 25px;
  }

  .mini-note {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .library,
  .mine-page,
  .game-page {
    padding: 38px 0 54px;
  }

  .page-heading {
    text-align: left;
  }

  .page-heading h1 {
    font-size: 66px;
  }

  .library .rainbow-rule {
    margin-left: 0;
  }

  .search-wrap {
    margin-left: 0;
  }

  .filter-scroll,
  .theme-scroll {
    margin-right: 0;
    margin-left: 0;
    padding: 0;
    overflow: visible;
  }

  .filter-row {
    justify-content: flex-start;
  }

  .library-meta,
  .poem-list {
    margin-left: 0;
  }

  .poem-row {
    padding: 21px 14px 21px 23px;
    transition: background 0.18s ease;
  }

  .poem-row:hover {
    background: rgba(255, 255, 255, 0.15);
  }

  .poem-row h3 {
    font-size: 25px;
  }

  .detail-topbar {
    min-height: 62px;
    margin: 0 -28px;
    padding-right: 32px;
    padding-left: 32px;
  }

  .detail-sheet {
    padding-top: 54px;
    padding-bottom: 120px;
  }

  .poem-head h1 {
    font-size: 53px;
  }

  .poem-text {
    font-size: calc(25px * var(--poem-scale));
  }

  .player {
    right: 50%;
    bottom: 18px;
    left: auto;
    width: 720px;
    max-width: calc(100vw - 40px);
    transform: translate(50%, 120%);
  }

  .player.is-visible {
    transform: translate(50%, 0);
  }

  body.player-open .toast {
    bottom: 104px;
  }

  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }

  .modal-sheet {
    max-width: 620px;
    max-height: 82vh;
    border-radius: 4px;
  }

  .game-stage {
    margin-top: 18px;
  }

  .seal-stage {
    min-height: 265px;
  }

  .big-seal {
    width: 154px;
    height: 154px;
    font-size: 81px;
  }

  .game-option:hover {
    background: rgba(255, 255, 255, 0.16);
  }

  .mine-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 42px;
    align-items: start;
  }

  .mine-main,
  .mine-side {
    min-width: 0;
  }

  .mine-hero {
    padding-top: 33px;
  }
}

/* Small phones and short screens */
@media (max-width: 360px) {
  .home-brand strong {
    font-size: 23px;
  }

  .hero-poem {
    min-height: 440px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-lines {
    font-size: 18px;
  }

  .hero-actions .btn-ghost,
  .hero-actions .btn-primary {
    min-width: 92px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .poem-head h1 {
    font-size: 37px;
  }

  .poem-text {
    font-size: calc(21px * var(--poem-scale));
    letter-spacing: 0.06em;
  }

  .game-option .option-text {
    font-size: 15px;
  }
}

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

@media print {
  .desktop-header,
  .bottom-nav,
  .player,
  .detail-topbar-actions,
  .reading-tools,
  .detail-actions,
  .nearby-nav,
  .toast {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .detail-sheet {
    max-width: 100%;
  }
}
