/* fb_base.css — 「野帳」component recipes (reference/ui-fieldbook/mockup.html section 2 RECIPES, DESIGN §2, §4, §5.7). r48 fb-p0.
 *
 * Two parts:
 *  A. Helper tokens that are not in DESIGN §3 (kept out of fb_tokens.css so that file stays verbatim).
 *  B. The recipe library, copied from the mockup with every selector prefixed by "html.fb ". The app's DOM has no
 *     fb-* class (checked: 0 nodes in every dumped screen, INVENTORY.md §0), so this part paints nothing by itself.
 *     It is the reference copy of each recipe's declarations: P1-P3 write the SAME declarations under
 *     "html.fb <old selector>" in fb_gate/camp/windows/run.css (DESIGN §4 - never by adding fb-* classes to the DOM).
 *
 * P0 rule: nothing in this file may change a pixel of the existing screens (P0 acceptance, DESIGN §6: default skin ==
 * legacy skin while the per-screen files are empty). The old-selector mappings DESIGN §5.2 assigns to this file
 * (buttons, inputs, #modal scrim, #toast, global :focus-visible) are therefore NOT here yet; they start in P1
 * (INVENTORY.md §10 "P1 base mappings").
 * No blur, no backdrop-filter, no soft shadows (DESIGN §2 質感規則). */

/* ---------- A. helper tokens ---------- */
html.fb{
  /* 子面板標題帶的螢光筆顏色（DESIGN §4.4：.teal→#BFE3C8、.gold→--fb-marker、.blue→#C9DBF2） */
  --fb-mk-teal:#BFE3C8; --fb-mk-gold:var(--fb-marker); --fb-mk-blue:#C9DBF2;
  /* 營地功能標籤的色邊（DESIGN §4.3：角色、天賦、強化、商城、選單） */
  --fb-tab-char:var(--fb-seal); --fb-tab-talent:var(--fb-t2); --fb-tab-enh:var(--fb-blue); --fb-tab-cash:var(--fb-foil); --fb-tab-menu:var(--fb-ink);
}

/* ---------- B. recipe library (mockup section 2, prefixed with html.fb) ---------- */
html.fb .fb-page{background:var(--fb-grid-bg),var(--fb-page);color:var(--fb-ink);border:2px solid var(--fb-ink);border-radius:3px}
html.fb .fb-cover{background:var(--fb-weave),var(--fb-cover);color:var(--fb-foil-lite)}
html.fb .fb-slip{background:var(--fb-slip);color:var(--fb-ink);border:1.5px solid var(--fb-ink);border-radius:2px}

html.fb .fb-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 16px;font:700 13px/1 var(--fb-text);letter-spacing:.18em;text-indent:.18em;color:var(--fb-foil-lite);background:var(--fb-weave),var(--fb-cover);border:2px solid var(--fb-ink);border-radius:2px;box-shadow:var(--fb-lift);cursor:pointer}
html.fb .fb-btn:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--fb-ink)}
html.fb .fb-btn:focus-visible{outline:2px solid var(--fb-marker);outline-offset:2px}
html.fb .fb-btn.paper{background:var(--fb-slip);color:var(--fb-ink)}
html.fb .fb-btn.danger{background:var(--fb-slip);color:var(--fb-seal-deep);border-color:var(--fb-seal-deep);box-shadow:3px 3px 0 var(--fb-seal-deep)}
html.fb .fb-btn.off{background:var(--fb-page-2);color:var(--fb-ink-3);border-style:dashed;box-shadow:none;cursor:default}
html.fb .fb-btn.sm{height:24px;padding:0 10px;font-size:11px;letter-spacing:.08em;text-indent:.08em;box-shadow:2px 2px 0 var(--fb-ink)}

html.fb .fb-ticket{position:relative;display:inline-flex;align-items:center;justify-content:center;height:44px;padding:0 22px 0 36px;font:900 19px/1 var(--fb-display);letter-spacing:.28em;color:var(--fb-foil-lite);background:var(--fb-weave),var(--fb-cover);border:2px solid var(--fb-ink);border-radius:2px;box-shadow:4px 4px 0 var(--fb-ink);cursor:pointer}
html.fb .fb-ticket::before{content:"";position:absolute;left:22px;top:5px;bottom:5px;border-left:2px dotted rgba(240,217,138,.75)}
html.fb .fb-ticket::after{content:"";position:absolute;left:8px;top:50%;width:7px;height:7px;margin-top:-4px;border-radius:50%;background:var(--fb-foil)}
html.fb .fb-ticket:active{transform:translate(2px,2px);box-shadow:2px 2px 0 var(--fb-ink)}

html.fb .fb-line{display:flex;align-items:baseline;gap:10px;border-bottom:2px solid var(--fb-ink);padding:7px 2px 5px}
html.fb .fb-line i{flex:none;width:40px;font:700 11px var(--fb-text);font-style:normal;color:var(--fb-ink-2)}
html.fb .fb-line input{flex:1;min-width:0;border:0;background:none;padding:0;font:600 14px var(--fb-text);color:var(--fb-ink);outline:0}
html.fb .fb-line input::placeholder{font:13px var(--fb-note);color:var(--fb-ink-3)}
html.fb .fb-line:focus-within{border-bottom-color:var(--fb-seal);background:linear-gradient(transparent 62%,rgba(246,224,94,.6) 62%)}

