:root {
  color-scheme: light;
  --accent: #c76776;
  --accent-2: #e7aaa9;
  --character-wash: rgba(199, 103, 118, 0.23);
  --paper: color-mix(in srgb, #f8f4ef 93%, var(--accent));
  --paper2: color-mix(in srgb, #eee7e1 88%, var(--accent-2));
  --surface: color-mix(in srgb, #fffefd 96%, var(--accent-2));
  --ink: #292522;
  --muted: #746b65;
  --line: color-mix(in srgb, #d8cec7 88%, var(--accent));
  --soft: color-mix(in srgb, #f2ece7 88%, var(--accent-2));
  --danger: #a33c41;
  --radius: 24px;
  --gap: 16px;
  --fast: 160ms;
  --medium: 280ms;
  --slow: 600ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--paper);
}
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(
      ellipse 78% 55% at 0 0,
      var(--character-wash),
      transparent 72%
    ),
    radial-gradient(
      ellipse 58% 45% at 100% 28%,
      color-mix(in srgb, var(--accent-2) 15%, transparent),
      transparent 74%
    ),
    linear-gradient(
      145deg,
      var(--paper),
      color-mix(in srgb, var(--paper) 91%, var(--accent-2))
    );
  min-height: 100vh;
  transition:
    background-color var(--slow) var(--ease),
    color var(--medium) var(--ease);
}
body.dark {
  color-scheme: dark;
  --paper: color-mix(in srgb, #1d1c1b 90%, var(--accent));
  --paper2: color-mix(in srgb, #292624 88%, var(--accent-2));
  --surface: color-mix(in srgb, #292725 92%, var(--accent));
  --ink: #f4eee8;
  --muted: #bbb0a6;
  --line: color-mix(in srgb, #4d4540 82%, var(--accent));
  --soft: color-mix(in srgb, #35302b 88%, var(--accent));
  background:
    radial-gradient(
      ellipse 80% 58% at 0 0,
      color-mix(in srgb, var(--accent) 24%, transparent),
      transparent 70%
    ),
    radial-gradient(
      ellipse 58% 46% at 100% 35%,
      color-mix(in srgb, var(--accent-2) 12%, transparent),
      transparent 76%
    ),
    var(--paper);
}
[hidden] {
  display: none !important;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button {
  border: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: "Songti SC", "STSong", serif;
}
h1 {
  font-size: 44px;
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: 19px;
}
img {
  display: block;
  max-width: 100%;
}
small {
  font-size: 12px;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  padding: 12px;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}
a {
  color: var(--accent);
}
.app {
  max-width: 1120px;
  margin: auto;
  padding: 30px 24px 85px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 32px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  background: none;
  text-align: left;
  padding: 0;
  flex-shrink: 0;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--ink) 84%, var(--accent));
  color: var(--surface);
  display: grid;
  place-items: center;
  font-size: 25px;
}
.brand strong {
  display: block;
  font:
    900 21px "Songti SC",
    serif;
}
.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.nav-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.nav-button,
.icon-button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 0 13px;
  font-size: 13px;
}
.icon-button {
  width: 44px;
  font-size: 25px;
  flex-shrink: 0;
}
.nav-button.pro {
  color: var(--accent);
}
.shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.shell.no-companion {
  display: block;
  max-width: 760px;
  margin: auto;
}
.side {
  position: sticky;
  top: 24px;
}
.today {
  margin-bottom: 20px;
}
.today > span,
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 800;
}
.today h1 {
  margin: 12px 0 10px;
}
.today p {
  color: var(--muted);
  font-size: 13px;
}
.card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 65px color-mix(in srgb, var(--accent) 10%, transparent);
  transition:
    background-color var(--medium) var(--ease),
    border-color var(--medium) var(--ease),
    box-shadow var(--medium) var(--ease);
}
.companion {
  padding: 21px;
  overflow: hidden;
  background: linear-gradient(
    145deg,
    var(--surface),
    color-mix(in srgb, var(--surface) 85%, var(--accent-2))
  );
}
.companion-head {
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar,
.mini-avatar {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font:
    700 22px "Songti SC",
    serif;
  overflow: hidden;
}
.avatar img,
.mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.companion-meta {
  min-width: 0;
  flex: 1;
}
.companion-meta strong {
  font-size: 15px;
  display: block;
  overflow-wrap: anywhere;
}
.companion-meta span {
  font-size: 11px;
  color: var(--muted);
}
.text-btn {
  min-height: 44px;
  padding: 5px;
  background: none;
  color: var(--accent);
  font-size: 12px;
}
.speech {
  font:
    700 17px/1.85 "Songti SC",
    serif;
  min-height: 108px;
  padding: 20px 0;
  margin-top: 15px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.presence {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.presence .talk-button {
  margin-left: auto;
  min-height: 32px;
}
.presence i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6a9b73;
}
.composer {
  padding: 26px;
  background: linear-gradient(
    160deg,
    var(--surface) 55%,
    color-mix(in srgb, var(--surface) 91%, var(--accent-2))
  );
}
.composer h2 {
  margin-top: 8px;
}
.composer textarea {
  border: 0;
  padding: 0;
  min-height: 105px;
  margin: 16px 0;
  background: none;
  font-size: 17px;
}
.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.local-note {
  font-size: 11px;
  color: var(--muted);
}
.button-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 13px;
  padding: 10px 15px;
  font-size: 13px;
  transition: transform var(--fast) var(--ease);
}
.button:hover {
  transform: translateY(-1px);
}
.button.primary {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}
.button.quiet {
  background: none;
}
.danger {
  color: var(--danger);
}
.parse-preview {
  background: var(--soft);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 28px 2px 12px;
}
.section-heading h2 {
  font-size: 21px;
  margin-top: 5px;
}
.section-heading > span {
  font-size: 12px;
  color: var(--muted);
}
.task-tools {
  display: grid;
  gap: 10px;
  margin-bottom: 15px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.search-box span {
  font-size: 20px;
  color: var(--muted);
}
.search-box input {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
}
.task-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 1px 4px;
  scrollbar-width: thin;
}
.filter-chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.filter-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}
.task-list {
  display: grid;
  gap: 20px;
}
.task-group {
  display: grid;
  gap: 10px;
}
.task-group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 3px;
}
.task-group-title h3 {
  font-size: 16px;
}
.task-group-title span {
  color: var(--muted);
  font-size: 11px;
}
.completed-toggle {
  min-height: 48px;
  border: 1px dashed var(--line);
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0 15px;
}
.task {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 19px;
  overflow: hidden;
  box-shadow: 0 8px 26px color-mix(in srgb, var(--accent) 5%, transparent);
  transition:
    border-color var(--medium) var(--ease),
    background-color var(--medium) var(--ease),
    box-shadow var(--medium) var(--ease);
}
.task.important {
  border-left: 3px solid var(--accent);
}
.task-main {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 14px;
}
.task-title {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.task-copy {
  min-width: 0;
}
.task-date {
  min-height: 30px;
  margin: -5px 0 -5px -5px;
  padding: 5px;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: inherit;
}
.task-date:hover {
  background: var(--soft);
}
.task-date.overdue {
  color: var(--danger);
}
.inline-title-form input {
  min-height: 40px;
  padding: 7px 9px;
  font-size: 16px;
  font-weight: 700;
}
.task.done .task-title {
  text-decoration: line-through;
  color: var(--muted);
}
.subtask-list {
  display: grid;
  gap: 6px;
  padding: 0 14px 12px 68px;
}
.subtask-list > span {
  color: var(--muted);
  font-size: 10px;
}
.subtask {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 3px 0;
  background: none;
  text-align: left;
  font-size: 13px;
}
.subtask i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  font-style: normal;
  font-size: 11px;
}
.subtask.done {
  color: var(--muted);
  text-decoration: line-through;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.task-meta .overdue {
  color: var(--danger);
}
.task-check {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--soft) 78%, var(--accent-2));
  font-size: 21px;
  color: var(--accent);
}
.task details {
  padding: 0 14px 12px 68px;
  font-size: 12px;
  color: var(--muted);
}
.task summary {
  cursor: pointer;
  min-height: 32px;
  padding: 5px 0;
}
.task details p {
  overflow-wrap: anywhere;
  line-height: 1.7;
  margin: 8px 0;
}
.task details .original-note {
  opacity: 0.82;
}
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.quick-actions .button {
  min-height: 38px;
  padding: 7px 11px;
}
.completed-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
.empty {
  padding: 42px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  line-height: 1.9;
}
.empty .empty-icon {
  font-size: 33px;
  color: var(--accent);
}
.empty h3 {
  color: var(--ink);
  margin: 8px 0;
}
.main-column footer {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
  padding-top: 30px;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -70px;
  padding: 12px;
  background: var(--surface);
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #1d191980;
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal {
  width: min(740px, 100%);
  max-height: 90dvh;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 25px 90px #0004;
  padding: 26px;
  animation: appear var(--medium) var(--ease);
}
body.modal-open {
  overflow: hidden;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.modal-head h2 {
  margin: 6px 0;
}
.modal-head p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.modal-body {
  min-width: 0;
}
.modal-body p.help {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin: 12px 0;
}
.date-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.date-choice {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent-2));
  text-align: left;
}
.date-choice strong,
.date-choice span {
  display: block;
}
.date-choice span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.date-menu > .button {
  grid-column: 1 / -1;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.draft {
  padding: 17px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
}
.draft .warning {
  font-size: 12px;
  color: var(--danger);
  margin: 0 0 12px;
}
.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.setting strong {
  font-size: 14px;
}
.setting p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
}
.switch {
  flex-shrink: 0;
  width: 52px;
  height: 32px;
  border-radius: 20px;
  background: #bbb0a7;
  padding: 4px;
  position: relative;
  min-height: 44px;
  background: none;
}
.switch:before {
  content: "";
  position: absolute;
  inset: 7px 0;
  border-radius: 20px;
  background: #aaa198;
}
.switch:after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 4px;
  top: 11px;
  border-radius: 50%;
  background: white;
  transition: transform var(--fast);
}
.switch[aria-checked="true"]:before {
  background: var(--accent);
}
.switch[aria-checked="true"]:after {
  transform: translateX(22px);
}
.subheading {
  font:
    700 19px "Songti SC",
    serif;
  margin: 25px 0 13px;
}
.character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.character-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  background: var(--soft);
  min-width: 0;
}
.character-card.active {
  outline: 2px solid var(--accent);
}
.character-card .avatar {
  margin-bottom: 12px;
  background: var(--c, var(--accent));
}
.character-card strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.character-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  font: 700 10px system-ui;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 3px 6px;
  border-radius: 6px;
  margin-top: 6px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.art-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
  background: var(--soft);
  text-align: left;
  padding: 0;
}
.art-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}
.art-card.locked img {
  filter: saturate(0.45);
}
.art-caption {
  padding: 12px;
  font-size: 13px;
}
.art-caption small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.5;
}
.art-preview {
  max-width: 380px;
  margin: 0 auto 20px;
  border-radius: 12px;
  max-height: 58vh;
}
.collection {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.drop {
  display: flex;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  min-width: 0;
}
.drop.locked {
  opacity: 0.65;
}
.drop p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 6px;
}
.drop strong {
  font-size: 14px;
}
.artifact {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 32px;
  color: var(--accent);
}
.artifact svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.artifact.large {
  width: 100px;
  height: 100px;
  margin: 24px auto;
  font-size: 50px;
}
.artifact.large svg {
  width: 58px;
  height: 58px;
}
.artifact.legend,
.artifact.epic {
  color: #a96b2f;
  background: #bd83351a;
}
.reveal {
  text-align: center;
  padding: 10px 0 22px;
}
.reveal h3 {
  font-size: 25px;
}
.reveal p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin: 12px auto 22px;
  max-width: 400px;
}
.reveal .artifact {
  animation: reveal var(--slow) var(--ease);
}
.game-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.game-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 19px;
  text-align: left;
  overflow: hidden;
  padding: 16px;
}
.game-card .game-poster {
  height: 112px;
  display: grid;
  place-items: center;
  font-size: 62px;
  color: var(--c);
  font-family: serif;
}
.game-card strong {
  font-size: 15px;
}
.game-card p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 8px;
}
.game-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}
.game-help {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 15px 0;
}
.board-wrap {
  position: relative;
  max-width: 400px;
  margin: auto;
}
.game-board {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 21px;
  background: var(--soft);
  user-select: none;
}
.match-board {
  grid-template-columns: repeat(6, 1fr);
}
.number-board {
  grid-template-columns: repeat(4, 1fr);
  touch-action: none;
}
.bubble-board {
  grid-template-columns: repeat(5, 1fr);
}
.game-cell {
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 12px;
  background: var(--tile);
  color: #44352d;
  font-weight: 800;
  font-size: 25px;
  padding: 0;
}
.match-board .game-cell {
  font-size: 22px;
  color: #fffaf6;
  box-shadow:
    inset 0 3px 0 #fff4,
    inset 0 -4px 0 #0001;
}
.game-cell.selected {
  outline: 3px solid var(--ink);
  outline-offset: 1px;
  transform: scale(0.9);
}
.number-board .game-cell {
  font-size: clamp(18px, 5vw, 30px);
}
.bubble {
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 25%,
    #ffffffe6,
    #aecbc3 62%,
    #86aa9f
  );
  box-shadow:
    0 4px 5px #4a605329,
    inset 0 -3px 3px #678c8060;
}
.bubble.popped {
  background: var(--paper2);
  box-shadow: inset 0 2px 4px #0002;
  transform: scale(0.88);
  opacity: 0.8;
}
.game-result {
  min-height: 46px;
  padding: 15px 0;
  font-size: 13px;
  color: var(--accent);
  text-align: center;
}
.pause-cover {
  position: absolute;
  inset: 0;
  background: var(--surface);
  opacity: 0.96;
  border-radius: 21px;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.direction-pad {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.board-win {
  animation: win 350ms ease;
}
.pro-intro {
  padding: 24px;
  border-radius: 20px;
  background: var(--soft);
  margin-bottom: 24px;
}
.pro-price {
  font:
    700 45px "Songti SC",
    serif;
  margin: 12px 0;
}
.pro-price small {
  font: 12px system-ui;
  color: var(--muted);
}
.pro-intro p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}
.pro-strip {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding: 4px 3px 12px;
}
.pro-strip .character-card {
  min-width: 140px;
}
.activation {
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.more-grid {
  display: grid;
  gap: 10px;
}
.more-card {
  display: grid;
  gap: 5px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--soft);
  text-align: left;
}
.more-card strong {
  font:
    700 17px "Songti SC",
    serif;
}
.more-card span {
  color: var(--muted);
  font-size: 12px;
}
.status-text {
  font-size: 13px;
  line-height: 1.7;
  margin-top: 12px;
  color: var(--muted);
}
.interaction-bubble {
  position: fixed;
  z-index: 40;
  left: 24px;
  bottom: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  width: min(380px, calc(100% - 48px));
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 15px 45px #0002;
  animation: appear var(--medium) var(--ease);
}
.interaction-bubble p {
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.mobile-dock {
  display: none;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 15px);
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  background: var(--ink);
  color: var(--surface);
  padding: 13px 18px;
  border-radius: 16px;
  max-width: calc(100% - 30px);
  font-size: 13px;
  transition: var(--fast);
  width: max-content;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.undo {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 70;
  min-height: 44px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--surface);
  padding: 12px 18px;
  box-shadow: 0 7px 25px #0002;
}
.snowflake {
  position: fixed;
  top: -20px;
  pointer-events: none;
  z-index: 35;
  color: #9bacbf;
  animation: snow 2.2s linear forwards;
}
.storage-error {
  border: 1px solid var(--danger);
  background: var(--surface);
  padding: 16px;
  border-radius: 15px;
  line-height: 1.8;
  color: var(--danger);
  margin-bottom: 20px;
  font-size: 13px;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: scale(0.7) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes win {
  50% {
    transform: scale(0.98);
    filter: brightness(1.1);
  }
}
@keyframes snow {
  to {
    transform: translate(35px, 100vh);
    opacity: 0;
  }
}
@media (max-width: 850px) {
  .app {
    max-width: 720px;
  }
  .shell {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .side {
    position: static;
  }
  .today {
    display: flex;
    gap: 13px;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }
  .today h1 {
    font-size: 30px;
    margin: 0;
  }
  .today > span {
    display: none;
  }
  .speech {
    min-height: 0;
    padding: 13px 0;
  }
  .companion {
    padding: 17px;
  }
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .nav-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 500px) {
  html {
    scroll-padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }
  .app {
    padding: 14px 13px calc(128px + env(safe-area-inset-bottom));
  }
  .topbar {
    margin-bottom: 15px;
  }
  .brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 13px;
    font-size: 21px;
  }
  .brand strong {
    font-size: 18px;
  }
  .brand small {
    margin-top: 1px;
    font-size: 10px;
  }
  .nav-actions {
    display: none;
  }
  .shell {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .main-column {
    order: 1;
  }
  .side {
    order: 2;
    margin-top: 34px;
  }
  .today {
    display: none;
  }
  .companion {
    padding: 16px;
  }
  .speech {
    font-size: 15px;
    line-height: 1.75;
  }
  .composer {
    padding: 19px 17px 16px;
    border-radius: 22px;
  }
  .composer textarea {
    min-height: 84px;
    margin: 13px 0;
    font-size: 16px;
  }
  .composer-footer {
    align-items: flex-end;
    flex-wrap: wrap;
  }
  .composer-footer .button-row {
    margin-left: auto;
  }
  .local-note {
    font-size: 10px;
  }
  .composer h2 {
    font-size: 22px;
  }
  .section-heading {
    scroll-margin-top: 12px;
    margin-top: 23px;
  }
  .task-tools {
    margin-bottom: 12px;
  }
  .overlay {
    align-items: end;
    padding: 0;
  }
  .modal {
    width: 100%;
    max-height: 91dvh;
    padding: 12px 16px calc(19px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
  }
  .modal::before {
    content: "";
    display: block;
    width: 38px;
    height: 4px;
    margin: 0 auto 13px;
    border-radius: 999px;
    background: var(--line);
  }
  .character-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .game-cards {
    grid-template-columns: 1fr;
  }
  .game-card {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 0 12px;
  }
  .game-card .game-poster {
    grid-row: 1/4;
    height: 80px;
    font-size: 43px;
  }
  .game-card p {
    margin: 4px 0;
  }
  .collection {
    grid-template-columns: 1fr;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .game-board {
    gap: 5px;
    padding: 8px;
  }
  .game-cell {
    border-radius: 9px;
  }
  .match-board .game-cell {
    font-size: 20px;
  }
  .task-main {
    padding: 12px;
    gap: 8px;
  }
  .task-title {
    min-height: 34px;
  }
  .task-date {
    min-height: 34px;
  }
  .interaction-bubble {
    left: 14px;
    bottom: calc(94px + env(safe-area-inset-bottom));
    width: calc(100% - 28px);
  }
  .toast {
    bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .undo {
    right: 14px;
    bottom: calc(105px + env(safe-area-inset-bottom));
  }
  .pro-intro {
    padding: 18px;
  }
  .setting {
    gap: 10px;
  }
  .setting .button {
    padding: 10px;
    flex-shrink: 0;
  }
  .modal h2 {
    font-size: 24px;
  }
  .mobile-dock {
    position: fixed;
    z-index: 45;
    left: 10px;
    right: 10px;
    bottom: max(9px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    min-height: 68px;
    padding: 7px 8px;
    border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
    border-radius: 23px;
    background: color-mix(in srgb, var(--surface) 91%, transparent);
    box-shadow:
      0 15px 46px #1d191926,
      inset 0 1px color-mix(in srgb, white 65%, transparent);
    backdrop-filter: blur(18px) saturate(1.15);
    transition:
      transform var(--medium) var(--ease),
      opacity var(--fast) var(--ease),
      background-color var(--medium) var(--ease);
  }
  .dock-item,
  .dock-add {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 53px;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
  }
  .dock-item span {
    height: 21px;
    font-size: 17px;
    font-weight: 800;
    line-height: 21px;
  }
  .dock-item small,
  .dock-add small {
    font-size: 9px;
    white-space: nowrap;
  }
  .dock-item.active {
    color: var(--accent);
    background: color-mix(in srgb, var(--soft) 78%, var(--accent-2));
  }
  .dock-add {
    min-height: 62px;
    margin-top: -14px;
    color: var(--surface);
    background: color-mix(in srgb, var(--ink) 86%, var(--accent));
    box-shadow: 0 9px 24px color-mix(in srgb, var(--accent) 28%, #0002);
  }
  .dock-add span {
    font-size: 28px;
    line-height: 25px;
  }
  body.keyboard-open .mobile-dock {
    opacity: 0;
    pointer-events: none;
    transform: translateY(120%);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.modal-head {
  align-items: flex-start;
}
.modal-head > .icon-button {
  height: 44px;
}
.nav-button {
  white-space: nowrap;
}
.nav-actions .nav-button {
  flex-basis: auto;
}
.modal-open > .undo {
  display: none;
}
.task summary {
  min-height: 44px;
  display: list-item;
  padding: 12px 0;
}
.game-toolbar .button {
  min-width: 56px;
}
@media (max-width: 360px) {
  .nav-actions .nav-button {
    padding: 0 9px;
  }
  .match-board {
    gap: 4px;
    padding: 4px;
  }
  .match-board .game-cell {
    border-radius: 8px;
  }
}
