:root {
  --paper: #fff8ed;
  --paper-deep: #f7ead4;
  --paper-soft: #fffdf6;
  --ink: #3d3026;
  --muted: #876f5f;
  --line: #d7bda0;
  --line-soft: #ead9c3;
  --wood: #9d6742;
  --wood-dark: #70472d;
  --pink: #f3a5ad;
  --pink-soft: #ffe3e3;
  --sage: #9dbb91;
  --mint: #dcebd7;
  --sky: #9fc6dd;
  --blue-soft: #dcebf2;
  --butter: #f5d37d;
  --peach: #f4bf91;
  --lavender: #c9bddf;
  --shadow: 0 18px 45px rgba(96, 62, 34, 0.18);
  --tiny-shadow: 0 8px 20px rgba(96, 62, 34, 0.1);
  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --fallback-scene:
    radial-gradient(circle at 76% 26%, rgba(250, 210, 120, 0.95) 0 15px, transparent 16px),
    linear-gradient(135deg, transparent 0 49%, rgba(255, 250, 241, 0.45) 50% 53%, transparent 54%),
    radial-gradient(ellipse at 28% 72%, rgba(126, 158, 118, 0.78) 0 42px, transparent 43px),
    radial-gradient(ellipse at 64% 78%, rgba(95, 132, 105, 0.72) 0 58px, transparent 59px),
    linear-gradient(180deg, #b9d8e8 0%, #e8d9c3 58%, #d6e6cf 100%);
  color-scheme: light;
  font-family: "Segoe Print", "Comic Sans MS", "KaiTi", "STKaiti", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 220, 224, 0.55) 0 58px, transparent 59px),
    radial-gradient(circle at 88% 12%, rgba(211, 231, 216, 0.6) 0 72px, transparent 73px),
    linear-gradient(135deg, #f9ead7 0%, #fff8ee 42%, #f5ead8 100%);
  color: var(--ink);
  overflow-x: hidden;
}

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

button {
  color: inherit;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(360px, 430px) minmax(240px, 320px);
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
  justify-content: center;
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 30px 18px;
}

.app-shell.is-locked {
  grid-template-columns: minmax(320px, 430px);
}

