:root {
  color-scheme: light;
  --bg-page: #f7f4ec;
  --bg-surface: #fffdf9;
  --bg-muted: #f1ede1;
  --text-primary: #211f19;
  --text-secondary: #7c7768;
  --text-tertiary: #b0aa9c;
  --ink: #211f19;
  --ink-deep: #16140f;
  --ink-text: #f7f0dd;
  --gold-primary: #c9973f;
  --gold-dark: #8b6427;
  --gold-soft: #f3e7c9;
  --gold-bright: #e9b949;
  --green-muted: #78896a;
  --border-default: #e7e0d2;
  --danger: #b95046;
  --overlay: rgba(24, 24, 22, 0.42);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --shadow: 0 8px 24px rgba(55, 45, 30, 0.06);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC",
    "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #ebe5da;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 252, 247, 0.95), transparent 34rem),
    linear-gradient(135deg, #eee8dd, #e8e0d3);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

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

svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 100;
  min-height: 44px;
  padding: 10px 16px;
  color: #fff;
  background: var(--text-primary);
  border-radius: var(--radius-sm);
  transform: translate(-50%, -150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: 3px;
}

.viewport-frame {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: clip;
  background:
    radial-gradient(circle at 90% 5%, rgba(201, 151, 63, 0.08), transparent 14rem),
    var(--bg-page);
  box-shadow: 0 0 42px rgba(45, 38, 27, 0.12);
}

.demo-strip {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 16px;
  color: #665c4d;
  background: var(--gold-soft);
  border-bottom: 1px solid rgba(139, 100, 39, 0.16);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.demo-dot {
  width: 7px;
  height: 7px;
  background: var(--gold-dark);
  border-radius: 50%;
}

.page-content {
  min-height: calc(100vh - 32px);
  padding: 20px 16px 48px;
  outline: none;
}

.page-content.has-bottom-nav {
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

.loading-state {
  min-height: 520px;
  padding: 20px 0;
}

.skeleton {
  background: var(--bg-muted);
  border: 1px solid rgba(229, 222, 210, 0.7);
  border-radius: var(--radius-sm);
  animation: skeleton-breathe 1.4s ease-in-out infinite alternate;
}

.skeleton--title {
  width: 54%;
  height: 34px;
  margin-top: 8px;
}

.skeleton--copy {
  width: 76%;
  height: 18px;
  margin-top: 14px;
}

.skeleton--surface {
  height: 116px;
  margin-top: 30px;
  border-radius: var(--radius-md);
}

.skeleton--row {
  height: 72px;
  margin-top: 12px;
  border-radius: var(--radius-md);
}

.skeleton--row-short {
  width: 82%;
}

.loading-state--detail .skeleton--surface {
  height: 168px;
}

.loading-state--grid .skeleton--surface {
  height: 196px;
}

@keyframes skeleton-breathe {
  from { opacity: 1; }
  to { opacity: 0.62; }
}

.brand-header {
  position: relative;
  min-height: 212px;
  margin: -20px -16px 0;
  padding: 38px 20px 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #fdfbf5 0%, #fbf8ef 55%, rgba(251, 248, 239, 0) 100%);
}

.pond-scene {
  position: absolute;
  top: 14px;
  right: -46px;
  z-index: 1;
  width: 330px;
  max-width: 86%;
  height: auto;
  -webkit-mask-image: linear-gradient(100deg, transparent 2%, #000 34%);
  mask-image: linear-gradient(100deg, transparent 2%, #000 34%);
}

.brand-copy {
  position: relative;
  z-index: 2;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-avatar {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  box-shadow: 0 8px 20px rgba(24, 22, 16, 0.22);
}

.brand-lockup h1 {
  margin: 0;
  font-size: 40px;
  line-height: 46px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.simple-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 38px;
  letter-spacing: 0.03em;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-tagline {
  max-width: 230px;
  margin: 22px 0 0;
  color: #55503f;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.brand-highlight {
  position: relative;
  z-index: 0;
  padding: 0 2px;
  color: var(--text-primary);
  font-weight: 800;
  white-space: nowrap;
}

.brand-highlight::after {
  position: absolute;
  right: -1px;
  bottom: 0;
  left: -1px;
  z-index: -1;
  height: 9px;
  content: "";
  background: rgba(233, 185, 73, 0.5);
  border-radius: 5px;
}

.duck-figure {
  width: 128px;
  height: auto;
  margin: 0 auto 8px;
  filter: drop-shadow(0 12px 22px rgba(60, 50, 30, 0.16));
}

.duck-figure--sm {
  width: 92px;
}

.duck-figure--lg {
  width: 160px;
}

.agent-figure {
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(40, 34, 22, 0.18));
}

.agent-figure--md {
  width: 108px;
  margin: 0 auto 10px;
}

.agent-figure--sm {
  width: 58px;
  height: 58px;
  padding: 5px;
  flex: 0 0 auto;
  object-fit: contain;
  background: linear-gradient(150deg, #fff9ec, #f1e2bf);
  border: 1px solid rgba(201, 151, 63, 0.28);
  border-radius: 16px;
  filter: none;
}

.ico {
  width: 24px;
  height: 24px;
}

.home-search {
  position: relative;
  z-index: 3;
  margin-top: -34px;
}

.search-form {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  align-items: center;
  min-height: 60px;
  padding: 4px 6px 4px 16px;
  background: rgba(255, 252, 247, 0.94);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.search-icon {
  color: var(--text-tertiary);
}

.ico--search {
  width: 22px;
  height: 22px;
}

.search-form input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 8px;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 16px;
}

.search-form input::placeholder {
  color: var(--text-tertiary);
}

.search-form input:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: -3px;
  border-radius: 12px;
}

.clear-button,
.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: var(--text-primary);
  background: var(--bg-muted);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.icon-button .ico {
  width: 22px;
  height: 22px;
}

.clear-button {
  font-size: 22px;
}

.search-submit {
  min-width: 76px;
  min-height: 48px;
  padding: 0 18px;
  color: var(--ink-text);
  background: linear-gradient(160deg, #35322a, var(--ink-deep));
  border: 0;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(24, 22, 16, 0.2);
}

.content-section {
  margin-top: 32px;
}

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

.section-heading h2 {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font-size: 20px;
  line-height: 28px;
}

.section-heading h2::before {
  position: absolute;
  top: 9px;
  left: 0;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--gold-primary);
  border-radius: 50%;
}

.text-link,
.text-button {
  min-height: 44px;
  padding: 10px 2px;
  color: var(--gold-dark);
  background: none;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.category-tile {
  display: flex;
  min-height: 112px;
  padding: 14px 6px 12px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.category-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--gold-dark);
  background: linear-gradient(150deg, #fff9ec, #f1e2bf);
  border: 1px solid rgba(201, 151, 63, 0.28);
  border-radius: 14px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.8), 0 3px 8px rgba(139, 100, 39, 0.1);
}

.category-icon .ico {
  width: 23px;
  height: 23px;
}

.ico-glyph {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.list-surface {
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.folder-row {
  display: flex;
  min-height: 72px;
  padding: 12px 14px;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--border-default);
}

.folder-row:last-child {
  border-bottom: 0;
}

.folder-row:hover {
  background: rgba(241, 225, 190, 0.22);
}

.resource-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border-default);
}

.resource-row:last-child {
  border-bottom: 0;
}

.row-main {
  display: flex;
  min-width: 0;
  min-height: 92px;
  padding: 12px 8px 12px 14px;
  flex: 1;
  align-items: center;
  gap: 13px;
}

.row-main:hover {
  background: rgba(241, 225, 190, 0.22);
}

.row-actions {
  display: flex;
  padding: 10px 12px 10px 2px;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

/* 转存入口是 <a>(必须原生导航才能被 WebView 拦截并拉起网盘),
   生成链接仍是 <button> —— 选择器要同时认这两种标签。
   2026-08-21 踩过:只写 button 时,改成 <a> 的转存按钮样式全丢。 */
.row-actions button,
.row-actions a {
  min-width: 80px;
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.row-transfer {
  color: var(--ink-text);
  background: linear-gradient(160deg, #35322a, var(--ink-deep));
  border: 1px solid var(--ink-deep);
}

.row-secondary {
  color: var(--gold-dark);
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid #d9d1bf;
}

.panel-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.guide-steps {
  margin: 14px 0 4px;
  padding-left: 24px;
  text-align: left;
  color: var(--text-primary);
  line-height: 1.7;
}

.guide-steps li {
  margin-bottom: 6px;
  padding-left: 4px;
}

.guide-steps li::marker {
  color: var(--gold-dark);
  font-weight: 800;
}

.folder-icon {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 32px;
  background: linear-gradient(145deg, #e9bd63, #c9973f);
  border-radius: 5px 5px 8px 8px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.45);
}

.folder-icon::before {
  position: absolute;
  top: -6px;
  left: 3px;
  width: 18px;
  height: 8px;
  content: "";
  background: #ddb259;
  border-radius: 5px 5px 0 0;
}

.folder-icon--large {
  width: 58px;
  height: 44px;
}

.row-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.row-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  line-height: 23px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.row-copy small,
.resource-summary {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 19px;
}

.update-kind {
  color: var(--gold-dark);
  font-weight: 750;
}

.resource-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.row-arrow {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  font-size: 27px;
  line-height: 1;
}

.resource-icon {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3), transparent 35%),
    linear-gradient(145deg, var(--green-muted), #416d63);
  border: 1px solid rgba(24, 24, 22, 0.08);
  border-radius: 15px;
  box-shadow: 0 5px 14px rgba(44, 70, 62, 0.14);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.resource-icon .ico {
  width: 56%;
  height: 56%;
}

.request-banner,
.feedback-card,
.inline-request {
  display: flex;
  min-height: 112px;
  margin-top: 32px;
  padding: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(120deg, #fffdf8, #f7edda);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}

.request-banner > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.request-banner p,
.feedback-card p,
.inline-request p {
  margin: 0;
  line-height: 1.5;
}

.request-banner p span,
.feedback-card p span,
.inline-request p span {
  color: var(--text-secondary);
  font-size: 13px;
}

.mini-lotus {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--gold-primary);
}

.mini-lotus svg {
  width: 44px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 52px;
  padding: 12px 20px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 750;
  text-align: center;
  cursor: pointer;
}

.primary-button {
  color: var(--ink-text);
  background: linear-gradient(160deg, #35322a, var(--ink-deep));
  border: 1px solid var(--ink-deep);
  border-radius: 18px;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 22px rgba(24, 22, 16, 0.22);
}

.primary-button > span[aria-hidden] {
  color: var(--gold-bright);
  font-weight: 800;
}

.primary-button:disabled {
  color: var(--text-secondary);
  background: var(--bg-muted);
  border-color: var(--border-default);
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-button {
  color: var(--text-primary);
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid #d9d1bf;
  border-radius: 18px;
}

.inventory-notice {
  margin: 24px auto 0;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  width: min(100%, 480px);
  min-height: calc(78px + env(safe-area-inset-bottom));
  margin: 0 auto;
  padding: 8px 20px env(safe-area-inset-bottom);
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 252, 247, 0.96);
  border-top: 1px solid var(--border-default);
  backdrop-filter: blur(14px);
}

.bottom-nav a {
  display: flex;
  min-width: 44px;
  min-height: 56px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 650;
}

.bottom-nav a.is-active {
  color: var(--text-primary);
  font-weight: 750;
}

.bottom-nav a.is-active .nav-icon {
  color: var(--gold-dark);
}

.nav-icon {
  display: grid;
  place-items: center;
}

.nav-icon .ico {
  width: 25px;
  height: 25px;
}

.page-header,
.simple-header {
  display: grid;
  min-height: 64px;
  align-items: center;
  gap: 12px;
}

.page-header {
  grid-template-columns: 44px 1fr 44px;
  margin-bottom: 12px;
}

.page-header h1 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  text-align: center;
}

.page-header .icon-button:last-child {
  background: transparent;
}

.simple-header {
  grid-template-columns: 1fr auto;
  padding: 10px 2px;
}

.page-intro {
  margin: 8px 0 0;
  color: var(--text-secondary);
}

.breadcrumbs {
  display: flex;
  min-height: 44px;
  padding: 8px 0;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  color: var(--text-secondary);
  font-size: 14px;
  white-space: nowrap;
  scrollbar-width: none;
}

.breadcrumbs a {
  min-height: 44px;
  padding: 11px 2px;
}

.breadcrumbs [aria-current="page"] {
  color: var(--gold-dark);
  font-weight: 700;
}

.directory-hero {
  display: flex;
  min-height: 122px;
  margin-top: 10px;
  padding: 20px;
  align-items: center;
  gap: 20px;
  background:
    radial-gradient(circle at 90% 30%, rgba(120, 137, 106, 0.13), transparent 8rem),
    var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.directory-hero h2 {
  margin: 0;
  font-size: 26px;
  line-height: 34px;
}

.directory-hero p:last-child {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.inline-request {
  min-height: 86px;
}

.inline-request a {
  min-height: 44px;
  padding: 10px 3px;
  flex: 0 0 auto;
  color: var(--gold-dark);
  font-weight: 750;
}

.empty-card,
.no-results,
.success-state,
.status-state {
  display: flex;
  min-height: 360px;
  padding: 28px 20px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.empty-card h2,
.no-results h2,
.success-state h2,
.status-state h2 {
  margin: 4px 0 8px;
  font-size: 26px;
  line-height: 34px;
}

.empty-card p,
.no-results > p,
.success-state > p,
.status-state > p {
  max-width: 360px;
  margin: 0 0 22px;
  color: var(--text-secondary);
}

.search-page .search-form {
  margin: 10px 0 14px;
}

.filter-chips {
  display: flex;
  margin: 14px -16px 0;
  padding: 0 16px 4px;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-chips button {
  min-width: 72px;
  min-height: 44px;
  padding: 9px 16px;
  flex: 0 0 auto;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  cursor: pointer;
}

.filter-chips button.is-active {
  color: var(--ink-text);
  background: var(--ink);
  border-color: var(--ink);
  font-weight: 750;
}

.result-count {
  margin: 20px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.no-results {
  min-height: 330px;
  margin-top: 24px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.resource-detail {
  padding-top: 8px;
}

.resource-identity {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.resource-identity .resource-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  font-size: 21px;
}

.resource-identity h2 {
  margin: 0;
  font-size: 26px;
  line-height: 34px;
}

.resource-identity p:last-child {
  margin: 7px 0 0;
  color: var(--text-secondary);
}

.meta-chips {
  display: flex;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chips span {
  min-height: 32px;
  padding: 6px 10px;
  color: var(--text-secondary);
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.transfer-panel {
  margin-top: 24px;
  padding: 16px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.transfer-panel .primary-button {
  width: 100%;
}

.transfer-panel p {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.transfer-panel strong {
  display: block;
  margin-top: 5px;
  color: var(--danger);
  font-size: 12px;
}

.prose-card,
.notice-card {
  margin: 0;
  padding: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  line-height: 1.75;
}

.prose-card p {
  margin: 0;
}

.info-list {
  margin: 0;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.info-list > div {
  display: grid;
  min-height: 56px;
  padding: 12px 16px;
  align-items: center;
  grid-template-columns: minmax(88px, 0.8fr) minmax(0, 1.4fr);
  gap: 12px;
  border-bottom: 1px solid var(--border-default);
}

.info-list > div:last-child {
  border-bottom: 0;
}

.info-list dt {
  color: var(--text-secondary);
}

.info-list dd {
  margin: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
  text-align: right;
}

.notice-card {
  color: #44513b;
  background: rgba(120, 137, 106, 0.1);
  border-color: rgba(120, 137, 106, 0.25);
}

.feedback-card {
  margin-bottom: 12px;
  background: var(--bg-surface);
}

.demo-dialog {
  width: min(calc(100% - 32px), 390px);
  padding: 26px 22px 22px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 70px rgba(24, 24, 22, 0.28);
  text-align: center;
}

.demo-dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(3px);
}

.dialog-duck {
  display: grid;
  place-items: center;
  margin: 0 auto 4px;
}

.dialog-duck .duck-figure {
  width: 96px;
  margin: 0;
}

.demo-dialog h2 {
  margin: 0;
  font-size: 24px;
}

.demo-dialog p:not(.eyebrow) {
  margin: 12px 0 22px;
  color: var(--text-secondary);
}

.demo-dialog .primary-button {
  width: 100%;
}

.demo-dialog .text-button {
  margin-top: 12px;
}

.passcode-row code {
  padding: 2px 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  background: var(--gold-soft);
  border-radius: 8px;
  user-select: all;
}

.passcode-row .text-button {
  margin: 0 0 0 6px;
}

.request-card {
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.request-card--embedded {
  margin-top: 22px;
}

.request-card__heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.request-card__heading h2 {
  margin: 0;
  font-size: 22px;
}

.request-mark {
  width: 46px;
  height: 46px;
  color: var(--gold-primary);
}

.privacy-note {
  margin: 14px 0 20px;
  padding: 11px 13px;
  color: #4e5946;
  background: rgba(120, 137, 106, 0.1);
  border: 1px solid rgba(120, 137, 106, 0.22);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.field {
  margin-top: 18px;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 750;
}

.field legend {
  padding: 0;
}

.field label span,
.field legend span {
  color: var(--danger);
}

.field input:not([type="radio"]),
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--text-primary);
  background: #fffdfa;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field [aria-invalid="true"] {
  border-color: var(--danger) !important;
}

fieldset.field {
  padding: 0;
  border: 0;
}

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

.choice-grid label {
  position: relative;
  margin: 0;
}

.choice-grid input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.choice-grid label span {
  display: grid;
  min-height: 44px;
  padding: 8px;
  place-items: center;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  font-size: 14px;
}

.choice-grid input:checked + span {
  color: #2b2112;
  background: var(--gold-soft);
  border-color: var(--gold-primary);
  font-weight: 750;
}

.choice-grid input:focus-visible + span {
  outline: 3px solid var(--gold-dark);
  outline-offset: 3px;
}

.field-error {
  min-height: 20px;
  margin: 5px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.form-message {
  min-height: 22px;
  margin: 12px 0;
  color: var(--danger);
  font-size: 14px;
}

.request-card form > .primary-button {
  width: 100%;
}

.request-card > .text-button {
  display: block;
  margin: 12px auto 0;
}

.success-state,
.status-state {
  min-height: calc(100vh - 150px);
  background:
    radial-gradient(circle at 50% 15%, rgba(241, 225, 190, 0.65), transparent 11rem),
    var(--bg-surface);
}

.success-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  place-items: center;
  color: #fff;
  background: var(--green-muted);
  border-radius: 50%;
  font-size: 34px;
  font-weight: 800;
}

.stacked-actions,
.status-actions {
  display: grid;
  width: min(100%, 320px);
  gap: 10px;
}

.updates-header {
  grid-template-columns: 1fr 46%;
  align-items: end;
}

.updates-header h1 {
  font-size: 34px;
  line-height: 42px;
}

.updates-sub {
  margin: 8px 0 2px;
  color: var(--text-secondary);
  font-size: 13.5px;
}

.porter-frame {
  display: block;
  width: min(100%, 152px);
  margin: 0 0 0 auto;
  overflow: hidden;
  background: linear-gradient(150deg, #fff9ec, #f0e1bd);
  border: 1px solid rgba(201, 151, 63, 0.3);
  border-radius: 22px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.8), 0 6px 16px rgba(139, 100, 39, 0.12);
}

.porter-figure {
  display: block;
  width: 92%;
  height: auto;
  margin: 9px auto 0;
}

.updates-group {
  margin-top: 28px;
}

.status-state .duck-figure {
  margin-bottom: 14px;
}

.status-state .not-found-mark {
  width: 88px;
  height: 88px;
  margin-bottom: 18px;
  color: var(--gold-primary);
}

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

  .brand-header {
    padding-left: 16px;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-avatar {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .brand-lockup h1 {
    font-size: 36px;
    line-height: 42px;
  }

  .pond-scene {
    width: 290px;
  }

  .brand-tagline {
    font-size: 13px;
    letter-spacing: 0.04em;
  }

  .category-grid {
    gap: 7px;
  }

  .category-tile {
    min-height: 108px;
    padding-right: 3px;
    padding-left: 3px;
    font-size: 13px;
  }

  .request-banner,
  .feedback-card {
    align-items: stretch;
    flex-direction: column;
  }

  .request-banner .secondary-button,
  .feedback-card .secondary-button {
    width: 100%;
  }

  .resource-identity {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }

  .resource-identity .resource-icon {
    width: 64px;
    height: 64px;
  }

  .choice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 481px) {
  body {
    padding: 24px 0;
  }

  .viewport-frame {
    min-height: calc(100vh - 48px);
    border: 1px solid rgba(139, 100, 39, 0.11);
    border-radius: 30px;
  }

  .bottom-nav {
    bottom: 24px;
    overflow: hidden;
    border: 1px solid var(--border-default);
    border-radius: 0 0 30px 30px;
  }
}

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

/* 首页瀑布流：紧凑链接条，资源一目了然 */
.feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  align-items: start;
}

.feed-col {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 9px;
}

.feed-card {
  display: flex;
  padding: 11px 10px;
  align-items: flex-start;
  gap: 9px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(55, 45, 30, 0.05);
}

.feed-card:hover {
  background: rgba(241, 225, 190, 0.18);
}

.feed-card .resource-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 11px;
  box-shadow: none;
}

.feed-card__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.feed-card h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.feed-card small {
  color: var(--text-tertiary);
  font-size: 11px;
}

.feed-card small b {
  color: var(--gold-dark);
  font-weight: 700;
}

.feed-sentinel {
  height: 2px;
}

.feed-end {
  display: flex;
  margin-top: 26px;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.feed-end[hidden] {
  display: none;
}

.feed-end .duck-figure {
  width: 84px;
  margin-bottom: 2px;
}

.feed-end p {
  margin: 0 0 10px;
}

.feed-end span {
  color: var(--text-secondary);
  font-size: 13px;
}

.feed-end .secondary-button {
  min-width: 200px;
}

/* 资源图标按分类配色，瀑布流里形成节奏 */
.resource-icon--font,
.resource-icon--theme {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3), transparent 35%),
    linear-gradient(145deg, #d3a44c, #9c711f);
  box-shadow: 0 5px 14px rgba(139, 100, 39, 0.18);
}

.resource-icon--widget {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3), transparent 35%),
    linear-gradient(145deg, #7c9a94, #40655f);
}

.resource-icon--tutorial {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3), transparent 35%),
    linear-gradient(145deg, #4c4a42, #211f19);
  box-shadow: 0 5px 14px rgba(24, 22, 16, 0.2);
}

.resource-icon--other {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3), transparent 35%),
    linear-gradient(145deg, #a49d8d, #6f6a5d);
}


/* 轻提示 */
.toast {
  position: fixed;
  bottom: calc(100px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 60;
  max-width: 82vw;
  padding: 10px 18px;
  color: var(--ink-text);
  background: rgba(28, 26, 21, 0.94);
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 微信内置浏览器引导层 */
.wx-guide {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: rgba(24, 22, 16, 0.72);
  backdrop-filter: blur(2px);
}

.wx-guide.is-open {
  display: block;
}

.wx-guide__arrow {
  position: absolute;
  top: 10px;
  right: 22px;
  color: #fff;
  font-size: 46px;
  line-height: 1;
  animation: wx-arrow-bounce 1.1s ease-in-out infinite alternate;
}

@keyframes wx-arrow-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(9px); }
}

.wx-guide__card {
  position: absolute;
  right: 20px;
  left: 20px;
  top: 84px;
  padding: 22px 20px;
  text-align: center;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
}

.wx-guide__card h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.wx-guide__card p {
  margin: 0 0 18px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.wx-guide__card p b {
  color: var(--text-primary);
}

.wx-guide__card .primary-button,
.wx-guide__card .secondary-button {
  width: 100%;
}

.wx-guide__card .secondary-button {
  margin-top: 10px;
}

/* 常驻「求资源」浮球 */
.fab-request {
  position: fixed;
  right: max(14px, calc(50% - 240px + 14px));
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  min-height: 48px;
  padding: 6px 16px 6px 7px;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid #d9d1bf;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(45, 38, 27, 0.18);
  font-size: 14px;
  font-weight: 750;
  backdrop-filter: blur(8px);
  transition: padding 160ms ease;
}

.fab-request--above-nav {
  bottom: calc(96px + env(safe-area-inset-bottom));
}

.fab-request img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.fab-request span {
  white-space: nowrap;
}

.fab-request--min {
  padding: 6px 7px;
}

.fab-request--min span {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .fab-request {
    transition: none;
  }
}

/* 点击按压反馈 ——
   移动端没有 hover,按下去必须有即时回应,否则用户不确定点没点到。
   刻意不加 transition:反馈要在手指落下的那一刻发生,任何过渡都是延迟。
   (震动反馈需要 App 加 VIBRATE 权限并发版,当前 Manifest 里没有) */
.row-transfer:active,
.row-secondary:active,
.primary-button:active,
.secondary-button:active,
.text-button:active,
.search-submit:active,
.fab-request:active,
.feed-card:active,
.category-tile:active,
.filter-chips button:active,
.icon-button:active {
  transform: scale(0.96);
  filter: brightness(0.93);
}

.row-main:active,
.folder-row:active {
  background: rgba(201, 151, 63, 0.13);
}

@media (prefers-reduced-motion: reduce) {
  .row-transfer:active,
  .row-secondary:active,
  .primary-button:active,
  .secondary-button:active,
  .feed-card:active,
  .category-tile:active {
    transform: none;
  }
}
