/* ==========================================================================
 *    阳光查询 · 共用样式表
 *       暖色「小店」主题 / 移动端优先 / 无外部依赖（离线内网可用）
 *          ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --paper: #faf7f0;
  --paper-2: #f2ede2;
  --card: rgba(255, 255, 255, 0.9);
  --card-solid: #fffdf9;
  --line: rgba(60, 54, 42, 0.1);
  --line-strong: rgba(60, 54, 42, 0.16);

  --ink: #2f3237;
  --ink-2: #5d6068;
  --ink-3: #8b8d94;
  --ink-4: #b3b4b9;

  --sun: #f6b73c;
  --sun-deep: #e0972a;
  --sun-soft: #ffe6ac;
  --sky: #6c9ff0;
  --sky-deep: #4a7fd8;
  --mint: #34b98a;
  --mint-deep: #229a70;
  --coral: #e8634c;
  --coral-deep: #cf4a34;
  --rose: #d2698b;
  --rose-deep: #bd4368;

  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 12px;

  --shadow-sm: 0 2px 8px rgba(60, 54, 42, 0.06);
  --shadow: 0 14px 38px rgba(72, 62, 42, 0.12), 0 2px 8px rgba(72, 62, 42, 0.05);
  --shadow-lg: 0 26px 70px rgba(72, 62, 42, 0.16), 0 4px 14px rgba(72, 62, 42, 0.06);

  --ease: cubic-bezier(0.22, 0.68, 0.36, 1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 224, 158, 0.55), transparent 42%),
    radial-gradient(circle at 88% 6%, rgba(214, 230, 255, 0.5), transparent 40%),
    radial-gradient(circle at 50% 108%, rgba(255, 232, 190, 0.6), transparent 55%),
    linear-gradient(168deg, var(--paper) 0%, var(--paper-2) 100%);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

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

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

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

[hidden] {
  display: none !important;
}

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

/* ---------- 页面骨架 ---------- */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(20px + var(--safe-top)) 18px calc(20px + var(--safe-bottom));
}

.page--top {
  align-items: flex-start;
  padding-top: calc(28px + var(--safe-top));
}

/* 历史页：手机上给固定底栏留出空间 */
.page--with-bar {
  padding-bottom: calc(120px + var(--safe-bottom));
}

.page--column {
  flex-direction: column;
  gap: 14px;
}

.card {
  position: relative;
  width: 100%;
  max-width: 460px;
  padding: 40px 30px 34px;
  background: rgba(255, 254, 251, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  /* clip 既裁掉溢出的装饰线，又不会像 hidden 那样破坏内部的 sticky 定位 */
  overflow: hidden;
  overflow: clip;
  animation: cardIn 0.5s var(--ease) both;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--sun), var(--sky), transparent);
  opacity: 0.85;
}

.card--wide {
  max-width: 720px;
  padding: 30px 24px 26px;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 太阳图标 ---------- */
.sun {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fffaea, #ffd873 52%, #f0ad2b 100%);
  box-shadow: 0 0 0 1px rgba(214, 168, 58, 0.3), 0 14px 30px rgba(232, 176, 60, 0.33);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.sun::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(246, 183, 60, 0.55) 0deg 3.4deg,
    transparent 3.4deg 22.5deg
  );
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 59%);
  mask: radial-gradient(circle, transparent 58%, #000 59%);
  animation: sunSpin 60s linear infinite;
  pointer-events: none;
}

.sun > svg {
  width: 40px;
  height: 40px;
  display: block;
}

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

/* 可点击的太阳（隐藏入口） */
.sun--tap {
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  cursor: pointer;
}

.sun--tap.is-pressed {
  transform: scale(0.93);
  box-shadow: 0 0 0 1px rgba(214, 168, 58, 0.4), 0 8px 18px rgba(232, 176, 60, 0.4);
}

/* 连点进度小圆点 */
.tap-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 26px;
  height: 8px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.tap-dots.is-visible {
  opacity: 1;
}

.tap-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(60, 54, 42, 0.14);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.tap-dots span.is-on {
  background: var(--sun-deep);
  transform: scale(1.25);
}

/* ---------- 文案 ---------- */
.brand {
  margin-top: 26px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 18px auto 0;
  padding: 6px 16px;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-4);
}

.pill--closed::before {
  background: var(--coral);
}

.pill--open::before {
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(52, 185, 138, 0.18);
}

.center {
  text-align: center;
}