.desk-panel {
  position: sticky;
  top: 28px;
  border: 2px solid rgba(104, 75, 52, 0.24);
  border-radius: 24px;
  background: rgba(255, 250, 239, 0.78);
  box-shadow: var(--tiny-shadow);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.desktop-shelf {
  padding: 18px;
}

.shelf-title {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.2;
}

.mini-book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mini-book {
  min-height: 118px;
  padding: 10px;
  border: 1.5px solid rgba(81, 54, 37, 0.18);
  border-radius: 12px;
  background: var(--cover, #d9e8d2);
  box-shadow: inset 0 -18px 24px rgba(65, 37, 23, 0.08), 0 5px 10px rgba(74, 50, 32, 0.1);
  text-align: left;
  cursor: pointer;
}

.mini-book strong,
.book-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.mini-book span,
.book-card span {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  color: rgba(61, 48, 38, 0.74);
}

.book-card small {
  display: block;
  margin-top: 7px;
  color: rgba(61, 48, 38, 0.72);
  font-size: 10px;
  line-height: 1.28;
}

.book-unique {
  color: rgba(61, 48, 38, 0.62);
}

.book-duplicate {
  display: inline-flex;
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid rgba(214, 110, 121, 0.32);
  border-radius: 999px;
  background: rgba(255, 238, 241, 0.78);
  color: #a94c5a;
}

.quick-note {
  margin-top: 16px;
  padding: 12px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.auth-message {
  margin: 0;
  padding: 10px 12px;
  border: 1.5px dashed rgba(214, 110, 121, 0.42);
  border-radius: 13px;
  background: rgba(255, 236, 226, 0.7);
  color: #a94c5a;
  font-size: 13px;
  line-height: 1.45;
}

.access-token-input {
  min-height: 94px;
  resize: vertical;
}

.side-note {
  padding: 18px;
}

.side-note h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.side-note ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-note li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(155, 119, 89, 0.28);
  font-size: 13px;
  line-height: 1.45;
}

.side-dot {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid var(--pink);
  border-radius: 50%;
  background: var(--paper-soft);
}

.phone {
  position: relative;
  min-height: min(900px, calc(100vh - 60px));
  border: 2.5px solid #44352b;
  border-radius: 35px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.phone::before {
  content: "";
  position: absolute;
  inset: 10px 52px auto;
  height: 4px;
  border-radius: 10px;
  background: rgba(61, 48, 38, 0.18);
  z-index: 10;
}

.phone-status {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
  padding: 9px 18px 0;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #2f261f;
}

.status-icons {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.signal,
.battery {
  display: inline-block;
  border: 1.5px solid currentColor;
}

.signal {
  width: 13px;
  height: 9px;
  border-width: 0 0 1.5px 1.5px;
  transform: skew(-12deg);
}

.battery {
  position: relative;
  width: 18px;
  height: 9px;
  border-radius: 2px;
}

.battery::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 2px;
  width: 2px;
  height: 3px;
  background: currentColor;
}

.screen {
  position: relative;
  height: calc(100% - 32px);
  min-height: calc(min(900px, 100vh - 60px) - 32px);
  padding: 14px 16px 86px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(161, 120, 91, 0.42) transparent;
  background:
    linear-gradient(rgba(210, 178, 138, 0.12) 1px, transparent 1px) 0 78px / 100% 29px,
    radial-gradient(circle at 15px 110px, rgba(245, 165, 173, 0.13) 0 16px, transparent 17px),
    radial-gradient(circle at calc(100% - 18px) 350px, rgba(157, 187, 145, 0.16) 0 22px, transparent 23px),
    var(--paper);
}

.screen::-webkit-scrollbar {
  width: 7px;
}

.screen::-webkit-scrollbar-thumb {
  background: rgba(161, 120, 91, 0.42);
  border-radius: 20px;
}

.page-head {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.page-head:has(.head-actions) {
  grid-template-columns: 34px 1fr 78px;
}

.page-head h1 {
  margin: 0;
  text-align: center;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0;
}

.icon-btn,
.small-icon-btn {
  display: inline-grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 246, 0.82);
  box-shadow: 0 3px 0 rgba(154, 104, 62, 0.12);
  cursor: pointer;
}

.icon-btn {
  width: 34px;
  height: 34px;
}

.small-icon-btn {
  width: 28px;
  height: 28px;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1.5px solid rgba(169, 118, 87, 0.34);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.74);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.primary-btn,
.ghost-btn,
.soft-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 999px;
  border: 1.5px solid rgba(117, 78, 54, 0.22);
  padding: 0 18px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-btn {
  background: linear-gradient(180deg, #f8bac1, #ee8f9b);
  color: #fffdf8;
  box-shadow: 0 7px 0 rgba(175, 96, 99, 0.2);
  font-weight: 700;
}

.primary-btn:disabled,
.ghost-btn:disabled,
.soft-btn:disabled {
  opacity: 0.68;
  cursor: wait;
  transform: none;
}

.ghost-btn {
  background: rgba(255, 253, 246, 0.74);
  color: var(--ink);
}

.soft-btn {
  background: var(--mint);
  color: #37513b;
}

.primary-btn:hover,
.ghost-btn:hover,
.soft-btn:hover,
.icon-btn:hover,
.small-icon-btn:hover {
  transform: translateY(-1px);
}

.bottom-nav {
  position: absolute;
  z-index: 7;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 62px;
  border: 1.5px solid rgba(104, 75, 52, 0.2);
  border-radius: 22px;
  background: rgba(255, 252, 244, 0.92);
  box-shadow: 0 -6px 18px rgba(96, 62, 34, 0.08);
  backdrop-filter: blur(10px);
}

.nav-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 11px;
  cursor: pointer;
}

.nav-item.is-active {
  color: #d66e79;
}

.nav-item .icon {
  width: 21px;
  height: 21px;
}

.sticker {
  position: absolute;
  pointer-events: none;
  color: var(--pink);
  opacity: 0.9;
}

.flower {
  width: 34px;
  height: 34px;
}

.flower::before,
.flower::after,
.petal {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 999px 999px 999px 0;
  background: rgba(255, 227, 227, 0.8);
}

.flower::before {
  left: 10px;
  top: 0;
  transform: rotate(45deg);
}

.flower::after {
  left: 10px;
  bottom: 0;
  transform: rotate(225deg);
}

.flower .petal:nth-child(1) {
  left: 0;
  top: 10px;
  transform: rotate(-45deg);
}

.flower .petal:nth-child(2) {
  right: 0;
  top: 10px;
  transform: rotate(135deg);
}

.flower .petal:nth-child(3) {
  left: 12px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--butter);
}

.home-title {
  position: relative;
  margin: 8px 0 14px;
  text-align: center;
  font-size: 29px;
  line-height: 1.12;
}

.home-title::after {
  content: "";
  display: block;
  width: 160px;
  height: 10px;
  margin: -3px auto 0;
  border-radius: 99px;
  background: rgba(244, 191, 145, 0.52);
}

.shelf-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
}

.shelf-search {
  min-width: 0;
}

.shelf-clean {
  min-height: 40px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

.bookshelf {
  position: relative;
  min-height: 610px;
  padding: 18px 18px 24px;
  border-radius: 20px 20px 8px 8px;
}

.shelf-board {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 32px;
  border: 2px solid rgba(96, 58, 32, 0.34);
  border-radius: 9px;
  background: linear-gradient(180deg, #b98258, #8e5838);
  box-shadow: 0 8px 12px rgba(74, 45, 27, 0.18);
}

.shelf-board.one {
  top: 150px;
}

.shelf-board.two {
  top: 360px;
}

.shelf-board.three {
  top: 560px;
}

.book-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 12px;
  padding-top: 20px;
}

.book-card {
  position: relative;
  min-height: 128px;
  padding: 0;
  overflow: hidden;
  border: 1.5px solid rgba(63, 44, 32, 0.25);
  border-radius: 8px 8px 3px 3px;
  background: var(--cover, #dcebd7);
  box-shadow: inset 0 -24px 24px rgba(37, 26, 20, 0.1), 4px 5px 8px rgba(67, 41, 25, 0.18);
  text-align: left;
  cursor: default;
  transform: rotate(var(--tilt, -1deg));
}

.book-open {
  display: block;
  width: 100%;
  min-height: 128px;
  padding: 10px 46px 10px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.book-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(117, 78, 54, 0.18);
  border-radius: 50%;
  background: rgba(255, 253, 246, 0.86);
  color: #b45f64;
  box-shadow: 0 3px 7px rgba(74, 45, 27, 0.12);
  cursor: pointer;
}

.book-delete .icon {
  width: 16px;
  height: 16px;
}

.empty-shelf {
  grid-column: 1 / -1;
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1.5px dashed rgba(113, 78, 54, 0.32);
  border-radius: 16px;
  background: rgba(255, 253, 246, 0.72);
  text-align: center;
}

.empty-shelf strong {
  font-size: 19px;
}

.empty-shelf span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.book-card .cover-photo {
  height: 56px;
  margin: 10px 0 0;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background-image: var(--photo), var(--fallback-scene);
  background-size: cover;
  background-position: center;
}

.shelf-props {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  z-index: 2;
  margin-top: 122px;
}

.prop-camera,
.prop-plant,
.prop-globe {
  position: relative;
}

.prop-camera {
  width: 74px;
  height: 46px;
  border: 3px solid #5a4437;
  border-radius: 10px;
  background: #f1e3cd;
}

.prop-camera::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 9px;
  width: 26px;
  height: 26px;
  border: 4px solid #5a4437;
  border-radius: 50%;
  background: #c5d7dd;
}

.prop-camera::after {
  content: "";
  position: absolute;
  left: 10px;
  top: -10px;
  width: 24px;
  height: 12px;
  border: 3px solid #5a4437;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #e1b88b;
}

.prop-plant {
  width: 48px;
  height: 56px;
}

.prop-plant::before {
  content: "";
  position: absolute;
  left: 9px;
  bottom: 0;
  width: 30px;
  height: 24px;
  border: 2px solid #6d523c;
  border-radius: 4px 4px 12px 12px;
  background: #dfb17c;
}

.prop-plant::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 38px;
  height: 34px;
  background:
    radial-gradient(ellipse at 12px 19px, #7fb078 0 11px, transparent 12px),
    radial-gradient(ellipse at 26px 14px, #96bf7e 0 12px, transparent 13px),
    radial-gradient(ellipse at 20px 25px, #6b9d67 0 12px, transparent 13px);
}

.prop-globe {
  width: 64px;
  height: 64px;
  border: 3px solid #6d523c;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 20px 26px, rgba(131, 178, 128, 0.9) 0 12px, transparent 13px),
    radial-gradient(ellipse at 42px 38px, rgba(131, 178, 128, 0.9) 0 13px, transparent 14px),
    #a9d4e7;
}

.prop-globe::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -14px;
  height: 13px;
  border: 3px solid #6d523c;
  border-top: 0;
  border-radius: 0 0 16px 16px;
}

.floating-add {
  position: fixed;
  z-index: 8;
  width: 54px;
  height: 54px;
  right: max(22px, calc(50% - 205px));
  bottom: 94px;
  border: 2px solid rgba(116, 73, 52, 0.25);
  border-radius: 50%;
  background: linear-gradient(180deg, #f8b3ba, #ee8290);
  color: #fff;
  box-shadow: 0 9px 18px rgba(205, 102, 112, 0.32);
  cursor: pointer;
}

.create-form,
.paper-panel {
  position: relative;
  border: 1.5px solid rgba(113, 78, 54, 0.2);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(246, 214, 176, 0.12) 1px, transparent 1px) 0 0 / 18px 100%,
    rgba(255, 253, 246, 0.84);
  box-shadow: var(--tiny-shadow);
}

.create-form {
  padding: 18px 16px 20px;
}

.paper-panel {
  padding: 15px;
}

.form-row {
  margin-bottom: 14px;
}

.form-row label,
.label {
  display: block;
  margin-bottom: 6px;
  color: #5b4739;
  font-size: 13px;
  font-weight: 700;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1.5px solid rgba(135, 100, 72, 0.24);
  border-radius: 13px;
  background: rgba(255, 253, 246, 0.86);
  color: var(--ink);
  outline: 0;
}

.input,
.select {
  min-height: 42px;
  padding: 0 12px;
}

.textarea {
  min-height: 142px;
  padding: 12px;
  resize: vertical;
  line-height: 1.65;
}

.demand-textarea {
  min-height: 96px;
}

.form-status {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1.5px dashed rgba(214, 110, 121, 0.42);
  border-radius: 13px;
  background: rgba(255, 238, 241, 0.74);
  color: #8e4d55;
  font-size: 12px;
  line-height: 1.55;
}

.form-status.is-loading {
  border-color: rgba(132, 171, 122, 0.52);
  background: rgba(230, 241, 225, 0.78);
  color: #45633f;
}

.field-error {
  margin: 6px 2px 0;
  color: #a94c5a;
  font-size: 12px;
  line-height: 1.45;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 32px;
  padding: 0 12px;
  border: 1.5px solid rgba(135, 100, 72, 0.22);
  border-radius: 999px;
  background: rgba(255, 246, 237, 0.9);
  color: #6c5545;
  font-size: 12px;
  cursor: pointer;
}

.chip.is-selected,
.chip.is-active {
  background: var(--pink-soft);
  border-color: rgba(221, 121, 131, 0.45);
  color: #a94c5a;
}

.airplane {
  width: 112px;
  height: 72px;
  margin: 0 auto 8px;
  color: #9ba8b6;
}

.airplane svg {
  width: 100%;
  height: 100%;
  fill: rgba(202, 217, 231, 0.65);
  stroke: #71818f;
}

.overview-cover {
  position: relative;
  padding: 18px 18px 16px;
  border: 2px solid rgba(115, 82, 58, 0.22);
  border-radius: 12px;
  background: rgba(255, 253, 246, 0.9);
  box-shadow: 0 8px 0 rgba(133, 89, 60, 0.08);
}

.overview-cover::before,
.diary-detail::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 10px;
  height: 18px;
  border-radius: 3px;
  background: rgba(241, 161, 170, 0.38);
  transform: rotate(-4deg);
}

.photo-frame {
  position: relative;
  height: 210px;
  border: 8px solid #fffaf0;
  border-bottom-width: 24px;
  border-radius: 7px;
  background-image: var(--photo), var(--fallback-scene);
  background-size: cover;
  background-position: center;
  box-shadow: 0 7px 14px rgba(64, 42, 29, 0.18);
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.overview-meta {
  margin: 13px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

.module-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.module-row {
  display: grid;
  grid-template-columns: 30px 1fr 18px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 7px 10px;
  border: 1.5px solid rgba(112, 80, 56, 0.13);
  border-radius: 13px;
  background: rgba(255, 253, 246, 0.64);
  text-align: left;
  cursor: pointer;
}

.module-row:hover {
  background: rgba(255, 236, 226, 0.75);
}

.module-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mint);
  color: #55714f;
}

.chev {
  width: 9px;
  height: 9px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 4px 0 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab {
  flex: 0 0 auto;
  min-height: 33px;
  min-width: 58px;
  padding: 0 12px;
  border: 1.5px solid rgba(135, 100, 72, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.8);
  color: var(--muted);
  cursor: pointer;
}

.tab.is-active {
  background: var(--pink-soft);
  color: #a54b59;
  border-color: rgba(221, 121, 131, 0.4);
}

.day-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 12px;
}

.day-title h2 {
  margin: 0;
  font-size: 24px;
}

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 10px;
  border-left: 2px dashed rgba(147, 103, 72, 0.36);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 74px;
  margin-bottom: 12px;
  padding-right: 84px;
}

.timeline-item > div:not(.thumb) {
  min-width: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 5px;
  width: 12px;
  height: 12px;
  border: 2px solid #c99166;
  border-radius: 50%;
  background: var(--paper-soft);
}

.time {
  padding-top: 1px;
  color: #8d5e43;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.stop-title {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
}

.stop-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.thumb {
  position: absolute;
  top: 0;
  right: 0;
  width: 76px;
  height: 58px;
  border: 4px solid #fffaf0;
  border-radius: 8px;
  background-image: var(--photo), var(--fallback-scene);
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 8px rgba(80, 50, 31, 0.14);
}

.map-wrap {
  position: relative;
  height: 430px;
  border: 1.5px solid rgba(113, 78, 54, 0.18);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(120, 155, 171, 0.18) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(rgba(120, 155, 171, 0.18) 1px, transparent 1px) 0 0 / 42px 42px,
    #f4ead9;
}

.real-map-wrap {
  background: #e8efe8;
}

.real-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 430px;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
}