html.fb .fb-tabs{display:flex;gap:4px;align-items:flex-end}
html.fb .fb-tab{height:22px;padding:0 11px;font:700 11px/20px var(--fb-text);color:var(--fb-ink-2);background:var(--fb-page-2);border:2px solid var(--fb-ink);border-bottom:0;border-radius:5px 5px 0 0;white-space:nowrap}
html.fb .fb-tab b{font:700 12px var(--fb-num);margin-right:4px}
html.fb .fb-tab.on{height:27px;line-height:27px;background:var(--fb-page);color:var(--fb-ink);box-shadow:inset 0 4px 0 var(--tab,var(--fb-seal))}
html.fb .fb-tab.done{color:var(--fb-ink-3)}
html.fb .fb-tab.done b::after{content:"\2713";margin-left:2px;color:var(--fb-t0)}

html.fb .fb-stamp{display:inline-grid;place-items:center;padding:4px 10px;font:900 13px/1 var(--fb-display);letter-spacing:.14em;color:var(--fb-seal);border:2px solid currentColor;border-radius:4px;outline:1px solid currentColor;outline-offset:2px;transform:rotate(-6deg);opacity:.92;white-space:nowrap}
html.fb .fb-stamp.round{width:40px;height:40px;padding:0;border-radius:50%;letter-spacing:0}
html.fb .fb-stamp.blue{color:var(--fb-blue)} html.fb .fb-stamp.foil{color:var(--fb-foil)} html.fb .fb-stamp.ink{color:var(--fb-ink-2)}
/* the only active animation of the skin (DESIGN §2 動態); the keyframe name is new (no existing @keyframes fb-*) */
@keyframes fb-press{0%{transform:rotate(-6deg) scale(1.8);opacity:0}55%{transform:rotate(-6deg) scale(.93);opacity:1}100%{transform:rotate(-6deg) scale(1);opacity:.92}}
html.fb .fb-stamp.press{animation:fb-press .26s cubic-bezier(.2,.9,.3,1.2) both}
@media (prefers-reduced-motion:reduce){html.fb .fb-stamp.press{animation:none}}

html.fb .fb-tape{display:inline-block;padding:5px 16px;font:700 11px/1.3 var(--fb-text);color:var(--fb-ink);background:rgba(246,224,94,.92);clip-path:polygon(0 0,100% 0,calc(100% - 4px) 25%,100% 50%,calc(100% - 4px) 75%,100% 100%,0 100%,4px 75%,0 50%,4px 25%)}

html.fb .fb-bar{position:relative;height:12px;background:var(--fb-page-2);border:2px solid var(--fb-ink)}
html.fb .fb-bar>i{position:absolute;inset:0 auto 0 0;background:var(--fb-seal)}
html.fb .fb-bar::after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 calc(25% - 1px),rgba(28,43,42,.4) calc(25% - 1px) 25%)}
html.fb .fb-bar>span{position:absolute;inset:0;z-index:1;display:grid;place-items:center;font:700 9px/1 var(--fb-num);letter-spacing:.04em;color:#fff;text-shadow:-1px 0 var(--fb-ink),1px 0 var(--fb-ink),0 -1px var(--fb-ink),0 1px var(--fb-ink)}
html.fb .fb-bar.exp{height:8px} html.fb .fb-bar.exp>i{background:var(--fb-foil)}

html.fb .fb-chip{display:inline-flex;align-items:center;gap:3px;height:18px;padding:0 7px;font:700 11px/1 var(--fb-num);letter-spacing:.03em;color:var(--fb-foil-lite);background:var(--fb-cover);border:1.5px solid var(--fb-ink);white-space:nowrap}
html.fb .fb-chip.paper{background:var(--fb-slip);color:var(--fb-ink)}
html.fb .fb-chip.tier{color:#fff;background:var(--t);font-family:var(--fb-text)}

html.fb .fb-slot{position:relative;width:34px;height:34px;display:grid;place-items:center;background:var(--fb-slip);border:1.5px solid var(--fb-rule);font:10px/1 var(--fb-note);color:var(--fb-ink-3)}
html.fb .fb-slot.has{border-color:var(--fb-ink)}
html.fb .fb-slot[style*="--t"]::before{content:"";position:absolute;left:0;top:0;border:5px solid;border-color:var(--t) transparent transparent var(--t)}
html.fb .fb-slot.sel{box-shadow:0 0 0 2px var(--fb-ink),0 0 0 5px var(--fb-marker)}

html.fb .fb-row{display:flex;justify-content:space-between;align-items:baseline;padding:5px 2px;border-bottom:1px dashed var(--fb-rule);font:12px var(--fb-text);color:var(--fb-ink-2)}
html.fb .fb-row b{font:700 14px var(--fb-num);color:var(--fb-ink)}
html.fb .fb-h{display:inline;padding:0 4px;font:900 14px var(--fb-display);color:var(--fb-ink);background:linear-gradient(transparent 58%,var(--mk,var(--fb-marker)) 58% 94%,transparent 94%)}
html.fb .fb-note{font:12px/1.5 var(--fb-note);color:var(--fb-ink-2)}

/* P1: the shared keyboard ring also covers links/inputs and custom tabbable controls.
   P0 has no such mapping: its new and legacy screenshots must stay identical. */
html.fb :focus-visible,
html.fb #stage :is(button,a[href],input,textarea,select,[tabindex]):focus-visible,
html.fb #modal :is(button,a[href],input,textarea,select,[tabindex]):focus-visible,
html.fb #modal > .win:has(> .foot-row #bk-import) textarea#bk:focus-visible {
  outline:2px solid var(--fb-marker); outline-offset:2px;
}
