:root {
  color-scheme: light;
  color: #213b48;
  background: #f5f5ee;
  --accent: #6b854c;
  --muted: #6b7b7d;
  --lock-image: none;
}

.game::before {
  background: radial-gradient(ellipse at 52% 35%, #dcecf2e6 0%, #edf3e8ed 48%, #f6f3eaf0 77%),
    var(--backdrop) center 54% / cover no-repeat, #f6f3ea;
}
.game::after {
  background: radial-gradient(ellipse at 8% 85%, #f5dfab58, transparent 50%),
    radial-gradient(ellipse at 95% 8%, #dfebd35c, transparent 47%);
}
.page-header, .page-footer { border-color: #82989b35; }
.brand { color: #29434b; }
.brand-mark { border-color: #a1ab78; }
.brand-type, .header-credit, .saved, .page-footer { color: #697f83; }
.header-credit { font-size: 10px; letter-spacing: .04em; font-weight: 400; }
.header-divider { background: #93a2a063; }
.tool-button { color: #567177; border-color: #82959858; background: #fff9; }
.tool-button:hover, .tool-button[aria-pressed="true"] { color: #4e6e40; border-color: #859b66; background: #edf3db; }
.saved i { background: #829d69; box-shadow: none; }

.story-intro { max-width: 390px; }
.eyebrow { color: #526f6c; letter-spacing: .18em; }
.eyebrow > span:first-child { color: #9daf7d; }
.hero-title { position: relative; margin: 10px 0 5px; }
#story-title { color: #bc7c13; margin: 18px 0 3px; }
.hero-title:has(.hero-title-art) #story-title { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.hero-title-art { display: block; width: min(100%, 365px); aspect-ratio: 1.29; height: auto; object-fit: contain; object-position: left center; filter: drop-shadow(0 1px 1px #736b3b99); }
.english-title { color: #667d81; letter-spacing: .28em; }
.intro-line { background: #96aaa6; margin: 25px 0 16px; }
.story-intro p { color: #36525e; font-size: 14px; max-width: 260px; }
.primary-button, .profile-next { color: #332a14; background: #ffcd44; border-color: #f6bc2c; box-shadow: 0 5px 16px #ba982d25; }
.primary-button:hover, .profile-next:hover { background: #ffdb69; }
.intro-caption { color: #6f837d; }
.story-panel { color: #344e57; background: #fffdf8bd; border-color: #97adaa5e; box-shadow: 0 12px 34px #81938b13; }
.progress-count, .chapter, .panel-bottom { color: #63787a; }
.progress-track { background: #cbd8ce; }
.progress-track div { background: #839c69; }
.chapter strong { color: #37515a; }
.chapter .chapter-dot { border-color: #acafa264; }
.chapter.current { background: #e9f0de; }
.chapter.current strong, .chapter.current .chapter-dot { color: #4e6c42; }
.chapter.current .chapter-dot { border-color: #a2b78c; background: #eff4e6; }
.chapter.completed .chapter-dot { color: #617b54; }
.panel-bottom { border-color: #b7c3bb9f; }
.page-footer i { background: #9b9d64; }

.phone {
  background: linear-gradient(120deg, #efeeea, #b4b7ad 52%, #edf1eb 75%, #b3b7ac);
  border-color: #a4a9a0;
  box-shadow: 0 0 0 1px #edf3ed, inset 0 0 0 2px #ecece1,
    0 22px 38px #304b5038, 0 4px 9px #40525626;
}
.edge-button { background: #a5ada2; }
.phone-screen { background: #f7fbf0; }
.status-bar { color: #24363a; }
.phone-screen:not(.light) .status-bar { color: #fff; }

.profile-screen { overflow-y: auto; justify-content: safe center; padding-top: calc(var(--status-height, 42px) + 4px); color: #2c4b53; background: #fbfcf6; }
.profile-cover {
  flex: none;
  padding: 0 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.creator-credit { color: #5e6e74; font-size: 9px; letter-spacing: .09em; font-weight: 500; }
.profile-title-lockup {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}
.phone-title {
  display: grid;
  place-items: center;
  margin: 5px 0 0;
  width: 78%;
  min-height: 0;
  color: #b77d20;
  font: 700 clamp(30px, 12cqw, 52px)/1.03 var(--serif);
}
.phone-title-art { width: 100%; max-width: 259px; aspect-ratio: 1.29; object-fit: contain; filter: drop-shadow(0 1px 1px #736b3b99); }
.profile-title-captions {
  position: absolute;
  inset-block-start: 17%;
  inset-inline: min(70%, calc(50% + 65px)) -4px;
  display: grid;
  gap: 4px;
  text-align: left;
  color: #526762;
  line-height: 1.35;
}
.profile-title-format { font-size: clamp(9px, 2.65cqw, 10px); }
.profile-title-english { margin-inline-start: 5px; font-size: clamp(8px, 2.45cqw, 10px); letter-spacing: .07em; }
.profile-form { flex: none; display: grid; gap: 4px; padding: 2px 7% calc(30px + env(safe-area-inset-bottom,0px)); }
.profile-person { display: grid; grid-template-columns: 57px minmax(0,1fr); gap: 11px; align-items: center; padding: 6px 10px 7px; border: 1px solid #dfe7db; border-radius: 11px; background: #f5f8ef; }
.profile-photo-control { position: relative; display: grid; place-items: center; gap: 2px; cursor: pointer; }
.profile-avatar { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; overflow: hidden; color: white; font-size: 17px; position: relative; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #b4c4b1; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.profile-photo-caption { font-size: 9px; color: #526e72; }
.profile-image-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.profile-photo-control:focus-within .profile-avatar { outline: 2px solid #b38d35; outline-offset: 3px; }
.profile-name-stack { display: grid; gap: 4px; }
.profile-name-label { font-size: 11px; font-weight: 650; color: #45616a; }
.profile-name { color: #213b48; background: #fffefa; width: 100%; height: 33px; border-radius: 7px; border: 1px solid #b8cbc17f; padding: 0 10px; font-size: 13px; }
.profile-name::placeholder { color: #687e82; opacity: 1; }
.profile-photo-message { color: #a14d36; font-size: 10px; }
.profile-photo-message:empty { display: none; }
.profile-next { margin-top: 7px; min-height: 41px; display: flex; justify-content: center; align-items: center; gap: 10px; border: 1px solid #f6bc2c; border-radius: 8px; font-size: 13px; font-weight: 750; }
.profile-next svg { font-size: 15px; }

.lock-screen {
  color: #294853;
  padding: calc(var(--status-height,42px) + 6px) 7% calc(25px + env(safe-area-inset-bottom,0px));
  overflow: auto;
  align-items: stretch;
  text-align: center;
  justify-content: space-between;
  background: linear-gradient(180deg,#eaf6f6bd,#dceef5d1 52%,#e8f1ddd9),
    var(--lock-image) center 65% / cover no-repeat, #e5f2f7;
}
.lock-clock { display: grid; justify-items: center; gap: 6px; position: relative; }
.lock-clock > svg { width: 17px; height: 17px; }
.lock-date { font-size: 12px; color: #45646e; }
.lock-time { font-size: clamp(42px, 20cqw, 81px); font-weight: 620; line-height: 1; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.lock-code { padding-top: 9px; }
.lock-code h2 { font-size: 14px; margin: 0 0 9px; }
.lock-dots { display: flex; justify-content: center; gap: 12px; }
.lock-dots span { width: 9px; height: 9px; border: 1px solid #45636d; border-radius: 50%; }
.lock-dots .filled { background: #45636d; }
.lock-feedback { margin: 4px 0 1px; min-height: 17px; font-size: 10px; color: #a64b45; }
.lock-numbers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(5px, 1.7cqw, 11px); max-width: 235px; margin: 0 auto; justify-items: center; align-items: center; }
.pass-key { width: clamp(41px, 16cqw, 64px); height: clamp(41px, 16cqw, 64px); border-radius: 50%; background: #ffffffa6; border: 1px solid #f8fff9; box-shadow: 0 2px 5px #476e711a; display: grid; align-content: center; justify-items: center; color: #26404b; transition: background .15s; }
.pass-key:hover { background: #fff; }
.pass-key span { font: 500 clamp(16px, 6.2cqw, 25px)/1.05 system-ui,sans-serif; }
.pass-key small { font-size: 8px; font-weight: 680; letter-spacing: .11em; }
.pass-zero { grid-area: 4 / 2; }
.pass-profile { grid-area: 4 / 1; }
.pass-erase { grid-area: 4 / 3; }
.pass-edit { font-size: 11px; padding: 4px; min-height: 40px; color: #345762; }

.home-screen {
  background: var(--wallpaper) center / cover no-repeat,
    linear-gradient(153deg,#d8eaf4 4%,#e6f0dd 55%,#fcf0c9);
}
.home-screen::before { background: linear-gradient(180deg,#eef9f67d,#f9f7e71b 40%,#f9f8e996 100%); }
.home-heading h2, .home-chapter, .home-date { color: #284f57; text-shadow: 0 1px 8px #eaf6f6; }
.notification { background: #fffdf0be; color: #2e4b51; border-color: #fffbefc2; }
.notification:hover { background: #f8fff4e3; }
.notification-text strong { color: #27464d; }
.notification-text span { color: #536d75; }
.app-entry { color: #334f50; text-shadow: 0 1px 4px #fffc; }

@media (max-width: 630px) and (orientation: portrait) {
  .profile-form { padding-inline: max(7%, 23px); }
  .home-screen .tool-button { background: #eef5e9bb; }
}
@media (max-height: 615px) {
  .phone-title-art { max-width: 185px; }
  .profile-title-captions { inset-inline-start: min(70%, calc(50% + 48px)); }
  .lock-numbers { gap: 5px; }
  .pass-key { height: 43px; width: 43px; }
}

.music-screen { background: linear-gradient(160deg,#faedf2,#f4f2fa 62%,#e6edf5); color: #45384b; }
.music-screen .app-nav { border-color: #77698832; }
.music-content .track-cover { box-shadow: 0 8px 23px #66577735; }
.music-progress, .now-playing p { color: #6d5e74; }
.music-progress input { accent-color: #9c5577; }
.track-row { color: #574860; background: #e5dbea; }
.track-row[aria-current="true"] { background: #ead4df; color: #713d5b; }
.dialog { color: #31464b; background: #fcfcf6; border-color: #9baaa4; }
.dialog p { color: #4a666e; }
.phone-screen[data-screen="home"] .home-indicator { color: #334c4b; }

@media (max-width: 630px) {
  .profile-name, .compose-input, .moment-composer-text { font-size: 16px; }
}

.icon-weibo { background: linear-gradient(145deg,#ffcd72,#f38f62); color: #763c31; }

.wake-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--status-height,42px) + 12px) 7% calc(28px + env(safe-area-inset-bottom,0px));
  color: #fdf2dd;
  background: radial-gradient(ellipse at 52% 26%,#474040,#1b1b22 70%);
  text-align: center;
  touch-action: none;
}
.wake-lock-glyph { width: 18px; height: 18px; margin-bottom: 12px; }
.wake-date { color: #e9d9c5; font-size: 13px; }
.wake-time { font: 600 clamp(52px,22cqw,88px)/1 system-ui,sans-serif; letter-spacing: -.06em; }
.wake-swipe, .wake-reopen {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid #f5e0be7a;
  border-radius: 22px;
  color: #fff4d9;
  background: #6c5d4c5e;
  font-size: 13px;
}
.wake-swipe { position: absolute; bottom: calc(50px + env(safe-area-inset-bottom,0px)); }
.wake-swipe svg { transform: rotate(-90deg); }
.wake-memory {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(98%, 330px);
  padding: 12px;
  animation: wake-recollection 2.28s cubic-bezier(.28,.56,.5,1) both;
}
.wake-portrait { width: 100%; min-width: 0; aspect-ratio: 1.65; border-radius: 7px; object-fit: cover; }
.wake-memory p { margin: 0; color: #ffe896; font: 600 clamp(14px, 6cqw, 25px)/1.3 var(--serif); }
.wake-memory:not(:has(img:not([hidden]))) { display: flex; justify-content: center; }
@keyframes wake-recollection {
  0% { transform: scale(.85); opacity: 0; }
  19% { opacity: 1; }
  65% { opacity: 1; }
  100% { transform: scale(1.23); opacity: 0; }
}
.wake-prompt {
  width: min(100%, 296px);
  padding: 21px 17px;
  border: 1px solid #ffecce46;
  border-radius: 15px;
  background: #efdfc616;
}
.wake-prompt > svg { width: 18px; height: 18px; margin: 0 auto; }
.wake-prompt h2 { font-size: 19px; margin: 10px 0 6px; }
.wake-prompt p { color: #ead9bf; font-size: 12px; margin: 0 0 12px; }
