/* 帽制片 · 选题雷达 —— 样式 v4（编辑部风格美化版） */
:root {
  /* 字体：标题用衬线（文学感），正文用无衬线 */
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;

  /* 暖色编辑部配色 */
  --paper: #f2ebdd;
  --surface: #fcf8f0;
  --surface-2: #f4ecdd;
  --ink: #28221c;
  --ink-soft: #6a6055;
  --ink-faint: #a89c8a;
  --line: #e6dac5;
  --line-soft: #efe6d4;

  --accent: #b0492e;        /* 赤陶（品牌主色 / 综合分） */
  --accent-deep: #8a3620;
  --accent-soft: #f1d9cc;

  --story: #2f6f63;         /* 故事力 —— 深青（“好故事”维度） */
  --story-soft: #d8e8e2;
  --match: #b3852e;         /* 题材 —— 赭金 */
  --match-soft: #f0e3c4;
  --green: #4e7d54;

  --shadow-sm: 0 1px 2px rgba(40,34,28,.05);
  --shadow: 0 2px 6px rgba(40,34,28,.06), 0 12px 28px rgba(40,34,28,.07);
  --shadow-lg: 0 14px 44px rgba(40,34,28,.16);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 100% -5%, #f6efe2 0%, transparent 60%),
    var(--paper);
  color: var(--ink);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 32px; background: rgba(252,248,240,.86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--paper); border: 1px solid var(--line);  /* 米色底，帽子用本板块色线条（全板块统一规范） */
  color: var(--accent); display: grid; place-items: center;
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--serif); font-size: 18px; letter-spacing: .5px; }
.brand-text span { font-size: 11.5px; color: var(--ink-faint); }
.modules { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.module {
  border: none; background: transparent; color: var(--ink-soft);
  padding: 7px 15px; border-radius: 999px; font-size: 13px; cursor: pointer; font-family: inherit; transition: all .16s;
}
.module:hover:not(.disabled):not(.active) { color: var(--accent); }
.module.active { background: var(--surface); color: var(--accent-deep); box-shadow: var(--shadow-sm); font-weight: 600; }
.module.disabled { opacity: .5; cursor: not-allowed; }
.module em { font-style: normal; font-size: 10px; opacity: .75; margin-left: 4px; }

/* 布局 */
.layout {
  display: grid; grid-template-columns: 284px 1fr; gap: 28px;
  max-width: 1280px; margin: 0 auto; padding: 28px 32px 72px; align-items: start;
}
.sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.card h3 { font-family: var(--serif); font-size: 16px; margin-bottom: 15px; color: var(--ink); letter-spacing: .3px; }

/* 偏好选择器 */
.taste-card h3 { display: flex; align-items: center; justify-content: space-between; }
.reset-pref { font-size: 11px; font-weight: 400; color: var(--ink-faint); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; cursor: pointer; font-family: var(--sans); transition: all .14s; }
.reset-pref:hover { color: var(--accent); border-color: var(--accent); }
.principle {
  background: linear-gradient(180deg, #fbf1de, var(--surface-2));
  border: 1px solid var(--match-soft); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 12.5px; color: var(--accent-deep); margin-bottom: 16px; line-height: 1.55; font-weight: 600;
}
.principle .formula { color: var(--ink-faint); font-size: 11px; font-weight: 400; }
.pref-block { margin-bottom: 15px; }
.taste-label { font-size: 11px; color: var(--ink-faint); display: block; margin-bottom: 7px; letter-spacing: .2px; }
.taste-label em { font-style: normal; font-size: 10px; color: var(--ink-faint); font-weight: 400; }

/* 标签分组（时代/类型/题材/调性）*/
.genre-groups { display: flex; flex-direction: column; gap: 11px; }
.pref-group-name { font-size: 11px; color: var(--accent-deep); font-weight: 700; display: block; margin-bottom: 6px; letter-spacing: .5px; }
.pref-group .chips { margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; padding: 4px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); transition: all .14s;
}
.chip.t1 { background: var(--accent-soft); border-color: #e6c3b3; color: var(--accent-deep); }
.chip.dislike { background: #f1e7e3; border-color: #e0cabf; color: #9a6253; }
.chips-pref .chip.pref { cursor: pointer; }
.chips-pref .chip.pref:hover { border-color: var(--accent); transform: translateY(-1px); }
.chips-pref .chip.pref.like { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow-sm); }
.chips-pref .chip.pref.dislike { background: #f1e7e3; color: #9a6253; border-color: #d8b6aa; }
.chips-toggle .chip { cursor: pointer; }
.chips-toggle .chip:hover { border-color: var(--accent); }
.chips-toggle .chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.profile-summary {
  background: var(--story-soft); border: 1px solid #c4ddd5; border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 12.5px; color: #1f5249; line-height: 1.7; margin: 6px 0 12px;
}
.profile-summary b { color: #16463d; }
.multi-note { font-size: 10.5px; color: var(--ink-faint); margin-top: 8px; line-height: 1.5; }
.learn-note { margin-top: 10px; font-size: 12px; color: var(--green); background: #eef4ee; border-radius: var(--radius-sm); padding: 7px 11px; }

/* 筛选 */
.filter-card input[type="search"], .filter-card select, #statusPick {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; background: var(--surface-2); color: var(--ink);
}
.filter-card input[type="search"]:focus, .filter-card select:focus, #statusPick:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.filter-row { margin-top: 15px; }
.filter-row > label { font-size: 11px; color: var(--ink-faint); display: block; margin-bottom: 7px; }
.chips-filter .chip { cursor: pointer; }
.chips-filter .chip:hover { border-color: var(--accent); }
.chips-filter .chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin-top: 15px; cursor: pointer; }

/* 内容头部 */
.content-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; padding-bottom: 18px; border-bottom: 2px solid var(--line); }
.content-head h1 { font-family: var(--serif); font-size: 34px; letter-spacing: 1px; line-height: 1.1; }
.subtitle { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
#weekLabel { color: var(--accent-deep); font-weight: 600; }
.source-pill { font-size: 12px; color: var(--ink-soft); white-space: nowrap; background: var(--surface); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); }

/* 编辑按语 */
.agent-note {
  margin: 20px 0 6px; background: linear-gradient(180deg, #fbf2e0, var(--surface));
  border: 1px solid var(--match-soft); border-left: 4px solid var(--match); border-radius: var(--radius); padding: 16px 20px;
}
.agent-badge { font-family: var(--serif); font-size: 11.5px; color: #7a5a16; background: var(--match-soft); padding: 3px 11px; border-radius: 999px; font-weight: 600; letter-spacing: .5px; }
.agent-note p { font-size: 13.5px; color: var(--ink-soft); margin-top: 10px; line-height: 1.75; }

/* 区块标题 */
.section-head { display: flex; align-items: baseline; gap: 11px; margin: 32px 0 16px; }
.section-head h2 { font-family: var(--serif); font-size: 21px; letter-spacing: .5px; }
.section-head h2::before { content: "—"; color: var(--accent); margin-right: 8px; }
.section-head .count { font-size: 13px; color: var(--ink-faint); }
.section-head .hint { font-size: 12px; color: var(--ink-faint); margin-left: auto; }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.book-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .16s, box-shadow .16s, border-color .16s; display: flex; flex-direction: column; position: relative;
}
#weeklyCards .book-card { border-top: 3px solid var(--accent); }
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #d8c6ac; }
.book-card.has-dis { opacity: .8; }
.book-card.has-dis:hover { opacity: 1; }
.bc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.bc-title { font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1.3; }
.src-tag { font-family: var(--sans); font-size: 10px; vertical-align: middle; margin-left: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); padding: 1px 8px; border-radius: 999px; font-weight: 400; }
.bc-author { font-size: 12.5px; color: var(--ink-faint); margin-top: 3px; }
.score-badge {
  flex-shrink: 0; width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 19px;
  color: #fff; background: linear-gradient(150deg, var(--accent), var(--accent-deep)); box-shadow: var(--shadow-sm);
}
.score-badge small { display: block; font-family: var(--sans); font-size: 8px; font-weight: 400; opacity: .85; margin-top: -3px; letter-spacing: .5px; }
.score-badge.pending { background: var(--surface-2); color: var(--ink-faint); border: 1px solid var(--line); box-shadow: none; }

/* 双分条 */
.bc-scores { margin: 14px 0 6px; display: flex; flex-direction: column; gap: 7px; }
.sline { display: flex; align-items: center; gap: 9px; font-size: 11px; color: var(--ink-faint); }
.sk { width: 36px; flex-shrink: 0; }
.sbar { flex: 1; height: 7px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.sbar i { display: block; height: 100%; border-radius: 999px; background: var(--story); }
.sbar.match i { background: var(--match); }
.sval { width: 30px; text-align: right; font-weight: 700; color: var(--story); font-size: 12px; }
.sline:last-child .sval { color: var(--match); }
.sval.pending { font-weight: 400; color: var(--ink-faint); font-size: 10px; width: auto; }

.bc-logline { font-size: 13px; color: var(--ink-soft); margin: 12px 0; flex-grow: 1; line-height: 1.7; }
.bc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { font-size: 11px; padding: 2px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); }
.tag.hit { background: var(--accent-soft); border-color: #e6c3b3; color: var(--accent-deep); font-weight: 600; }
.dis-flag { display: inline-block; font-size: 11px; color: #9a6253; background: #f1e7e3; border: 1px solid #e0cabf; border-radius: 7px; padding: 3px 9px; margin-bottom: 11px; }
.bc-meta { display: flex; flex-wrap: wrap; gap: 11px; font-size: 11.5px; color: var(--ink-faint); border-top: 1px solid var(--line-soft); padding-top: 11px; }
.bc-meta .ok { color: var(--green); }
.bc-meta .warn { color: var(--accent); }
.bc-actions { display: flex; gap: 8px; margin-top: 13px; }
.act { flex: 1; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--ink-soft); transition: all .14s; }
.act:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.act.on-up { background: #eef4ee; border-color: var(--green); color: var(--green); }
.act.on-down { background: #f7ece9; border-color: var(--accent); color: var(--accent); }
.act.on-fav { background: #fbf2dc; border-color: var(--match); color: #8a6516; }

/* 弹窗 */
.modal-overlay { position: fixed; inset: 0; background: rgba(40,34,28,.5); display: grid; place-items: center; z-index: 50; padding: 24px; backdrop-filter: blur(3px); }
.modal-overlay[hidden] { display: none; }
.modal { background: var(--surface); border-radius: 20px; max-width: 740px; width: 100%; max-height: 88vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.modal-close { position: absolute; top: 16px; right: 18px; border: none; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--ink-soft); z-index: 2; transition: all .14s; }
.modal-close:hover { background: var(--accent-soft); color: var(--accent-deep); }
.modal-body { padding: 34px; }
.m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid var(--line); padding-bottom: 18px; }
.m-title { font-family: var(--serif); font-size: 28px; line-height: 1.25; }
.m-author { color: var(--ink-faint); font-size: 14px; margin-top: 5px; }
.m-logline { font-family: var(--art); font-size: 17px; color: var(--accent-deep); margin: 18px 0; line-height: 1.8; }

.m-story { background: linear-gradient(180deg, #e9f2ee, var(--surface)); border: 1px solid #c4ddd5; border-left: 4px solid var(--story); border-radius: 13px; padding: 15px 18px; margin: 16px 0; }
.m-story-head { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; margin-bottom: 9px; }
.m-story-label { font-family: var(--serif); font-size: 12px; font-weight: 700; color: #1f5249; background: var(--story-soft); padding: 4px 11px; border-radius: 999px; letter-spacing: .5px; }
.m-story-score { font-size: 13px; color: var(--ink-soft); }
.m-story-score b { font-family: var(--serif); font-size: 19px; color: var(--story); }
.m-story-score.match b { color: var(--match); }
.m-story p { font-size: 14px; color: var(--ink); line-height: 1.85; }

.m-section { margin-top: 22px; }
.m-section h4 { font-family: var(--serif); font-size: 13.5px; color: var(--accent); margin-bottom: 9px; letter-spacing: .5px; }
.m-section p { font-size: 14px; color: var(--ink); line-height: 1.85; }
.m-section ul { list-style: none; }
.m-section li { font-size: 14px; color: var(--ink); padding-left: 18px; position: relative; margin-bottom: 7px; line-height: 1.75; }
.m-section li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; }
.m-fact { font-size: 13px; }
.m-fact .k { color: var(--ink-faint); display: block; font-size: 11px; margin-bottom: 1px; }
.m-fact .v { color: var(--ink); font-weight: 600; }
.m-chars li { font-size: 13.5px; }
.m-chars strong { color: var(--accent-deep); }
.m-bench { display: flex; flex-wrap: wrap; gap: 8px; }
.m-link { display: inline-block; margin-top: 10px; background: linear-gradient(150deg, var(--accent), var(--accent-deep)); color: #fff; text-decoration: none; padding: 11px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-sm); }
.m-link:hover { filter: brightness(1.05); }
.m-link.unverified { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); box-shadow: none; }
.m-actions { display: flex; gap: 10px; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.data-note { font-size: 12px; color: var(--accent-deep); background: #f7ece9; border-radius: var(--radius-sm); padding: 9px 13px; margin-top: 15px; }

/* 杂项 */
.empty { text-align: center; color: var(--ink-faint); padding: 44px; }
.footer { max-width: 1280px; margin: 0 auto; padding: 22px 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-faint); }

/* ===== 造字工房字体（用户授权）：新简黑=标题+正文，书研=文艺点缀 ===== */
@font-face { font-family: "MFXinJianHei"; src: url("fonts/xinjianhei.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "MFJunYa"; src: url("fonts/junya.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "MFShuYan"; src: url("fonts/shuyan.otf") format("opentype"); font-display: swap; }
:root {
  /* 2026-06-16 帽帽：新简黑太黑太粗、骏雅又看不清 → 改用【清新淡雅】系统字体：
     正文＝苹方 PingFang SC（轻盈、干净、最好认，iOS/Mac 原生），标题＝宋体 Songti SC（淡雅、有书卷气、不黑不糊），
     文艺点缀仍书研。三个都不重不糊。改这里=三大板块(策划/制作/发行)字体一起变。造字工房三款 @font-face 暂留备用。 */
  --serif: "Songti SC", "STSong", "Noto Serif SC", "PingFang SC", Georgia, serif;            /* 标题：宋体（淡雅书卷气） */
  --sans: "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif; /* 正文：苹方（清新好认） */
  --art: "Songti SC", "STKaiti", "KaiTi", serif;                             /* 文艺点缀（欢迎语/一句话故事，少量） */
}
/* 书研(--art)用在欢迎页标语、详情页一句话故事等最需要文艺气息处（见各自规则） */

/* ===== v5：多屏 / 欢迎 / 注册 / 引导 / 小助手 ===== */
.screen[hidden] { display: none !important; }
.logo-slot svg, .welcome-logo svg, .auth-logo svg { width: 100%; height: 100%; }
.logo-slot img, .welcome-logo img, .auth-logo img { width: 100%; height: 100%; object-fit: contain; }

.welcome, .auth, .onboard { min-height: 100vh; display: grid; place-items: center; padding: 44px 24px;
  background: radial-gradient(900px 520px at 50% -8%, #f8f0e2, transparent 60%), var(--paper); }
.welcome-inner { max-width: 560px; text-align: center; }
.welcome-logo { width: 88px; height: 88px; margin: 0 auto 12px; color: var(--accent); }
.welcome-title { font-family: var(--serif); font-size: 54px; letter-spacing: 5px; color: var(--ink); }
.welcome-tag { font-family: var(--art); font-size: 19px; color: var(--accent-deep); margin-top: 8px; letter-spacing: 2px; }
.welcome-desc { font-size: 15px; color: var(--ink-soft); line-height: 1.95; margin: 22px auto 0; max-width: 480px; }
.welcome-desc b { color: var(--accent-deep); }
.welcome-feats { display: flex; gap: 12px; justify-content: center; margin: 28px 0 32px; flex-wrap: wrap; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 14px; width: 152px; box-shadow: var(--shadow-sm); }
.feat span { font-size: 23px; }
.feat b { display: block; font-family: var(--serif); font-size: 14px; margin: 7px 0 3px; color: var(--ink); }
.feat i { font-style: normal; font-size: 11px; color: var(--ink-faint); line-height: 1.45; }
.welcome-foot { font-size: 11.5px; color: var(--ink-faint); margin-top: 24px; }

.btn-primary { font-family: var(--serif); font-size: 16px; color: #fff;
  background: linear-gradient(150deg, var(--accent), var(--accent-deep)); border: none; border-radius: 999px;
  padding: 13px 38px; cursor: pointer; box-shadow: var(--shadow); transition: filter .15s, transform .12s; letter-spacing: 2px; }
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }

.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 36px; width: 100%; max-width: 380px; text-align: center; }
.auth-logo { width: 56px; height: 56px; margin: 0 auto 14px; color: var(--accent); }
.auth-card h2 { font-family: var(--serif); font-size: 25px; }
.auth-sub { font-size: 13px; color: var(--ink-faint); margin: 6px 0 24px; }
.field { display: block; text-align: left; margin-bottom: 15px; }
.field span { font-size: 12px; color: var(--ink-soft); display: block; margin-bottom: 6px; }
.field input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 14px; background: var(--surface-2); }
.field input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.auth-err { color: var(--accent); font-size: 12.5px; margin-bottom: 12px; }
/* ICP 备案号（工信部要求：首页底部、链接到 beian.miit.gov.cn）*/
.beian { text-align: center; margin-top: 10px; }
.beian a { color: var(--ink-faint); font-size: 11.5px; text-decoration: none; }
.beian a:hover { color: var(--accent); text-decoration: underline; }
.auth-card .btn-primary { width: 100%; }
.auth-switch { display: block; width: 100%; margin: 12px 0 0; padding: 4px; background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 13px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.auth-switch:hover { filter: brightness(1.1); }
.auth-note { font-size: 11px; color: var(--ink-faint); line-height: 1.65; margin-top: 18px; background: var(--surface-2); border-radius: 10px; padding: 11px; text-align: left; }

.onboard-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 34px; width: 100%; max-width: 560px; }
.onboard-card h2 { font-family: var(--serif); font-size: 26px; text-align: center; }
.onboard-sub { font-size: 13px; color: var(--ink-faint); text-align: center; margin: 6px 0 22px; }
.pref-row { display: flex; gap: 20px; }
.pref-row .pref-block { flex: 1; }
.onboard-card .btn-primary { display: block; margin: 10px auto 0; }
#statusPick-ob { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 13px; background: var(--surface-2); }
.custom-input { width: 100%; min-height: 68px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 13px; line-height: 1.65; background: var(--surface-2); color: var(--ink); resize: vertical; }
.custom-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.custom-input::placeholder { color: var(--ink-faint); }

.brand-mark.brand-hat { color: var(--accent); }
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark img { width: 30px; height: 30px; object-fit: contain; }
.account { display: flex; align-items: center; gap: 10px; }
.acc-name { font-size: 13px; color: var(--ink-soft); }
.acc-out { font-size: 12px; color: var(--ink-faint); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; cursor: pointer; font-family: inherit; }
.acc-out:hover { color: var(--accent); border-color: var(--accent); }

.assistant { max-width: 1280px; margin: 16px auto 0; padding: 0 32px; display: flex; align-items: center; gap: 12px; }
.assistant-ava { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); color: var(--accent); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.assistant-ava svg { width: 25px; height: 25px; }
.assistant-ava img { width: 28px; height: 28px; object-fit: contain; }
/* 本周推送条幅 */
.weekly-banner { display: flex; align-items: stretch; background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.weekly-banner[hidden] { display: none; }
.wb-main { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 26px; background: none; border: none;
  cursor: pointer; font-family: var(--sans); font-size: 14px; color: var(--accent-deep); text-align: left; }
.wb-main:hover { background: rgba(176, 73, 46, .07); }
.wb-icon { font-size: 16px; }
.wb-text b { font-weight: 700; }
.wb-cta { margin-left: auto; font-weight: 700; white-space: nowrap; letter-spacing: .3px; }
.wb-close { width: 46px; border: none; background: none; cursor: pointer; font-size: 20px; line-height: 1; color: var(--ink-faint); flex-shrink: 0; }
.wb-close:hover { color: var(--accent); }
@media (max-width: 600px) { .wb-cta { display: none; } .wb-main { padding: 11px 16px; font-size: 13px; } }
.assistant-bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; border-top-left-radius: 4px; padding: 11px 16px; font-size: 13.5px; color: var(--ink-soft); box-shadow: var(--shadow-sm); line-height: 1.6; }
.assistant-bubble b { color: var(--accent-deep); }

/* 制片帽 · 为我选片（在偏好面板内，竖向布局，作为偏好的"出击"按钮） */
.discover-bar { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 12px; }
.ai-discover {
  width: 100%; font-family: var(--serif); font-size: 15px; color: #fff; letter-spacing: 1px;
  background: linear-gradient(150deg, var(--accent), var(--accent-deep)); border: none; border-radius: 12px;
  padding: 13px 18px; cursor: pointer; box-shadow: var(--shadow); transition: filter .15s, transform .12s;
}
.ai-discover:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); }
.ai-discover:disabled { opacity: .9; cursor: wait; }
.discover-status { font-size: 12px; color: var(--ink-faint); line-height: 1.55; }
.discover-status.ok { color: var(--story); font-weight: 600; }
.discover-status.err { color: var(--accent); }

/* 进度条：随时间走，分阶段文案，让 ~100 秒等待不焦虑 */
.discover-prog { display: flex; flex-direction: column; gap: 6px; }
.discover-prog-track { height: 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.discover-prog-track i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--match), var(--accent)); transition: width .5s ease; }
.discover-prog-label { font-size: 11.5px; color: var(--accent-deep); font-weight: 600; letter-spacing: .2px; }

/* 选片加载浮层：点"进入制片帽"/"重新选片"后，全屏进度条，走完再露出结果页 */
.loading-overlay { position: fixed; inset: 0; background: rgba(40,34,28,.55); display: grid; place-items: center; z-index: 60; padding: 24px; backdrop-filter: blur(4px); }
.loading-overlay[hidden] { display: none; }
.loading-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 38px 34px; width: 100%; max-width: 440px; text-align: center; }
.loading-logo { width: 60px; height: 60px; margin: 0 auto 14px; color: var(--accent); animation: hatPulse 1.6s ease-in-out infinite; }
.loading-logo svg { width: 100%; height: 100%; }
.loading-logo img { width: 100%; height: 100%; object-fit: contain; }
@keyframes hatPulse { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-6px); opacity: .65; } }
.loading-title { font-family: var(--serif); font-size: 22px; margin-bottom: 22px; color: var(--ink); letter-spacing: 1px; }
.loading-prog { display: flex; flex-direction: column; gap: 9px; }
.loading-prog .discover-prog-track { height: 11px; }
.loading-prog .discover-prog-label { font-size: 13px; }
.loading-tip { font-size: 12px; color: var(--ink-faint); margin-top: 18px; line-height: 1.7; }

@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .modules { display: none; }
  .content-head h1 { font-size: 28px; }
  .welcome-title { font-size: 42px; }
  .pref-row { flex-direction: column; gap: 0; }
  .assistant, .topbar, .layout, .footer { padding-left: 18px; padding-right: 18px; }
  .acc-name { display: none; }
}