.poem {
  margin-top: 26px;
  text-align: center;
  font-size: 1.06rem;
  line-height: 2.1;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.poem--soft {
  margin-top: 22px;
  font-size: 0.88rem;
  line-height: 2;
  color: var(--ink-3);
}

.divider {
  width: 40px;
  height: 1px;
  margin: 26px auto;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.signature {
  margin-top: 30px;
  text-align: center;
  font-size: 0.66rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--ink-4);
}

/* ---------- 登录弹层 ----------
 *    连点太阳 5 次后，登录框以弹层形式出现在屏幕正中间。
 *       以前是接在打烊文案下面，手机上要往下滑才看得到，等于「点了却没反应」。 */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(20px + var(--safe-top)) 18px calc(20px + var(--safe-bottom));
  background: rgba(56, 48, 34, 0.44);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.26s var(--ease) both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 弹层打开时锁住背景滚动 */
body.is-locked {
  overflow: hidden;
}

.login-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  /* margin:auto：内容比屏幕矮时垂直居中；比屏幕高时仍能从头滚到底 */
  margin: auto;
  padding: 26px 22px 24px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: revealUp 0.42s var(--ease) both;
}

.login-box__close {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink-3);
  border-radius: 50%;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.login-box__close:hover,
.login-box__close:active {
  color: var(--ink);
  background: rgba(60, 54, 42, 0.07);
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.login-panel__title {
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--ink-3);
  margin-bottom: 20px;
}

.field {
  margin-bottom: 14px;
  text-align: left;
}

.field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}