.map-loading {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.map-pin-label {
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.map-legend {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 410;
  max-height: 158px;
  overflow: auto;
  border: 1.5px solid rgba(104, 75, 52, 0.18);
  border-radius: 14px;
  background: rgba(255, 253, 246, 0.92);
  padding: 8px;
}

.route-meta {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
}

.map-attribution {
  margin: 8px 4px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.route-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  font-size: 12px;
}

.route-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #6e88bb;
  color: #fff;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.media-list,
.hotel-list,
.info-list,
.budget-list,
.plan-list,
.diary-list {
  display: grid;
  gap: 10px;
}

.media-card,
.hotel-card,
.info-card,
.budget-row,
.plan-card,
.diary-card {
  border: 1.5px solid rgba(113, 78, 54, 0.16);
  border-radius: 15px;
  background: rgba(255, 253, 246, 0.72);
}

.media-card,
.hotel-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 9px;
}

.media-img,
.hotel-img {
  min-height: 82px;
  border-radius: 11px;
  border: 4px solid #fffaf0;
  background-image: var(--photo), var(--fallback-scene);
  background-size: cover;
  background-position: center;
}

.media-card h3,
.hotel-card h3,
.plan-card h3 {
  margin: 2px 0 4px;
  font-size: 16px;
  line-height: 1.25;
}

.media-card p,
.hotel-card p,
.plan-card p,
.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.rating {
  margin-top: 7px;
  color: #c77d4d;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.info-card,
.plan-card {
  padding: 13px;
}

.info-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: start;
}

.info-key {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 10px;
  background: #f5e2c2;
  color: #7b593d;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.transport-group {
  margin-bottom: 16px;
}

.transport-group h2,
.section-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.transport-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(155, 119, 89, 0.26);
}

