/* 小烘焙铺 · 简笔画极简
   奶油纸底 + 可可色文字 + 砖红线稿 + 蜡笔色块（面包黄 / 雾蓝 / 橄榄绿）
   数字和日期用打字机字体，英文小注用手写体 */

/* 后备字体：也字工厂小石头（随 app 一起提供，见 fonts/README.md），小赖字体里缺的字落到它 */
@font-face {
  font-family: 'ShopFont';
  src: local('也字工厂小石头'), local('YEFONTXiaoShiTou'),
       url('../fonts/shopfont.ttf') format('truetype');
  font-display: block;   /* 字体到了再显示文字（最多等 3 秒），不先显示别的字再跳过来 */
}
/* 全 app（网页和 iOS App）的中文都用小赖字体（SIL OFL 1.1，见 fonts/README.md）；缺的字落到小石头 */
@font-face {
  font-family: 'AppFont';
  src: url('../fonts/xiaolai.ttf') format('truetype');
  font-display: block;   /* 字体到了再显示文字（最多等 3 秒），不先显示别的字再跳过来 */
  size-adjust: 92%;      /* 小赖字体字身偏大：整体缩小一点 */
}

:root {
  /* 日式面包店：生成色的纸、可可色墨线、木头、瓦灰、藏青暖帘、朱红印章 */
  --paper: #f7f2e8;
  --paper-2: #eee5d4;
  --card: #fffcf5;
  --ink: #33291f;
  --ink-soft: #9c9081;
  --line: #4a3a2e;
  --doodle: #5b4636;         /* 线稿：可可色 */
  --crust: #e8b060;          /* 面包 */
  --choco: #8d5b3c;          /* 可可面包 */
  --crust-soft: #f6e2c2;
  --wood: #d2a676;           /* 木头 */
  --tile: #a7aeb6;           /* 瓦 */
  --ai: #3f5f8f;             /* 藏青（暖帘、主按钮） */
  --ai-soft: #e1e7f0;
  --shu: #c4513a;            /* 朱红（印章、选中） */
  --sky: #9dbad8;
  --sky-soft: #e4ecf4;
  --leaf: #8a9a5b;           /* 抹茶 */
  --brown: #9a5f2e;          /* 面包皮棕：重要的数字 */
  --leaf-ink: #fffcf5;
  --blush: #eb9c86;
  --danger: #c4513a;
  --shadow: 0 1px 2px rgba(74, 58, 46, .06), 0 6px 18px rgba(74, 58, 46, .07);
  --hair: rgba(74, 58, 46, .14);              /* 细分隔线 / 轻描边 */
  --font: 'AppFont', 'ShopFont', 'PingFang SC', 'Noto Sans SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --title: 'AppFont', 'ShopFont', 'ZCOOL KuaiLe', 'PingFang SC', 'Noto Sans SC', sans-serif;
  /* 小赖字体只有常规体：要加粗的字用描边描粗（比浏览器自动加粗清楚，粗细也能定），随字号按比例变 */
  --bold: .03em;
  --mono: 'Courier Prime', 'Courier New', 'AppFont', 'ShopFont', ui-monospace, monospace;   /* 中文字落到小赖字体 */
  --tabbar-h: 64px;
  --glass: rgba(255, 252, 245, .58);          /* 菜单栏：半透明玻璃 */
  --glass-edge: rgba(255, 255, 255, .75);     /* 玻璃边缘的高光 */
  --glass-shade: rgba(74, 58, 46, .14);       /* 玻璃投影 */
  --lens: rgba(74, 58, 46, .08);              /* 选中项下面那块"镜片" */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .26 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* 夜里的面包店 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #221e1a; --paper-2: #2c2722; --card: #2a2520;
    --ink: #efe6d8; --ink-soft: #9b9083; --line: #d8ccb9; --doodle: #e2cfb6;
    --crust: #cf9a4c; --choco: #9c6646; --crust-soft: #4a3a24; --wood: #8a6a48; --tile: #5d636b;
    --ai: #6d8cbc; --ai-soft: #2c3646; --shu: #e07a62; --sky: #6f93b5; --sky-soft: #2e3b47;
    --leaf: #9aab6a; --leaf-ink: #1f1d19; --blush: #c97c69; --brown: #d9a06a;
    --glass: rgba(42, 37, 32, .55); --glass-edge: rgba(255, 255, 255, .14); --glass-shade: rgba(0, 0, 0, .45); --lens: rgba(255, 255, 255, .1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #221e1a; --paper-2: #2c2722; --card: #2a2520;
  --ink: #efe6d8; --ink-soft: #9b9083; --line: #d8ccb9; --doodle: #e2cfb6;
  --crust: #cf9a4c; --choco: #9c6646; --crust-soft: #4a3a24; --wood: #8a6a48; --tile: #5d636b;
  --ai: #6d8cbc; --ai-soft: #2c3646; --shu: #e07a62; --sky: #6f93b5; --sky-soft: #2e3b47;
  --leaf: #9aab6a; --leaf-ink: #1f1d19; --blush: #c97c69; --brown: #d9a06a;
    --glass: rgba(42, 37, 32, .55); --glass-edge: rgba(255, 255, 255, .14); --glass-shade: rgba(0, 0, 0, .45); --lens: rgba(255, 255, 255, .1);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 图、画、按钮、链接、日历格子、底栏这些不是正文的东西：长按不选中、不弹「拷贝/存储图像」菜单、不能拖走；
   正文和输入框照常可以选 */
img, svg, button, a, label, summary, nav, .btn, .chip, .tabbar, .cal, .cal-head, .polaroid, .rack-item, .hanko,
[data-act], [data-go], .ph, .pic, .photo, .stats, .rating {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
img, svg { -webkit-user-drag: none; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
html, body { margin: 0; }
/* 兜底：任何东西不小心比屏幕宽，也不让整页左右滑 */
html, body { overflow-x: clip; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; } /* 像 app 一样：不许双击放大 */
body {
  overflow-wrap: break-word;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- 线稿 & 蜡笔 ---------- */
.sk { filter: url(#rough); overflow: visible; color: var(--doodle); }
.ic { width: 22px; height: 22px; flex: none; }
.crayon { filter: url(#crayon); }
.f-crust { fill: var(--crust); }
.f-soft { fill: var(--crust-soft); }
.f-sky { fill: var(--sky); }
.f-skysoft { fill: var(--sky-soft); }
.f-sea { fill: var(--sea, var(--sky-soft)); }
.f-leaf { fill: var(--leaf); }
.f-wood { fill: var(--wood); }
.f-tile { fill: var(--tile); }
.f-ai { fill: var(--ai); }
.f-paper { fill: var(--card); }
.f-shu { fill: var(--shu); }
.f-choco { fill: var(--choco); }
.f-pink { fill: #efb3ad; }
.f-custard { fill: #f1c55a; }
.f-ajisai { fill: #a58bd0; }
.f-ajiblue { fill: #7fa3dc; }
.f-brick { fill: #c97a5e; }
.f-ochre { fill: #e2b77a; }
.sp1 { stroke: #d9604c; } .sp2 { stroke: #5f86c0; } .sp3 { stroke: #7d9150; }
.herb { stroke: #6e8a45; }
.spot { stroke: #a0642c; }
.ganache { stroke: #4a2c1e; }
.pearl { stroke: var(--crust); }
.ink-paper { stroke: #fffcf5; }
.sk-text { font-family: var(--title); }
.ink-fill { fill: #fffcf5; }
.bulb { fill: var(--crust); stroke-width: .8; }
.gold-text { fill: #c9913a; letter-spacing: .08em; }
.shu-line { stroke: var(--shu); }
.blush { stroke: var(--blush); }
.rope { stroke: var(--crust); filter: url(#crayon); }
.salt { stroke: var(--card); }

/* ---------- 字体工具 ---------- */
.mono { font-family: var(--mono); letter-spacing: .02em; }
/* 标题、招牌店名、配方名这些大字：小赖字体描粗 */
h1, h2, h3, .greet h1, .hero h1, .storefront .sign, .bake-head .t b, .diary .name, .stat b.t, .recipe-row .t b, .shelf .item > span:not(.pic) {
  font-family: var(--title); font-weight: 400; -webkit-text-stroke: var(--bold) currentColor;
}
/* 正文里的 <b>/<strong> 也用描边加粗，不让浏览器自动加粗 */
b, strong { font-weight: 400; -webkit-text-stroke: var(--bold) currentColor; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.center { text-align: center; }
.scribble { background: linear-gradient(transparent 62%, var(--crust-soft) 62%, var(--crust-soft) 90%, transparent 90%); padding: 0 2px; }

#app, .under {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 14px) 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 32px);
}

/* 边缘右滑返回：当前页浮在上面跟手走（单独一层，只做位移，不重画），底下垫着要回去的那一页 */
#app.dragging { position: relative; z-index: 2; min-height: 100vh; background: var(--paper) var(--grain); box-shadow: -10px 0 28px rgba(60, 40, 20, .16); will-change: transform; }
.under { position: fixed; top: 0; left: 0; right: 0; height: 100vh; overflow: hidden; z-index: 0; pointer-events: none; background: var(--paper) var(--grain); will-change: transform; }
.under-dim { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: rgba(40, 28, 18, .14); will-change: opacity; }

/* ---------- 顶栏 ---------- */
.topbar { display: flex; align-items: center; gap: 8px; min-height: 48px; margin-bottom: 8px; }
.topbar h1 { font-size: 24px; margin: 0; flex: 1; letter-spacing: .02em; }
.topbar .sub { color: var(--ink-soft); font-size: 14px; }

/* 首页问候 */
.greet { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.greet .t { flex: 1; }
.greet h1 { margin: 0; font-size: 34px; letter-spacing: .04em; line-height: 1.25; }
.greet p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }

/* 小节标题 */
h2 { font-size: 20px; margin: 32px 0 12px; display: flex; align-items: center; gap: 10px; letter-spacing: .03em; }
h2::before { content: ''; width: 9px; height: 9px; flex: none; background: var(--shu); border-radius: 2px 3px 2px 3px; transform: rotate(-8deg); opacity: .9; }
h2 > :not(.more) { font-family: var(--font); -webkit-text-stroke: 0; }
h2 .ic { align-self: center; }
h2 .more { -webkit-text-stroke: 0; margin-left: auto; font-size: 14px; color: var(--ink-soft); font-weight: 400; text-decoration: none; letter-spacing: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: transparent;
  padding: 8px 18px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .08s ease;
  white-space: nowrap;
}
.btn .ic { color: currentColor; }
.btn:active { transform: scale(.97); }
.btn.primary { border-color: var(--ink); color: var(--ink); letter-spacing: .04em; }
.btn.big { font-family: var(--title); }
.btn.crust { border-color: var(--ink); color: var(--ink); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; box-shadow: none; }
.btn.block { display: flex; width: fit-content; min-width: 160px; max-width: 100%; margin-inline: auto; white-space: normal; text-align: center; }
.btn.big {
  border: 1.8px solid var(--ink); border-radius: 999px; min-height: 52px; padding: 6px 26px; font-size: 19px; color: var(--ink);
  background: var(--crust-soft); box-shadow: 0 3px 0 color-mix(in srgb, var(--ink) 22%, transparent);
}
.btn.big:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 22%, transparent); }
.btn.big .ic { display: none; }
.btn.big::after { content: '→'; font-family: var(--mono); margin-left: 4px; transition: transform .2s ease; }
.btn.big:active::after { transform: translateX(4px); }
.btn.sm { min-height: 34px; padding: 4px 12px; font-size: 15px; }
.btn.icon { padding: 0; width: 44px; min-width: 44px; }
.btn.icon.sm { width: 34px; min-width: 34px; }
.btn.icon.ghost .ic { color: var(--ink); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row > .grow { flex: 1; }
.stack { display: grid; gap: 10px; }

/* ---------- 卡片 ---------- */
.card {
  border: 0;
  border-radius: 20px;
  padding: 14px 16px;
  background: var(--card);
  position: relative;
  box-shadow: var(--shadow);
}
.card.alt { border-radius: 20px; }
.card.dashed { border: 1.5px dashed var(--hair); background: transparent; box-shadow: none; }
.card.fill { background: var(--paper-2); }
a.card { display: block; text-decoration: none; }

/* 图标方块（配方列表等） */
.tile { width: 58px; height: 58px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--paper-2); border-radius: 16px 13px 17px 12px; }
.tile svg { width: 44px; height: 44px; }

/* ---------- 首页：店面 ---------- */
.storefront { position: relative; margin: 0 auto; max-width: 440px; container-type: inline-size; }
.storefront svg { width: 100%; height: auto; display: block; }
.storefront .sign {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(15px, 4.6vw, 21px); letter-spacing: .12em;
  background: none; border: 0; cursor: pointer; padding: 0; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.storefront.mini .sign { font-size: 9px; letter-spacing: .06em; cursor: default; }
/* 等级徽章可以点，打开升级路线 */
.shop-meta button.lv { border: 0; cursor: pointer; color: var(--doodle); font: inherit; font-size: 13px; -webkit-text-stroke: .015em currentColor; }
/* 升级路线 */
.roadmap h3 { margin-bottom: 2px; }
/* 升级路线：弹窗按屏幕剩下的高度排，标题和「知道啦」固定在上下，只有中间的列表自己滚（不会和按钮叠在一起） */
dialog[open]:has(> .roadmap) { display: flex; flex-direction: column; overflow: hidden; }
.roadmap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.roadmap > .row { flex: none; }
.roadmap ol { list-style: none; margin: 12px 0 16px; padding: 0; display: grid; align-content: start; gap: 10px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.roadmap li { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 16px; }
.roadmap li .t > .small { font-size: 12.5px; line-height: 1.45; }
.roadmap li .storefront { width: 104px; flex: none; margin: 0; }
.roadmap li .t { display: grid; gap: 1px; min-width: 0; }
.roadmap li .t > b { font-family: var(--title); font-weight: 400; font-size: 16px; color: var(--doodle); -webkit-text-stroke: .015em currentColor; }   /* 轻一点的加粗，可可色，不要一排黑字 */
.roadmap li.now { background: var(--crust-soft); }
.roadmap li[data-act] { cursor: pointer; }
.roadmap li[data-act]:active { background: var(--lens); }
.level-big { text-align: center; }
.level-big .storefront { width: 100%; max-width: 360px; margin: 0 auto 8px; }
.level-big .storefront.mini .sign { font-size: 13px; }
.level-big h3 { margin: 4px 0 2px; }
.level-big .row { gap: 10px; margin-top: 12px; }
.roadmap li.next .storefront { opacity: .45; filter: grayscale(.7); }
/* 还没解锁的隐藏款：画的是盖着布的店（mysteryShop），淡一点 */
.roadmap li.secret .storefront { opacity: .85; filter: none; }
.roadmap li.secret-head { justify-content: center; padding: 6px 0 0; font-family: var(--title); color: var(--ink-soft); letter-spacing: .1em; }
.roadmap .here { color: var(--shu); }
/* 升级路线和首页里的次数：用清楚的打字机数字，大一号、面包皮棕色 */
/* 和下面统计数字同一套字体（Courier 常规体），只是换成棕色 */
.need { font-family: var(--mono); font-weight: 400; -webkit-text-stroke: 0; font-size: 15px; line-height: 1; color: var(--brown); padding: 0 2px; vertical-align: 0; }
/* 升级路线里的次数（顶上的「累计出炉 xx 次」和每一级的「出炉 xx 次解锁」）：和那行小字差不多大 */
.roadmap .need { font-size: 13px; vertical-align: 0; padding: 0 2px; }
.celebrate > .storefront { max-width: 260px; margin: 0 auto 6px; }
.shop-meta { text-align: center; margin-top: 4px; }
.shop-meta .lv { display: inline-block; padding: 1px 12px; border-radius: 999px; font-size: 13px; background: var(--card); box-shadow: var(--shadow); }
.progress { height: 8px; border-radius: 999px; margin: 10px auto 2px; max-width: 220px; overflow: hidden; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--hair); }
.progress > i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--crust) 0 4px, transparent 4px 7px); }

/* 数字统计：大号打字机数字 + 灰色小字 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 22px; text-align: center; }
.stat b { display: block; font-family: var(--mono); font-weight: 400; -webkit-text-stroke: 0; font-size: 30px; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--ink-soft); }

/* 烤箱卡片 */
.card.oven-card { display: flex; gap: 14px; align-items: center; }
.oven-card > svg:not(.ic) { width: 92px; flex: none; }
.oven-card .info { flex: 1; min-width: 0; }
.oven-card .info b { display: block; font-size: 18px; }
.oven-card .info .step-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.oven-card .info .clock-line { display: flex; align-items: center; gap: 6px; margin-top: 6px; min-width: 0; }
.oven-card .info .clock-line .mono { flex: none; font-size: 15px; }
.oven-card .info .clock-line .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.oven-card .info .ic { width: 16px; height: 16px; }
/* 好几炉一起烤：烤箱卡片一张张往下排，最后一个虚线小格「再开一炉」 */
.ovens { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
/* 网格里的卡片默认不肯比内容窄：一行长长的步骤文字会把卡片撑出屏幕，整页横向滚动 */
.ovens > *, .stack > *, .diary-list > * { min-width: 0; }
.oven-card .info { overflow: hidden; }
.oven-add { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; border: 1.5px dashed var(--hair); border-radius: 18px;
  color: var(--ink-soft); text-decoration: none; font-size: 15px; }
.oven-add .ic { width: 18px; height: 18px; }
/* 烘焙页顶上：在几炉之间切换 */
.oven-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 10px -2px 0; padding: 2px; }
.oven-tabs::-webkit-scrollbar { display: none; }
.oven-tabs a { flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; border: 1.5px solid var(--hair);
  text-decoration: none; color: var(--ink-soft); font-size: 14px; max-width: 220px; }
.oven-tabs a.on { border-color: var(--line); color: var(--ink); background: var(--card); }
.oven-tabs a svg.shape { width: 26px; height: 26px; flex: none; }
.oven-tabs a span:not(.mono) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oven-tabs a .mono { color: var(--brown); }
.baking-now { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; color: var(--brown); text-decoration: none; font-size: 15px; }
.baking-now .ic { width: 18px; height: 18px; }
.rise { animation: rise 3s ease-in-out infinite alternate; transform-origin: 60px 76px; transform-box: view-box; }
@keyframes rise { from { transform: scaleY(.8); } to { transform: scaleY(1.08); } }
.steam { animation: steam 2.4s ease-in-out infinite; opacity: 0; }
.steam.s2 { animation-delay: .8s; } .steam.s3 { animation-delay: 1.6s; }
/* 烤：窗里的暖光一明一暗 */
.oven-glow { fill: var(--crust); opacity: .25; animation: glow 2.2s ease-in-out infinite alternate; }
@keyframes glow { to { opacity: .55; } }
/* 发酵：每个小面团按 --g（跟着发酵进度从 0.66 长到 1）放大；等待时再轻轻呼吸 */
.grow .bun { transform-box: view-box; transform: scale(var(--g, .66)); transition: transform 1.2s ease-out; }
.breathe { transform-box: view-box; animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05, 1.07); } }
.zz { animation: zz 3s ease-out infinite; opacity: 0; }
.zz.z2 { animation-delay: 1.5s; }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 6px); } 30% { opacity: .8; } 100% { opacity: 0; transform: translate(6px, -8px); } }
/* 揉面：擀面杖来回滚，面团被压扁又弹回，偶尔扬起面粉 */
.roll { animation: roll 1.6s ease-in-out infinite; }
@keyframes roll { 0%, 100% { transform: translate(-10px, 0); } 25% { transform: translate(0, 7px); } 50% { transform: translate(10px, 0); } 75% { transform: translate(0, 7px); } }
.knead { transform-origin: 60px 84px; transform-box: view-box; animation: squish 0.8s ease-in-out infinite; }
@keyframes squish { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.08, .86); } }
.flour circle { fill: var(--card); stroke-width: .8; animation: flour 1.6s ease-out infinite; opacity: 0; }
.flour circle:nth-child(2) { animation-delay: .4s; } .flour circle:nth-child(3) { animation-delay: .8s; } .flour circle:nth-child(4) { animation-delay: 1.2s; }
@keyframes flour { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-12px); } }
/* 整形：刮板一下下切、面团转圈收圆；装饰：裱花袋一挤一挤、巧克力滴下来 */
.chop { animation: chop 1.1s ease-in-out infinite; }
@keyframes chop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(7px); } 60% { transform: translateY(7px); } }
.roundup { transform-box: view-box; animation: roundup 1.4s ease-in-out infinite; }
@keyframes roundup { 0%, 100% { transform: rotate(-4deg) scale(1, 1); } 50% { transform: rotate(4deg) scale(1.04, .96); } }
.squeeze { transform-box: view-box; animation: squeeze 1.2s ease-in-out infinite; }
@keyframes squeeze { 0%, 100% { transform: scale(1); } 50% { transform: scale(.94, 1.03); } }
.drip { animation: drip 1.2s ease-in infinite; }
@keyframes drip { 0% { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chop, .roundup, .squeeze, .drip { animation: none; } }
@keyframes steam { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }

/* 配方架：横向滚动 */
.shelf { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; margin: 0 -2px; position: relative; }
.shelf::-webkit-scrollbar { display: none; }
.shelf-board { height: 10px; margin-top: -6px; border-top: 2px solid var(--line); background: linear-gradient(var(--wood), transparent); opacity: .7; }
.shelf .item { flex: 0 0 96px; min-width: 0; text-align: center; text-decoration: none; scroll-snap-align: start; }
.shelf .item svg { width: 62px; height: 62px; display: block; margin: 0 auto 2px; }
.shelf .item > span:not(.pic) { font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf .item:not(.add) > span:not(.pic) { background: #ecdcbf; color: #4a3a2e; margin: 2px 6px 0; padding: 1px 8px; border-radius: 3px; position: relative; transform: rotate(-1.5deg); }
.shelf .item small { color: var(--ink-soft); font-size: 12px; }
.shelf .item.add svg { width: 34px; height: 34px; margin: 14px auto 16px; color: var(--ink-soft); }

/* 作品墙：拍立得 */
.wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; padding-top: 6px; }
.polaroid { background: #fffdf8; padding: 6px 6px 33px; border: 1px solid rgba(90,67,53,.25); box-shadow: 0 3px 8px rgba(90,67,53,.12); text-decoration: none; color: #3f3129; position: relative; }
.polaroid:nth-child(3n+1) { transform: rotate(-2deg); }
.polaroid:nth-child(3n+2) { transform: rotate(1.5deg); }
.polaroid:nth-child(3n) { transform: rotate(-.6deg); }
.polaroid .ph { aspect-ratio: 1; background: #f4ede0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.polaroid .ph img { width: 100%; height: 100%; object-fit: cover; }
.polaroid .ph svg { width: 56%; }
.polaroid figcaption { position: absolute; left: 6px; right: 6px; bottom: 4px; text-align: center; line-height: 1.25; }
/* 名字一行，长了省略；日期单独一行，一直露着 */
.polaroid figcaption .n { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.polaroid figcaption .dt { display: block; font-size: 8.5px; letter-spacing: .02em; margin-top: 1px; color: #8a7767; font-family: var(--mono); }
.polaroid .tape { position: absolute; top: -8px; left: 50%; width: 38px; height: 14px; margin-left: -19px; background: color-mix(in srgb, var(--crust) 30%, transparent); transform: rotate(-4deg); }

/* ---------- 配方列表 ---------- */
.recipe-list { display: grid; gap: 12px; }
.card.recipe-row { display: flex; gap: 14px; align-items: center; }
.recipe-row > .ic { color: var(--ink-soft); }
.recipe-row .t { flex: 1; min-width: 0; }
.recipe-row .t b { display: block; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipe-row .t span { font-size: 13px; color: var(--ink-soft); }

/* 配方架：和首页一样的轻木板——面包和名签站成一排，下面一道细木板边 */
.rack { margin-top: 18px; display: grid; gap: 22px; }
.rack-row { display: grid; grid-template-columns: repeat(var(--per, 3), minmax(0, 1fr)); gap: 8px; padding: 0 2px 12px; position: relative; }
.rack-row::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; border-top: 2px solid var(--line);
  background: linear-gradient(var(--wood), transparent); opacity: .7; }
.rack-item { display: grid; justify-items: center; align-content: start; gap: 2px; text-decoration: none; min-width: 0; }
.rack-item svg.shape { width: 66px; height: 66px; display: block; transition: transform .2s ease; }
.rack-item:active svg.shape { transform: translateY(-3px); }
.rack-item .tag { position: relative; max-width: calc(100% - 8px); padding: 1px 8px; background: #ecdcbf; color: #4a3a2e; border-radius: 3px;
  font-family: var(--title); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: rotate(-1.5deg); }
.rack-item small { font-size: 12px; color: var(--ink-soft); text-align: center; }
.rack-item.add { color: var(--ink-soft); }
.rack-item.add .ic { width: 34px; height: 34px; margin: 14px auto 16px; }
.rack-item.add .ic + span { font-size: 14px; }

/* 价签：面包右上角斜插一张小白卡 */
.pic { position: relative; display: block; }
.shelf .item .pic { width: 62px; margin: 0 auto; }
.shelf .price { right: -18px; }
.price { position: absolute; right: -14px; top: 4px; padding: 0 5px; background: var(--card); color: var(--brown); border: 1.5px solid var(--line);
  border-radius: 3px; font-family: var(--mono); font-weight: 400; -webkit-text-stroke: var(--bold) currentColor; font-size: 12px; line-height: 17px; transform: rotate(9deg); white-space: nowrap; }
.price-chip { cursor: pointer; font-family: var(--mono); font-weight: 400; -webkit-text-stroke: var(--bold) currentColor; color: var(--brown); }
.price-chip .ic { width: 13px; height: 13px; opacity: .6; }
.price-f .row { gap: 8px; align-items: center; }
.price-f .input.num { width: 90px; flex: none; }
.price-f.row { gap: 8px; align-items: center; }

/* 称料勾完后折成一行 */
.ing-folded { display: flex; gap: 8px; align-items: center; width: 100%; padding: 8px 2px; border: 0; background: none; color: var(--ink-soft); cursor: pointer; text-align: left; font: inherit; }
.ing-folded .ic { width: 20px; height: 20px; color: var(--leaf, var(--ink)); }
.ing-folded span:first-of-type { flex: 1; }
.fold-again { margin-top: 6px; }

.search { width: 100%; border: 0; border-bottom: 1.5px solid var(--hair); background: transparent; padding: 8px 2px; outline: none; }

/* ---------- 配方详情 ---------- */
.hero { text-align: center; padding: 6px 0 4px; }
.hero > svg { width: 104px; height: 104px; }
.hero h1 { font-size: 30px; margin: 4px 0 0; letter-spacing: .04em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 11px; border: 1px solid var(--hair); border-radius: 999px; font-size: 14px; background: var(--card); cursor: pointer; }
.chip.on { border-color: var(--ink); color: var(--ink); }
.chip .ic { width: 15px; height: 15px; }
.chip.time { border-style: dashed; cursor: default; background: transparent; }

.ing-table { width: 100%; border-collapse: collapse; }
.ing-table td { padding: 8px 2px; border-bottom: 1.5px dashed color-mix(in srgb, var(--line) 28%, transparent); vertical-align: top; }
.ing-table td.amt { text-align: right; white-space: nowrap; font-family: var(--mono); }
.ing-table .note { color: var(--ink-soft); font-size: 13px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps > li { counter-increment: s; position: relative; padding: 3px 0 26px 42px; min-height: 52px; }
.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 3px; width: 28px; height: 28px;
  /* 编号圈用淡一点的可可色，不要压过正文 */
  border: 1.6px solid color-mix(in srgb, var(--doodle) 55%, var(--paper)); color: color-mix(in srgb, var(--doodle) 65%, var(--paper)); border-radius: 50% 45% 52% 48%;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-family: var(--mono);
}
/* 编号之间的连线：虚线，从这个圆圈底一直接到下一个圆圈顶。
   用重复渐变画虚线（不用 border dashed），再短的步骤也是一串完整的短划，手机上不会只剩一个点 */
.steps > li:not(:last-child)::after { content: ''; position: absolute; left: 13.75px; top: 34px; bottom: -2px; width: 1.5px;
  background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--doodle) 35%, transparent) 0 4px, transparent 4px 8px); }
.steps .meta { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* 步骤里的计时标签：字调淡，只当提示，不跟正文抢 */
.steps .meta .chip.time { color: var(--ink-soft); font-size: 14px; }
.steps .meta .chip.time .muted { opacity: .7; }
.steps .meta:empty { display: none; }
/* 步骤正文：一种颜色读到底（再分深浅色反而花），行距放宽一点好扫读；数字不再单独变色 */
.steps .stext { min-width: 0; overflow-wrap: anywhere; font-size: 17px; line-height: 1.8; letter-spacing: 0; color: color-mix(in srgb, var(--ink) 82%, var(--paper)); }
b.num { font-weight: 400; -webkit-text-stroke: 0; color: inherit; }
/* 每一步的类型：发酵 / 烘烤 / 揉面 / 整形 / 冷却 / 装饰，各一个颜色，编号圆圈也跟着上色 */
/* 只有两种「等」的步骤上色：发酵抹茶绿、烘烤朱红；揉面、整形、冷却、装饰都只是一个灰色小字标签 */
.k-ferment { --k: #7d9150; } .k-bake { --k: var(--shu); }
.kind { display: inline-flex; align-items: center; font-size: 13px; line-height: 22px; padding: 0 10px; border-radius: 999px;
  color: var(--ink-soft); border: 1px solid var(--hair); }
.k-ferment .kind, .kind.k-ferment, .k-bake .kind, .kind.k-bake { color: var(--k); background: color-mix(in srgb, var(--k) 12%, transparent); border-color: color-mix(in srgb, var(--k) 35%, transparent); }
/* 编号圆圈统一一个颜色，类型只看小标签，不然一列彩色圆圈很乱 */
.bake-steps > li.current.k-ferment::before, .bake-steps > li.current.k-bake::before { background: var(--k); border-color: var(--k); color: #fff; }
.notes { white-space: pre-wrap; }

/* ---------- 表单 ---------- */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 2px; }
.input, textarea.input, select.input {
  width: 100%; border: 0; border-bottom: 1.5px solid var(--hair); background: transparent;
  padding: 6px 2px; outline: none; border-radius: 0; min-height: 40px;
}
.input:focus { border-bottom-color: var(--crust); }
textarea.input { border: 1px solid var(--hair); border-radius: 16px; padding: 10px 12px; min-height: 96px; resize: vertical; background: var(--card); }
textarea.input.tall { min-height: 260px; }
.input.num { text-align: right; font-family: var(--mono); }

.edit-grid { display: grid; gap: 6px; }
.edit-ing { display: grid; grid-template-columns: 1fr 72px 56px 34px; gap: 6px; align-items: end; }
.edit-step { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 10px 0; border-bottom: 1.5px dashed color-mix(in srgb, var(--line) 28%, transparent); }
.edit-step .tools { display: flex; gap: 4px; align-items: center; }
.edit-step .tools .input { width: 74px; }

.shape-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shape-pick button { background: none; border: 1.8px solid transparent; border-radius: 16px 13px 17px 12px; padding: 6px 4px; cursor: pointer; font-size: 13px; }
.shape-pick button svg { width: 44px; height: 44px; display: block; margin: 0 auto; }
.shape-pick button.on { border-color: var(--line); background: var(--paper-2); }

/* ---------- 烘焙中：大烤箱 ---------- */
.bake-head { display: flex; align-items: center; gap: 8px; }
.bake-head .t { flex: 1; min-width: 0; }
.bake-head .t b { font-size: 22px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bake-head .t span { font-size: 13px; color: var(--ink-soft); }

.bake-hero { text-align: center; margin: 6px 0 4px; }
.oven-wrap { position: relative; width: min(70%, 300px); margin: 0 auto; }
.oven-wrap > svg { width: 100%; height: auto; display: block; }
.oven-wrap .display {
  position: absolute; left: 35%; width: 30%; top: 24%; height: 7.8%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: clamp(12px, 3.6vw, 16px); color: var(--ink); letter-spacing: .04em;
}
.oven-wrap .display.ring { color: var(--danger); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.hero-clock { font-family: var(--mono); font-size: 34px; line-height: 1; margin: 8px 0 0; color: var(--ink); letter-spacing: .04em; }
.hero-clock.ring { color: var(--danger); animation: blink 1s steps(2) infinite; }
.hero-clock.small { font-size: 15px; color: var(--ink-soft); }
.oven-wrap .mascot { position: absolute; right: -26%; bottom: 4%; width: 25%; }
.step-now { margin: 16px 2px 18px; padding: 12px 14px 12px 16px; border-radius: 14px; background: var(--card); text-align: left;
  border-left: 4px solid var(--k, var(--hair)); }
.step-now .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step-now .n { font-size: 13px; color: var(--ink-soft); }
.step-now p { margin: 6px 0 0; overflow-wrap: anywhere; font-size: 17px; line-height: 1.65; letter-spacing: .02em; color: color-mix(in srgb, var(--ink) 62%, var(--paper)); }
/* 计时控制：一排轻量的文字按钮 */
.timer-ctl { display: flex; justify-content: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.link-btn { display: inline-flex; max-width: 100%; align-items: center; gap: 4px; background: none; border: 0; padding: 6px 10px; border-radius: 999px; color: var(--ink-soft); font-size: 14px; cursor: pointer; }
.link-btn .ic { width: 15px; height: 15px; color: currentColor; }
.link-btn:active { background: var(--lens); }
/* 步骤列表里正在计时的那一步，后面挂一个小时钟 */
.tick { font-size: 14px; color: var(--shu); margin-left: 4px; white-space: nowrap; }
.hero-hint { margin: 4px 0 12px; font-size: 13px; color: var(--ink-soft); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1.5px dashed color-mix(in srgb, var(--line) 28%, transparent); cursor: pointer; }
.checklist li .box { width: 22px; height: 22px; border: 1.8px solid var(--line); border-radius: 4px 7px 5px 6px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--card); }
.checklist li .box svg { width: 18px; height: 18px; }
.checklist li.done .name { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--ink-soft); }
.checklist li .name { flex: 1; }
.checklist li .amt { font-family: var(--mono); white-space: nowrap; }

.bake-steps > li.current::before { background: var(--shu); color: #fff; border-color: var(--shu); }
.bake-steps > li.done { color: var(--ink-soft); }
.bake-steps > li.done::before { content: '✓'; }
.bake-steps > li.done .stext { color: color-mix(in srgb, var(--ink) 38%, var(--paper)); }

@keyframes shake { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }

.badge { display: inline-block; font-size: 12px; padding: 0 9px; border: 1px solid var(--hair); border-radius: 999px; background: transparent; }


/* ---------- 出炉 ---------- */
.photo-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 4/3; border: 1.5px dashed var(--hair); border-radius: 18px; cursor: pointer; overflow: hidden; position: relative; color: var(--ink-soft); background: var(--card); }
.photo-drop svg.ic { width: 44px; height: 44px; }
button.photo-drop { width: 100%; font: inherit; padding: 0; }
.photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 打分：五颗手绘星星，点亮的上金黄色，没点亮的只是淡淡的线；下面一句评语 */
.rating-wrap { display: grid; justify-items: center; gap: 2px; margin-top: 8px; }
.rating { display: flex; gap: 2px; justify-content: center; }
.rating button { background: none; border: 0; padding: 3px; cursor: pointer; transition: transform .15s ease; }
.rating button:active { transform: scale(.88); }
.rating button svg { width: 40px; height: 40px; display: block; }
.rate-star { color: var(--doodle); }
.rate-star:not(.on) { color: color-mix(in srgb, var(--doodle) 35%, transparent); }
.rating button.on svg { animation: pop .25s ease-out; }
@keyframes pop { 0% { transform: scale(.75) rotate(-8deg); } 70% { transform: scale(1.12) rotate(3deg); } 100% { transform: scale(1); } }
.rating-word { font-size: 14px; color: var(--ink-soft); letter-spacing: .04em; min-height: 1.5em; }
.mini-rate { display: inline-flex; gap: 0; vertical-align: -3px; margin-right: 6px; }
.mini-rate svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) { .rating button.on svg { animation: none; } }
.choice { display: grid; gap: 8px; }
.choice label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border: 1px solid var(--hair); border-radius: 16px; cursor: pointer; background: var(--card); }
.choice label:has(input:checked) { background: var(--crust-soft); }
.choice input { margin-top: 5px; accent-color: var(--leaf); }
.choice small { display: block; color: var(--ink-soft); }

.diff { font-size: 14px; margin: 0; padding-left: 18px; }
.diff .old { text-decoration: line-through; color: var(--ink-soft); }

/* ---------- 烘焙日历 ---------- */
.cal-head { text-align: center; margin: 8px 0 14px; }
.cal-head .y { font-family: var(--mono); font-size: 18px; letter-spacing: .1em; }
.cal-head .m { font-family: var(--mono); font-size: 26px; display: flex; align-items: center; justify-content: center; gap: 16px; }
.cal-head .m button { background: none; border: 0; padding: 6px; cursor: pointer; }
.cal-head .m button .ic { width: 18px; height: 18px; color: var(--ink-soft); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 6px; text-align: center; font-family: var(--mono); }
.cal .wd { font-size: 13px; color: var(--ink); padding-bottom: 8px; }
.cal .d { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 15px; position: relative; text-decoration: none; border-radius: 50%; }
.cal .d.out { visibility: hidden; }
.cal .d svg { width: 88%; height: 88%; }
.cal .d .cnt { position: absolute; right: 0; top: 0; font-size: 10px; background: var(--shu); color: #fff; border-radius: 999px; min-width: 16px; line-height: 16px; }
.cal-stats { margin-top: 26px; }
.cal-stats .stat span { font-family: var(--mono); color: var(--ink-soft); }
.cal-title { text-align: center; font-family: var(--mono); margin: 30px 0 4px; font-size: 18px; letter-spacing: .06em; }

/* 日记条目 */
.diary-list { display: grid; gap: 14px; margin-top: 10px; }
.card.diary-row { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.diary-row .ph { width: 74px; height: 74px; flex: none; border-radius: 14px; overflow: hidden; background: var(--paper-2); display: flex; align-items: center; justify-content: center; }
.diary-row .ph img { width: 100%; height: 100%; object-fit: cover; }
.diary-row .ph svg { width: 70%; }
.diary-row .t { flex: 1; min-width: 0; }
.diary-row .t .date { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.diary-row .t b { display: block; font-size: 17px; }

/* 日记详情 */
.diary { text-align: center; }
.diary .date { font-family: var(--mono); font-size: 22px; letter-spacing: .04em; margin-top: 4px; }
.diary .wday { font-family: var(--mono); color: var(--ink-soft); font-size: 17px; }
.diary > svg.shape { width: 56px; height: 56px; margin: 14px auto 0; display: block; }
.diary .name { font-size: 22px; margin: 2px 0 16px; letter-spacing: .04em; }
.diary .photo { border-radius: 18px; overflow: hidden; background: var(--paper-2); position: relative; }
.hanko { position: absolute; right: 12px; bottom: 12px; width: 64px; height: 64px; color: var(--shu); transform: rotate(-12deg); }
.hanko .hanko-text { fill: var(--shu); letter-spacing: .05em; }
.diary .photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.diary .photo .ph-empty { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; }
.diary .photo .ph-empty svg { width: 34%; }
.diary .meta { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 2px; line-height: 1.4; }
/* 日记照片角上的「换照片」 */
.photo-change { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px 5px 8px; border-radius: 999px; background: rgba(255, 252, 245, .88); color: var(--ink); font-size: 13px; cursor: pointer; box-shadow: var(--shadow); }
.photo-change .ic { width: 16px; height: 16px; }

details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '▸ '; }
details[open] > summary::before { content: '▾ '; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--ink-soft); padding: 18px 0 8px; }
.empty svg { width: 160px; height: auto; display: block; margin: 0 auto 8px; }
.empty .mascot { width: 72px; }

/* ---------- 底部菜单栏：iOS 26 风格的悬浮玻璃胶囊 ----------
   半透明 + 背景模糊，顶边一道高光；选中项下面有一块会滑动的"镜片"；
   往下滚动时缩成只有图标的小胶囊，往上滚又展开 */
.tabbar {
  position: fixed; left: 0; right: 0; z-index: 10;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  display: flex; justify-content: center; padding: 0 20px; pointer-events: none;
}
.tabbar nav {
  --n: 3;
  pointer-events: auto; position: relative; display: flex;
  width: min(100%, 340px); height: var(--tabbar-h); padding: 5px;
  border-radius: 999px; isolation: isolate;
}
/* 玻璃底画在伪元素上 */
.tabbar nav::after {
  content: ''; position: absolute; inset: 0; z-index: -2; border-radius: 999px; pointer-events: none;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 10px 34px var(--glass-shade), 0 1px 3px var(--glass-shade),
              inset 0 1px 0 var(--glass-edge), inset 0 0 0 .5px var(--glass-edge);
}
/* 顶部那道弯弯的高光，像玻璃的反光 */
.tabbar nav::before {
  content: ''; position: absolute; inset: 1px 14% auto; height: 45%; border-radius: 999px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, var(--glass-edge), transparent); opacity: .55;
}
/* 选中项下面的镜片：按 --i 滑到对应位置，带一点回弹 */
.tabbar .lens {
  position: absolute; top: 5px; bottom: 5px; left: 5px; z-index: -1;
  width: calc((100% - 10px) / var(--n)); border-radius: 999px;
  background: var(--lens); box-shadow: inset 0 0 0 .5px var(--glass-edge);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform .5s cubic-bezier(.3, 1.4, .5, 1);
}
.tabbar a {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  text-decoration: none; font-size: 11px; line-height: 1.2; color: var(--ink-soft); border-radius: 999px;
  transition: transform .2s ease;
}
.tabbar a:active { transform: scale(.92); }
.tabbar a .tab-ic { display: flex; font-style: normal; }
.tabbar a .ti { width: 28px; height: 28px; color: var(--ink-soft); }
.tabbar a span { white-space: nowrap; }
.tabbar a.on { color: var(--shu); -webkit-text-stroke: var(--bold) currentColor; }
.tabbar a.ticking span { color: var(--shu); font-size: 11px; letter-spacing: .02em; }
.tabbar a.on .ti { color: var(--doodle); }
.tabbar a:focus-visible { outline: 2px solid var(--ink-soft); outline-offset: -4px; }

/* ---------- 弹窗 ---------- */
/* 弹窗只在安全区里居中：让开系统的菜单栏和按钮（普通 iPhone 底部的菜单栏、iPhone Duo 右边那一竖条），不会被盖住 */
dialog {
  --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px);
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  border: 0; border-radius: 26px; background: var(--card) var(--grain); color: var(--ink);
  padding: 22px; box-shadow: 0 20px 60px rgba(40, 30, 22, .25);
  inset: var(--st) var(--sr) var(--sb) var(--sl); margin: auto;
  width: min(400px, calc(100vw - var(--sl) - var(--sr) - 32px));
  max-height: calc(100dvh - var(--st) - var(--sb) - 24px); overflow-y: auto;
}
dialog::backdrop { background: rgba(50, 38, 30, .35); }
dialog h3 { margin: 0 0 8px; font-size: 21px; }
/* 弹窗一打开系统会把焦点放到第一个按钮上，iOS 上就是一圈蓝框；点按的时候不需要这圈框 */
dialog button:focus:not(:focus-visible), dialog [data-dlg]:focus { outline: none; }
/* 选完照片后的调整框：正方形（作品墙、日记里都是正方形显示），拖动 / 缩放；抠过图的露出纸色底，和拍立得里一样 */
.pe-frame { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: #f4ede0; touch-action: none; cursor: grab; margin: 10px 0 8px; box-shadow: inset 0 0 0 1px var(--hair); }
.pe-frame .pe-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-select: none; pointer-events: none; }
.pe-opts { gap: 8px; margin: 2px 0 14px; }
.alarm { text-align: center; }
.alarm svg.ic { width: 72px; height: 72px; animation: shake .25s ease-in-out infinite alternate; }
.alarm .mascot { width: 70px; display: block; margin: 0 auto 4px; }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 14px); transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 18px; border-radius: 999px; font-size: 15px; animation: pop .25s ease-out; max-width: calc(100% - 32px); }
@keyframes pop { from { transform: translate(-50%, -10px); opacity: 0; } }

.celebrate { text-align: center; }
.celebrate .duo { display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.celebrate .duo .shape { width: 92px; height: 92px; }
.celebrate .duo .mascot { width: 62px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.card.settings-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.card.settings-link > .ic { width: 18px; height: 18px; color: var(--ink-soft); flex: none; }

/* 配方页：店里有新版的内置配方 */
.catalog-update { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--card); font-size: 14px; }
.catalog-update > .ic { width: 18px; height: 18px; color: var(--brown); }
.catalog-update > span { flex: 1; min-width: 140px; }

/* 边等边做：后台还在走的发酵 / 烘烤计时，做别的步骤时显示成一条，点一下回去看 */
.bg-timer { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 360px; margin: 10px auto 0; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--k, var(--ink)) 45%, transparent); background: color-mix(in srgb, var(--k, var(--ink)) 8%, var(--card));
  color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.bg-timer .ic { width: 16px; height: 16px; color: var(--k, var(--ink)); flex: none; }
.bg-timer span:first-of-type { flex: 1; min-width: 0; text-align: left; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bg-timer b, .bg-timer .go { flex: none; }
.bg-timer b { font-weight: 400; -webkit-text-stroke: 0; font-size: 16px; color: var(--k, var(--ink)); }
.bg-timer .go { color: var(--ink-soft); font-size: 13px; }
.bg-timer.ring b { animation: blink 1s steps(2) infinite; }
/* 「边等边做下一步」：主按钮下面一个小一号的描边按钮 */
.ahead-btn { display: flex; margin: 12px auto 0; }
.ahead-btn .ic { width: 16px; height: 16px; }
/* 按钮下面预告下一步做什么 */
.up-next { display: flex; gap: 8px; align-items: baseline; max-width: 340px; margin: 14px auto 0; padding-top: 10px; border-top: 1.5px dashed var(--hair);
  font-size: 14px; line-height: 1.6; color: color-mix(in srgb, var(--ink) 55%, var(--paper)); text-align: left; }
.up-next .n { flex: none; font-size: 12px; padding: 0 8px; border: 1px solid var(--hair); border-radius: 999px; color: var(--ink-soft); }
.up-next span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 补记一炉 */
.backfill-cta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.cal button.d { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cal button.d:active { background: var(--lens); }
/* 小圆点：选中的那天黑点，今天红点；紧挨在数字下面（画了面包的格子在面包下面） */
.cal .d.sel::after, .cal .d.today::after { content: ''; position: absolute; left: 50%; top: calc(50% + 17px); width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--ink-soft); opacity: .7; }
.cal .d.today::after { background: var(--shu); }
.cal .d.has.sel::after, .cal .d.has.today::after { top: calc(50% + 22px); }
.cal-swipe.slide-next { animation: cal-in-next .22s ease-out; }
.cal-swipe.slide-prev { animation: cal-in-prev .22s ease-out; }
@keyframes cal-in-next { from { transform: translateX(28px); opacity: 0; } }
@keyframes cal-in-prev { from { transform: translateX(-28px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cal-swipe { animation: none !important; } }
.cal .d.future { opacity: .3; }
.cal-head .m button:disabled { opacity: .2; pointer-events: none; }
.day-head { margin: 28px 2px 10px; display: flex; align-items: baseline; gap: 8px; font-family: var(--mono); }
.day-head b { font-size: 17px; }
.day-head span { color: var(--ink-soft); font-size: 13px; }
.day-empty { margin-top: 6px; padding: 10px 0 0; }
.bf-recipes { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; }
.bf-recipes::-webkit-scrollbar { display: none; }
.bf-recipes button { flex: none; width: 86px; display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 16px; border: 1.8px solid transparent;
  background: none; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.bf-recipes button svg { width: 46px; height: 46px; }
.bf-recipes button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-recipes button.on { border-color: var(--line); background: var(--paper-2); }
.bf-when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bf-when .f:last-child:nth-child(3) { grid-column: 1 / -1; }
.bf-when .input { width: 100%; }
.edit-time { display: inline-flex; margin-left: 4px; font-size: 13px; line-height: 1.4; padding: 2px 8px; }

/* 首页最下面的小房子 */
.home-foot { display: flex; justify-content: center; margin: 40px 0 0; }
.house-logo { width: 46px; height: 46px; color: var(--doodle); opacity: .85; }
.house-logo .pretzel-in { stroke: var(--crust); }

/* ---------- 刘海 / 状态栏在侧边的屏幕（折叠屏 iPhone Duo 的状态栏是右边一竖条）----------
   左右也让开安全区；窄屏时只让顶栏让开，免得右上角的按钮被状态栏盖住 */
.greet, .topbar { padding-right: env(safe-area-inset-right); }
.tabbar { left: env(safe-area-inset-left); right: env(safe-area-inset-right); }
.toast { left: calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2); }

/* ---------- 宽屏：折叠屏展开、iPad ----------
   表单类的页面保持一栏、读起来舒服的宽度；店铺、配方、日历铺开成左右两栏，左边那栏停在原地不跟着滚 */
@media (min-width: 720px) {
  #app, .under {
    max-width: none;
    padding-left: calc(env(safe-area-inset-left) + 32px);
    padding-right: calc(env(safe-area-inset-right) + 32px);
  }
  .greet, .topbar { padding-right: 0; }
  #app > *, .under > *, #app > .rfont > *, .under > .rfont > * { max-width: 600px; margin-left: auto; margin-right: auto; }
  #app.wide > *, .under.wide > *, #app.wide > .rfont > *, .under.wide > .rfont > * { max-width: 1040px; }
  #app.wide > .topbar { margin-bottom: 4px; }

  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0 48px; align-items: start; }
  .home > .col-a, .logs > .col-a { position: sticky; top: calc(env(safe-area-inset-top) + 14px); }
  .split > .col-b > h2:first-child { margin-top: 6px; }
  /* 店铺左栏像一扇橱窗：淡淡一层底色，把小店和右边的清单分开 */
  .home > .col-a { padding: 16px 20px 22px; border-radius: 28px; background: color-mix(in srgb, var(--paper-2) 55%, transparent); }

  /* 店铺：左边问候 + 小店 + 等级 + 数字，右边烤箱、配方架、作品墙 */
  .home .storefront { max-width: 400px; }
  .home .stats { margin-top: 18px; }
  .home .home-foot { margin-top: 28px; }
  .home .wall { grid-template-columns: repeat(3, 1fr); }

  /* 整面作品墙：宽屏一行六张 */
  .wall-page .wall { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 14px; }

  /* 配方：左边配方架（自己滚、停在原地），右边点中的那款；右边窄，详情还是一栏 */
  .md { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 0 32px; align-items: start; }
  .md-list {
    position: sticky; top: calc(env(safe-area-inset-top) + 14px);
    max-height: calc(100dvh - env(safe-area-inset-top) - 28px); overflow-y: auto; overscroll-behavior: contain;
    padding: 14px 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
    background: color-mix(in srgb, var(--paper-2) 55%, transparent); border-radius: 28px;
  }
  .md-list::-webkit-scrollbar { display: none; }
  .md-list .topbar h1 { font-size: 22px; }
  .md-list .rack { margin-top: 12px; }
  /* 选中的那款：面包被轻轻拿起来一点，名签换成面包黄 */
  .rack-item.on svg.shape { transform: translateY(-6px) rotate(-4deg); }
  .rack-item.on .tag { background: var(--crust); }
  .md .split { display: block; }
  .md-detail .hero > svg { width: 120px; height: 120px; }

  /* 烘焙：左边动画、这一步和「下一步」按钮停在原地，右边称料和全部步骤 */
  .bake > .col-a { position: sticky; top: calc(env(safe-area-inset-top) + 14px); }
  .bake .bake-hero { margin-top: 0; }
  .bake > .col-b > h2:first-child { margin-top: 10px; }

  /* 配方详情：左边面包、开烤、材料；右边步骤 */
  .recipe .hero > svg { width: 128px; height: 128px; }
  .recipe .col-a > h2 { margin-top: 26px; }

  /* 日历：左边月历，右边那天烤了什么 */
  .logs .cal-head { margin-top: 0; }
  .logs .col-b > .day-head:first-child { margin-top: 6px; }
  .logs .cal-stats { margin-top: 18px; }
}
/* 横着但不高的宽屏（折叠屏展开横拿）：小店画小一点，问候和数字都放得下 */
@media (min-width: 720px) and (max-height: 760px) {
  .home .storefront { max-width: 340px; }
  .logs .cal { row-gap: 2px; }
  .logs .cal .d { aspect-ratio: auto; height: 50px; }
}

/* ---------- iOS App：用系统原生菜单栏（NativeTabs.swift）----------
   网页画的胶囊不要了；系统菜单栏占的地方已经算进安全区里（普通 iPhone 在底部，iPhone Duo 竖在右边），页面让开安全区就行 */
html.native-tabs .tabbar { display: none; }
html.native-tabs #app, html.native-tabs .under { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
/* 左右也整页让开安全区（iPhone Duo 右边一竖条是状态栏 + 系统菜单栏）；宽屏的两侧留白在上面已经算进去了 */
@media (max-width: 719.98px) {
  html.native-tabs #app, html.native-tabs .under { padding-left: calc(env(safe-area-inset-left) + 16px); padding-right: calc(env(safe-area-inset-right) + 16px); }
  html.native-tabs .greet, html.native-tabs .topbar { padding-right: 0; }
}
html.native-tabs .md-list { padding-bottom: 24px; }
/* 顶栏的返回键和带 data-tool 的按钮搬到了系统导航栏上（syncNativeBar），网页里藏起来；标题留着（手绘字体）。
   返回键的位置空出来给系统的返回按钮，标题往右让一点；顶栏里什么都不剩（比如配方详情只有个空标题）就整条收起 */
html.native-tabs .topbar > a.btn.icon:first-child,
html.native-tabs .bake-head > a.btn.icon:first-child,
html.native-tabs [data-tool], html.native-tabs [data-tool-menu] { display: none; }
html.native-tabs .topbar:has(> a.btn.icon:first-child), html.native-tabs .bake-head { padding-left: 52px; }
html.native-tabs .topbar, html.native-tabs .greet, html.native-tabs .bake-head { min-height: 48px; }
/* 顶栏这一行和系统导航栏那一行对齐（系统按钮浮在这一行的右边 / 左边） */
html.native-tabs #app, html.native-tabs .under { padding-top: env(safe-area-inset-top); }
html.native-tabs .topbar:not(:has(> :not(a.btn.icon:first-child):not(h1:empty):not([data-tool]):not([data-tool-menu]))) { visibility: hidden; }

/* ---------- 折叠屏半折（html.laptop）：烘焙页分上下两截 ----------
   上半截（折痕以上，立着的那半）固定显示正在进行的这一步：动画在左，步骤、按钮在右；
   下半截（平放的那半）是称料、全部步骤这些，自己往上滚，滚到折痕就钻到上半截下面，上半截不跟着动 */
html.laptop #app:has(> .split.bake, > .rfont > .split.bake) { padding-top: calc(var(--fold-bottom) + 12px); }
html.laptop .split.bake { display: block; }
html.laptop .split.bake > .col-a {
  /* 一直盖到折痕下沿：滚上来的内容不会从折痕那条缝里露出来；内容只排在折痕以上 */
  position: fixed; z-index: 5; left: 0; right: 0; top: 0; height: var(--fold-bottom);
  padding: calc(env(safe-area-inset-top) + 8px) calc(env(safe-area-inset-right) + 20px) calc(var(--fold-bottom) - var(--fold-top) + 10px) calc(env(safe-area-inset-left) + 20px);
  display: flex; align-items: center; overflow: hidden;
  background: var(--paper) var(--grain); box-shadow: 0 1px 0 var(--hair);
}
html.laptop .bake .bake-hero {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 24px; align-items: center;
  width: 100%; max-width: 820px; margin: 0 auto;
}
html.laptop .bake .bake-hero > .oven-wrap { grid-column: 1; grid-row: 1 / span 8; width: min(80%, 260px); }
html.laptop .bake .bake-hero > :not(.oven-wrap) { grid-column: 2; }
html.laptop .bake .step-now { margin: 0 0 12px; }
html.laptop .bake .up-next { margin-top: 8px; }
html.laptop .bake > .col-b > h2:first-child { margin-top: 4px; }

/* ---------- Duo 立起来当小闹钟、正在烤（html.focus）：整屏只放现在这一步 ----------
   烘焙页别的东西（顶上的配方名、称料、全部步骤、提示语）都藏起来；动画、计时、这一步、主按钮、下一步居中放大 */
html.focus #app { padding: 0 !important; }
html.focus #app > :not(.split.bake):not(.rfont), html.focus .rfont > :not(.split.bake) { display: none !important; }
html.focus .split.bake { display: block; }
html.focus .split.bake > .col-b { display: none; }
html.focus .split.bake > .col-a {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 12px) calc(env(safe-area-inset-right) + 20px) calc(env(safe-area-inset-bottom) + 12px) calc(env(safe-area-inset-left) + 20px);
}
html.focus .bake .bake-hero { width: 100%; max-width: 560px; margin: 0 auto; }
html.focus .bake .hero-hint { display: none; }
html.focus .bake .step-now p { font-size: clamp(19px, 5vw, 28px); line-height: 1.45; }
/* 横着立起来（屏幕又宽又矮）：动画在左，步骤和按钮在右，和半折时上半截一样 */
@media (orientation: landscape) {
  html.focus .bake .bake-hero { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 24px; align-items: center; max-width: 820px; }
  html.focus .bake .bake-hero > .oven-wrap { grid-column: 1; grid-row: 1 / span 8; width: min(80%, 260px); }
  html.focus .bake .bake-hero > :not(.oven-wrap) { grid-column: 2; }
}

/* ---------- 折叠屏合上（html.folded，外屏）：首页第一屏正好是问候、小店、等级、三个数字 ----------
   这一块撑满一屏，小店落在等级牌上面，数字贴着屏幕下沿；烤箱、配方架、作品墙往下滑才出来 */
@media (max-width: 719.98px) {
  html.folded .split.home > .col-a {
    display: flex; flex-direction: column;
    min-height: calc(100dvh - env(safe-area-inset-top)); padding-bottom: 18px;
  }
  /* 问候、小店、等级、数字四块之间的空隙一样大（多出来的高度平均分到几处空隙里） */
  html.folded .split.home > .col-a { justify-content: space-between; }
  /* 小店的宽度要写明：竖排的弹性布局里会缩成 0 宽（它按自身宽度排招牌字） */
  html.folded .split.home > .col-a > .storefront { width: 100%; }
  html.folded .split.home > .col-a > .shop-meta, html.folded .split.home > .col-a > .stats { margin-top: 0; }
}

/* ---------- 小店插画的小动作（只在页面里的小店上，桌面小组件的图不动；系统开了「减弱动态效果」就全停） ----------
   小面包人站在门口慢悠悠地左右晃（像在哼歌）；Lv2 猫尾巴摆；Lv3 茶冒热气；Lv5–6 客人轮流晃、小旗被风吹；Lv7–8 露台小灯一闪一闪 */
@media (prefers-reduced-motion: no-preference) {
  .storefront .shop-mascot { transform-box: fill-box; transform-origin: 50% 100%; animation: shop-sway 3.6s ease-in-out infinite; }
  .storefront .cat-tail { transform-box: fill-box; transform-origin: 0% 100%; animation: tail-wag 2.6s ease-in-out infinite; }
  .storefront .tea-steam { animation: tea-steam 3s ease-in-out infinite; }
  .storefront .queue { transform-box: fill-box; transform-origin: 50% 100%; animation: queue-sway 3.2s ease-in-out infinite; }
  .storefront .flag { transform-box: fill-box; transform-origin: 0% 100%; animation: flag-wave 3.8s ease-in-out infinite; }
  .storefront .bulb { animation: bulb-twinkle 2.4s ease-in-out infinite; }
  .storefront .bulb:nth-child(2n) { animation-delay: .8s; }
  .storefront .bulb:nth-child(3n) { animation-delay: 1.6s; }
}
@keyframes shop-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes tail-wag { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }
@keyframes tea-steam { 0% { opacity: 0; transform: translateY(2px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-4px); } }
@keyframes queue-sway { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.6deg); } 75% { transform: rotate(1.6deg); } }
@keyframes flag-wave { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2.4deg); } 60% { transform: rotate(1.2deg); } }
@keyframes bulb-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* 隐藏款：灯罩里暖黄的光 */
.store .glow { fill: #f6d27a; }

/* 配方详情页和烘焙页：烘焙页外面包的 .rfont（display: contents）不影响排版；字体和全 app 一样 */
.rfont { display: contents; }
.split.recipe, .rfont {
  --font: 'AppFont', 'ShopFont', 'PingFang SC', 'Noto Sans SC', sans-serif;
  --title: 'AppFont', 'ShopFont', 'PingFang SC', sans-serif;
  --mono: 'Courier Prime', 'Courier New', 'AppFont', ui-monospace, monospace;
  font-family: var(--font);
}

/* 导入页：给 AI 助手的提示词 */
.ai-help { margin-top: 18px; padding: 12px 14px; }
.ai-help summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; font-family: var(--title); font-size: 15px; }
.ai-help summary::-webkit-details-marker { display: none; }
.ai-help summary::marker { content: ""; }
.ai-help > summary::before { content: none; }
.ai-help summary::after { content: '›'; margin-left: auto; color: var(--ink-soft); transition: transform .2s ease; }
.ai-help[open] summary::after { transform: rotate(90deg); }
.ai-help summary .ic { width: 18px; height: 18px; }
.ai-help > p { margin: 10px 0 8px; }
.ai-prompt { white-space: pre-wrap; font-family: var(--font); font-size: 13px; line-height: 1.6; color: var(--ink); background: var(--paper-2); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; max-height: 260px; overflow-y: auto; -webkit-user-select: text; user-select: text; }