.input {
  width: 100%;
  padding: 13px 15px;
  font-size: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

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

.input:focus {
  outline: none;
  background: #fff;
  border-color: var(--sun);
  box-shadow: 0 0 0 4px rgba(246, 183, 60, 0.16);
}

textarea.input {
  min-height: 118px;
  line-height: 1.7;
  resize: vertical;
  /* 聚焦时让浏览器把输入框滚到吸底按钮上方，别被挡住 */
  scroll-margin-bottom: calc(96px + var(--safe-bottom));
}

.alert {
  margin-bottom: 16px;
  padding: 11px 14px;
  font-size: 0.86rem;
  color: var(--coral-deep);
  background: rgba(232, 99, 76, 0.09);
  border: 1px solid rgba(232, 99, 76, 0.22);
  border-radius: var(--radius-sm);
  text-align: center;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    filter 0.18s var(--ease), opacity 0.18s;
  touch-action: manipulation;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--block {
  width: 100%;
  margin-top: 8px;
}

.btn--sun {
  background: linear-gradient(180deg, #ffc85c, var(--sun-deep));
  color: #4a3410;
  box-shadow: 0 8px 22px rgba(224, 151, 42, 0.32);
}

.btn--sky {
  background: linear-gradient(180deg, #7fadf5, var(--sky-deep));
  box-shadow: 0 8px 22px rgba(74, 127, 216, 0.28);
}

.btn--mint {
  background: linear-gradient(180deg, #45c996, var(--mint-deep));
  box-shadow: 0 8px 22px rgba(34, 154, 112, 0.26);
}

.btn--coral {
  background: linear-gradient(180deg, #f0785f, var(--coral-deep));
  box-shadow: 0 8px 22px rgba(207, 74, 52, 0.26);
}

.btn--ghost {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.btn[disabled],
.btn.is-busy {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn.is-busy {
  pointer-events: none;
}

.inline-link {
  color: var(--sky-deep);
  border-bottom: 1px dashed rgba(74, 127, 216, 0.5);
  cursor: pointer;
}

/* ---------- 主页面 ---------- */
.hero {
  position: relative;
  padding: 22px 20px;
  border-radius: var(--radius);
  text-align: center;
  overflow: hidden;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.hero--on {
  background: linear-gradient(150deg, #fff3d2, #ffe0a3 65%, #ffd489);
  border: 1px solid rgba(224, 151, 42, 0.28);
}

.hero--off {
  background: linear-gradient(150deg, #eef1f6, #dfe6f0 70%, #d3dcea);
  border: 1px solid rgba(90, 110, 140, 0.2);
}

.hero__icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(120, 100, 50, 0.22));
}

.hero__text {
  margin-top: 8px;
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: #4a3a17;
}

.hero--off .hero__text {
  color: #3f4a5c;
}

.hero__sub {
  margin-top: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: rgba(74, 58, 23, 0.62);
}

.hero--off .hero__sub {
  color: rgba(63, 74, 92, 0.6);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.topbar__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.topbar__title-strong {
  color: var(--rose-deep);
}

.topbar__title-nowrap {
  white-space: nowrap;
}

.topbar__user {
  flex: 0 0 auto;
  margin-top: 2px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--ink-3);
}

.section {
  margin-top: 24px;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section__title {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.actions .btn {
  width: 100%;
}

/* 已读开关 */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--ink-2);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  min-height: 32px;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__track {
  position: relative;
  width: 44px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(60, 54, 42, 0.16);
  transition: background 0.24s var(--ease);
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s var(--ease);
}

.switch input:checked + .switch__track {
  background: var(--mint);
}

.switch input:checked + .switch__track::after {
  transform: translateX(19px);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--sun-deep);
  outline-offset: 3px;
}

/* 留言卡片 */
.note-card {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-left: 3px solid var(--sun);
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--ink);
}

/* 桌面端鼠标划过时轻轻抬起，跟整体暖色主题呼应 */
@media (hover: hover) {
  .note-card {
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
      border-color 0.18s var(--ease);
  }

  .note-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
  }
}

.note-card__text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.note-card + .note-card {
  margin-top: 12px;
}

.note-card--latest {
  border-left-color: var(--sky);
}

.note-card__time {
  margin-top: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-align: right;
}

.meta-line {
  margin-top: 6px;
  font-size: 0.74rem;
  color: var(--ink-4);
  text-align: right;
}

/* ---------- 历史页面 ---------- */
.hist-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line-strong);
}

.hist-head__badge {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  line-height: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fffaea, #ffd873 55%, #f0ad2b 100%);
  box-shadow: 0 0 0 1px rgba(214, 168, 58, 0.28), 0 8px 18px rgba(232, 176, 60, 0.26);
}

.hist-head__text {
  min-width: 0;
}

.hist-head__title {
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.hist-head__sub {
  margin-top: 3px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* 留言列表：用有序列表承载，样式仍沿用暖色留言卡片 */
.timeline {
  list-style: none;
  margin-top: 16px;
}

.timeline__item + .timeline__item {
  margin-top: 12px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
  flex-wrap: wrap;
}

.pager__info {
  flex: 1 1 100%;
  order: -1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* 翻页按钮跟主页面其它按钮保持同一种「描边」风格 */
.pager__btn {
  min-height: 42px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  color: var(--sky-deep);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line-strong);
  box-shadow: none;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.pager__btn:hover {
  background: #fff;
  border-color: rgba(108, 159, 240, 0.6);
}

.pager__btn.is-disabled {
  color: var(--ink-4);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  box-shadow: none;
  pointer-events: none;
}

.pager__btn:active {
  transform: translateY(1px);
}

.bottom-bar {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--safe-bottom));
  transform: translateX(-50%);
  width: min(92vw, 460px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 10px;
  background: rgba(255, 253, 249, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 40;
}

.bottom-bar .btn {
  min-height: 44px;
}

.empty {
  padding: 46px 10px;
  text-align: center;
  color: var(--ink-3);
}

.empty__icon {
  font-size: 2rem;
  opacity: 0.5;
}

.empty__text {
  margin-top: 10px;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
}

/* ---------- 轻提示 ---------- */
.toasts {
  position: fixed;
  top: calc(16px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 420px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
  pointer-events: none;
}

.toast {
  padding: 12px 18px;
  font-size: 0.9rem;
  text-align: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  animation: toastIn 0.32s var(--ease) both;
}

.toast--ok {
  border-color: rgba(52, 185, 138, 0.4);
}

.toast--err {
  border-color: rgba(232, 99, 76, 0.4);
  color: var(--coral-deep);
}

.toast.is-out {
  animation: toastOut 0.28s var(--ease) both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* 主页面底部主操作（保存留言 / 退出登录） */
.actions--primary {
  margin-top: 18px;
}

/* 手机上吸底：不管页面多长，这两个按钮始终在屏幕内够得着 */
@media (max-width: 720px) {
  .actions--primary {
    position: sticky;
    bottom: calc(6px + var(--safe-bottom));
    z-index: 20;
    margin: 16px -6px -8px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 253, 249, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 22px rgba(72, 62, 42, 0.12);
  }
}

/* ---------- 移动端适配 ---------- */
@media (min-width: 721px) {
  /* 宽屏不需要固定底栏，让它跟着卡片排在下方 */
  .page--with-bar {
    padding-bottom: calc(28px + var(--safe-bottom));
  }

  .bottom-bar {
    position: static;
    transform: none;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-sm);
  }
}

@media (max-width: 520px) {
  .page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .card {
    padding: 28px 18px 22px;
    border-radius: var(--radius-lg);
  }

  .card--wide {
    padding: 22px 16px 18px;
    border-radius: var(--radius);
  }

  .brand {
    font-size: 1.32rem;
  }

  /* 手机上一屏放不下，整页紧凑一点：关键内容尽量落在首屏内 */
  .hero {
    padding: 16px 14px;
  }

  .hero__icon {
    font-size: 1.8rem;
  }

  .hero__text {
    font-size: 1.08rem;
    margin-top: 6px;
  }

  .hero__sub {
    font-size: 0.72rem;
  }

  .topbar {
    margin-bottom: 16px;
    gap: 8px;
  }

  .topbar__title {
    font-size: 0.92rem;
    letter-spacing: 0.01em;
  }

  .section {
    margin-top: 18px;
  }

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

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

  .note-card {
    padding: 12px 14px;
    font-size: 0.94rem;
  }

  .hist-head {
    gap: 12px;
    padding-bottom: 14px;
  }

  .hist-head__badge {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .hist-head__title {
    font-size: 1.08rem;
  }

  .login-box {
    padding: 22px 18px 20px;
  }

  .btn {
    font-size: 0.96rem;
    padding: 12px 14px;
  }

  .pager__btn {
    flex: 1;
  }
}

@media (max-width: 340px) {
  .actions {
    grid-template-columns: 1fr;
  }
}

/* ---------- 无障碍：减少动画 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