.transport-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: #557087;
}

.transport-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.transport-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.budget-total {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 102px;
  margin-bottom: 12px;
  border: 1.5px dashed rgba(199, 125, 77, 0.38);
  border-radius: 18px;
  background: rgba(255, 245, 230, 0.76);
}

.budget-total span {
  color: var(--muted);
  font-size: 13px;
}

.budget-total strong {
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 40px;
  letter-spacing: 0;
}

.budget-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  min-height: 42px;
  padding: 7px 10px;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 13px;
}

.budget-mark {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--c, #ddd);
}

.pie-area {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
}

.pie {
  width: 128px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#ef9ba3 0 25%, #f2c979 25% 56%, #9dbb91 56% 75%, #9fc6dd 75% 90%, #c9bddf 90% 100%);
  border: 6px solid rgba(255, 253, 246, 0.86);
  box-shadow: 0 5px 12px rgba(80, 50, 31, 0.16);
}

.pie-legend {
  display: grid;
  gap: 6px;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 12px;
  color: var(--muted);
}

.legend-line {
  display: grid;
  grid-template-columns: 13px 1fr auto;
  gap: 7px;
  align-items: center;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c);
}

.plan-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.diary-card {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.diary-open {
  display: grid;
  grid-template-columns: 1fr 114px;
  gap: 10px;
  width: 100%;
  padding: 12px;
  padding-right: 46px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.diary-delete {
  position: absolute;
  right: 9px;
  top: 9px;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(117, 78, 54, 0.18);
  border-radius: 50%;
  background: rgba(255, 253, 246, 0.9);
  color: #b45f64;
  cursor: pointer;
}

.diary-delete .icon {
  width: 16px;
  height: 16px;
}

.diary-card h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.diary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.diary-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.diary-photos span {
  min-height: 44px;
  border: 3px solid #fffaf0;
  border-radius: 8px;
  background-image: var(--photo), var(--fallback-scene);
  background-size: cover;
  background-position: center;
}

.diary-detail {
  position: relative;
  padding: 18px;
  border: 1.5px solid rgba(113, 78, 54, 0.18);
  border-radius: 18px;
  background: rgba(255, 253, 246, 0.8);
}

.diary-polaroids {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.head-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.polaroid {
  height: 126px;
  border: 7px solid #fffaf0;
  border-bottom-width: 22px;
  border-radius: 6px;
  background-image: var(--photo), var(--fallback-scene);
  background-size: cover;
  background-position: center;
  box-shadow: 0 7px 13px rgba(70, 44, 27, 0.14);
  transform: rotate(var(--tilt, -2deg));
}

.mood-row {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.star-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(135, 100, 72, 0.2);
  border-radius: 50%;
  background: rgba(255, 253, 246, 0.72);
  color: #caa45b;
  cursor: pointer;
}

.star-btn.is-active {
  background: #fff0bd;
  border-color: #e1b34a;
}

.edit-list {
  display: grid;
  gap: 10px;
}

.edit-row {
  display: grid;
  grid-template-columns: 68px 1fr 34px;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1.5px solid rgba(113, 78, 54, 0.15);
  border-radius: 14px;
  background: rgba(255, 253, 246, 0.72);
}

.edit-row .input {
  min-height: 36px;
  font-size: 12px;
}

.edit-row .textarea {
  grid-column: 1 / -1;
  min-height: 72px;
  font-size: 12px;
}

.edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

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

.avatar {
  width: 94px;
  height: 94px;
  margin: 8px auto 11px;
  border: 4px solid #fffaf0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, #f6d1b9 0 23px, transparent 24px),
    radial-gradient(circle at 38% 35%, #4b3429 0 4px, transparent 5px),
    radial-gradient(circle at 62% 35%, #4b3429 0 4px, transparent 5px),
    radial-gradient(ellipse at 50% 25%, #5d3b2f 0 37px, transparent 38px),
    #f5dfc2;
  box-shadow: 0 6px 12px rgba(72, 45, 27, 0.15);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.stat {
  border: 1.5px solid rgba(113, 78, 54, 0.14);
  border-radius: 14px;
  background: rgba(255, 253, 246, 0.72);
  padding: 10px 6px;
}

.stat strong {
  display: block;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 19px;
}

.stat span {
  color: var(--muted);
  font-size: 11px;
}

.empty {
  padding: 22px 16px;
  text-align: center;
  color: var(--muted);
  line-height: 1.6;
}

.empty-guide {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.empty-guide h2 {
  margin: 0;
  font-size: 22px;
}

.empty-guide p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: minmax(320px, 430px);
    padding: 18px 10px;
  }

  .desk-panel {
    display: none;
  }
}

@media (max-width: 520px) {
  body {
    background: var(--paper);
  }

  .app-shell {
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .phone {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .screen {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    padding-inline: 14px;
    padding-bottom: 18px;
  }

  .bottom-nav {
    position: static;
    flex: 0 0 auto;
    margin: 0 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .page-head {
    grid-template-columns: 44px 1fr 44px;
  }

  .page-head:has(.head-actions) {
    grid-template-columns: 44px 1fr 92px;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .small-icon-btn,
  .star-btn {
    width: 40px;
    height: 40px;
  }

  .tab {
    min-height: 40px;
    min-width: 66px;
  }

  .airplane {
    display: none;
  }

  .create-form {
    padding: 12px 14px 16px;
  }

  .form-row {
    margin-bottom: 10px;
  }

  .demand-textarea {
    min-height: 76px;
  }

  .input,
  .select {
    min-height: 40px;
  }

  .home-title {
    margin-top: 6px;
    margin-bottom: 8px;
    font-size: 27px;
  }

  .bookshelf {
    min-height: 560px;
    padding: 8px 14px 20px;
  }

  .book-grid {
    gap: 12px 9px;
    padding-top: 8px;
  }

  .book-card {
    min-height: 134px;
  }

  .book-open {
    min-height: 134px;
    padding: 8px 46px 8px 7px;
  }

  .book-card .cover-photo {
    height: 42px;
    margin-top: 8px;
  }

  .book-card small {
    font-size: 9px;
    line-height: 1.22;
  }

  .shelf-board.one {
    top: 128px;
  }

  .shelf-board.two {
    top: 294px;
  }

  .shelf-board.three {
    top: 462px;
  }

  .shelf-props {
    margin-top: 84px;
  }

  .module-list {
    gap: 10px;
  }

  .module-row {
    min-height: 50px;
    border-style: dashed;
    background:
      linear-gradient(90deg, rgba(246, 214, 176, 0.16) 1px, transparent 1px) 0 0 / 18px 100%,
      rgba(255, 253, 246, 0.76);
  }

  .floating-add {
    right: 22px;
  }

  .timeline-item {
    grid-template-columns: 48px minmax(0, 1fr);
    padding-right: 74px;
  }

  .thumb {
    width: 66px;
  }

  .map-wrap {
    height: auto;
    min-height: 0;
  }

  .real-map {
    position: relative;
    inset: auto;
    height: 360px;
    min-height: 360px;
  }

  .map-legend {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    max-height: none;
    margin: 8px;
  }
}

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