/* ui.css — shared look: buttons, panels, chips, modals, toasts, HUD, screens */
button { font-family: var(--font); }
.btn, .tile, .chip, .swatch { -webkit-tap-highlight-color: transparent; outline: none; cursor: pointer; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box;
  min-height: 60px; min-width: 60px; padding: 0 8px; margin: 0;
  border: 18px solid transparent; border-image: url(../assets/ui-button.webp) 30% fill / 18px stretch;
  background: none; color: #fff; font: 900 22px/1.1 var(--font); letter-spacing: .5px; white-space: nowrap;
  -webkit-text-stroke: 5px #b8453a; paint-order: stroke fill; text-shadow: 0 2px 0 rgba(120,40,40,.45);
  transition: transform .12s, filter .12s; user-select: none;
}
.btn .ic { width: 34px; height: 34px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 0 rgba(120,40,40,.4)); margin: -6px 0; }
.btn .lbl { display: inline-block; }
.btn.primary { min-height: 68px; padding: 0 18px; font-size: 26px; filter: brightness(1.06) saturate(1.1); }
.btn.small { min-height: 60px; font-size: 20px; }
.btn.focus, .tile.focus, .chip.focus, .swatch.focus, [data-nav].focus {
  filter: brightness(1.12) drop-shadow(0 0 8px rgba(255,255,255,.95)) drop-shadow(0 0 4px var(--coral)); transform: scale(1.05); z-index: 3; }
.btn:active, .tile:active, .chip:active { transform: scale(.94); }
.btn[disabled] { filter: grayscale(1) brightness(1.05); opacity: .7; cursor: default; }

.panel {
  position: absolute; box-sizing: border-box; display: flex; flex-direction: column; color: var(--ink);
  border: 30px solid transparent; border-image: url(../assets/ui-panel.webp) 12% fill / 30px stretch;
  background: var(--cream) padding-box; background-clip: padding-box; font: 700 20px/1.3 var(--font);
  animation: pop .24s cubic-bezier(.2,1.4,.4,1) both;
}
.panel .pbody { flex: 1; min-height: 0; padding: 20px 4px 4px; }
.panel .pfoot { display: flex; align-items: center; gap: 12px; padding-top: 6px; flex-wrap: nowrap; }
.panel .pfoot:empty { display: none; }
.grow { flex: 1; }
/* office 「顯示人物」 picker */
.ofpick-wrap { width: 600px; max-width: 100%; }
.ofpick-head { font-size: 18px; margin-bottom: 8px; text-align: center; }
.ofpick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-height: 250px; overflow-y: auto; padding: 4px; }
.ofpick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; min-height: 108px;
  border: 3px solid #ecd9c8; border-radius: 16px; background: #fff; color: var(--ink); font: 800 15px/1.15 var(--font); cursor: pointer;
  transition: transform .12s, border-color .12s; -webkit-tap-highlight-color: transparent; outline: none; }
.ofpick .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ofpick.on { border-color: var(--coral); background: #fff1ea; box-shadow: 0 0 0 3px rgba(255,122,107,.25); }
.ofpick .ck { position: absolute; top: 4px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--coral); color: #fff;
  font: 900 15px/24px var(--font); text-align: center; }
.ofpick:active { transform: scale(.95); }
.btn.showwho { min-height: 52px; font-size: 18px; }
/* office 「顯示人物」 editor (src/officecast.js) */
.ocpanel { transition: left .25s cubic-bezier(.2,1.2,.4,1); pointer-events: auto; }
.ocpanel .pbody { padding-top: 14px; }
.octabs { display: flex; gap: 8px; margin-bottom: 10px; }
.octab { width: 56px; height: 56px; flex: none; padding: 0; border-radius: 16px; border: 3px solid #ecd9c8; background: #fff; display: flex;
  align-items: center; justify-content: center; overflow: hidden; cursor: pointer; transition: transform .12s, border-color .12s; outline: none; -webkit-tap-highlight-color: transparent; }
.octab .ic { width: 36px; height: 36px; object-fit: contain; pointer-events: none; }
.octab .face { border-radius: 12px; pointer-events: none; }
.octab.on { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,122,107,.3); background: #fff1ea; }
.octab:active, .ocbtn:active { transform: scale(.93); }
.ochead { font-size: 16px; margin-bottom: 8px; }
.ocgrid { grid-template-columns: repeat(3, 1fr); max-height: none; overflow: visible; gap: 6px; }
.ocgrid .ofpick { min-height: 92px; padding: 6px 2px; font-size: 13px; }
.ocname { font: 900 19px/1.2 var(--font); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oclbl { font: 800 15px/1.2 var(--font); color: var(--ink-soft); margin: 4px 0 3px; }
.ocpanel .pfoot .btn { min-height: 54px; }
.ocframes { gap: 6px; flex-wrap: nowrap; }
.ocframes .chip { min-height: 48px; min-width: 0; flex: 1; padding: 2px 6px; font-size: 16px; }
.ocrow { display: flex; align-items: center; gap: 8px; }
.ocbtn { width: 52px; height: 48px; flex: none; border-radius: 14px; border: 3px solid var(--mint); background: #fff; color: var(--mint-d);
  font: 900 22px/1 var(--font); cursor: pointer; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; transition: transform .12s; }
.ocpct { min-width: 56px; text-align: center; font: 900 20px/1 var(--font); }
.btn.ocreset { min-height: 48px; font-size: 17px; padding: 0 4px; }
.ochint { font-size: 14px; margin-top: 6px; }
/* small moment card (results) */
.mocard { display: flex; gap: 16px; align-items: stretch; width: 520px; max-width: 100%; }
.mopic { flex: 0 0 168px; height: 224px; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, var(--peach), var(--mint)); box-shadow: inset 0 0 0 3px #fff; }
.mopic img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.motx { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; color: var(--ink); text-align: left; }
.moname { font-size: 22px; font-weight: 900; color: var(--coral); }
.mostory { font-size: 16px; line-height: 1.5; }
.mocard.ev { flex-direction: column; width: 500px; gap: 6px; }
.mocard.ev .mopic { flex: none; width: 100%; height: 196px; position: relative; }
.mocard.ev .mopic img { object-position: center; }
.mocard.ev .motx { gap: 4px; }
.mocard.ev .moname { font-size: 19px; }
.mocard.ev .mostory { font-size: 15px; line-height: 1.35; }
.mocard.ev .moresult { font-size: 15px; padding: 3px 10px; }
.monew { position: absolute; left: 10px; top: 10px; background: var(--coral); color: #fff; font-weight: 900; font-size: 15px; padding: 3px 10px; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 2px 0 rgba(150,60,50,.5); }
.moresult { font-size: 17px; font-weight: 900; color: #fff; background: var(--mc, var(--mint-d)); text-shadow: 0 1px 0 rgba(74,47,63,.6), 0 0 3px rgba(74,47,63,.5); border-radius: 10px; padding: 6px 12px; align-self: flex-start; }
.ocpanel .octabs { margin-bottom: 6px; }
.ribbon {
  position: absolute; left: 50%; top: -38px; transform: translateX(-50%); z-index: 2; white-space: nowrap;
  padding: 4px 48px; background: linear-gradient(#ff9a86, var(--coral)); color: #fff; font: 900 26px/1.3 var(--font);
  -webkit-text-stroke: 6px #b8453a; paint-order: stroke fill; text-shadow: 0 2px 0 rgba(120,40,40,.4);
  clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 50%, 100% 100%, 0 100%, 22px 50%);
  border-top: 3px solid #ffd2c8; border-bottom: 3px solid #d65a4c;
}
.title-text { color: #fff; font: 900 36px/1.2 var(--font); -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 rgba(74,47,63,.5); text-align: center; }
.banner { display: inline-block; padding: 6px 30px; border-radius: 20px; background: linear-gradient(#ffe38a, var(--gold)); border: 4px solid #fff; box-shadow: 0 4px 0 #c9a02c; animation: slam .45s cubic-bezier(.2,1.6,.4,1) both; }
.banner.big { font-size: 56px; padding: 6px 44px; }
.stxt { color: #fff; font-weight: 900; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.dim { color: var(--ink-soft); }

.chips, .swatches, .tabs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box;
  min-height: 60px; min-width: 60px; padding: 4px 12px; border-radius: 30px; background: #fff; border: 3px solid var(--mint);
  color: var(--ink); font: 800 19px/1.1 var(--font); transition: transform .12s, filter .12s, background .12s; white-space: nowrap;
}
.chip small { font-size: 17px; font-weight: 700; color: var(--ink-soft); }
.chip.on { background: var(--mint-d); color: #fff; border-color: #2c7d6e; text-shadow: 0 2px 0 rgba(0,60,50,.4); }
.chip.on small { color: #e6fff9; }
.chip[disabled] { opacity: .45; filter: grayscale(.6); cursor: default; }
.chip img { width: 30px; height: 30px; object-fit: contain; }

/* schedule: lesson / job segment toggle and locked job chips */
.seg { display: inline-flex; flex: none; margin-right: 6px; border-radius: 26px; background: rgba(74,47,63,.12); padding: 3px; gap: 2px; }
.seg .chip { min-height: 48px; min-width: 66px; padding: 2px 12px; border: 0; background: transparent; border-radius: 23px; font-size: 18px; }
.seg .chip.on { background: var(--coral); color: #fff; text-shadow: 0 2px 0 rgba(120,40,40,.4); }
.chip.locked { background: #ece6e6; border-color: #c9bec2; color: #9a8a92; filter: grayscale(1); cursor: default; }
.chip.locked small { color: #9a8a92; }
.chip.locked.focus { filter: grayscale(1) brightness(1.08) drop-shadow(0 0 6px rgba(255,255,255,.9)); }
.row-item .chips { gap: 8px; }
.row-item .chips .chip { min-height: 52px; padding: 3px 10px; font-size: 18px; }
.row-item .chips .chip small { font-size: 15px; }
.swatch { width: 56px; height: 56px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px rgba(74,47,63,.35); padding: 0; transition: transform .12s; }
.swatch.on { box-shadow: 0 0 0 4px var(--ink); transform: scale(1.12); }
.badge { display: inline-block; min-width: 24px; padding: 0 8px; border-radius: 14px; background: var(--coral); color: #fff; font: 900 17px/24px var(--font); text-align: center; border: 2px solid #fff; box-sizing: border-box; }
.badge.lv { background: var(--gold); color: var(--ink); }
.lock { position: absolute; right: 2px; top: 2px; font-size: 20px; line-height: 1; }

.bar { position: relative; height: 14px; border-radius: 8px; background: rgba(74,47,63,.16); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 8px; background: var(--mint); transition: width .4s; }
.statbars { display: flex; flex-direction: column; gap: 4px; min-width: 200px; }
.statbars .srow { display: flex; align-items: center; gap: 8px; font: 800 17px/1.1 var(--font); }
.statbars .sname { width: 62px; white-space: nowrap; }
.statbars .bar { flex: 1; height: 12px; }
.statbars .snum { width: 40px; text-align: right; }
.statbars .sgain { color: var(--coral); width: 36px; }

.ui-input {
  box-sizing: border-box; width: 100%; min-height: 68px; padding: 12px 16px; border: 4px solid var(--mint); border-radius: 18px;
  background: var(--cream); color: var(--ink); font: 700 22px/1.3 var(--font); outline: none; resize: none; user-select: text; -webkit-user-select: text;
}
.ui-input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,122,107,.25); }
.scrollbox { overflow-x: hidden; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.scrollbox::-webkit-scrollbar { display: none; }

.tile {
  position: absolute; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  width: 100px; height: 66px; padding: 2px; border-radius: 18px; background: rgba(255,248,238,.93); border: 3px solid var(--peach);
  box-shadow: 0 4px 0 rgba(200,120,100,.45); color: var(--ink); font: 900 17px/1.05 var(--font); transition: transform .12s, filter .12s;
}
.tile img { width: 36px; height: 36px; object-fit: contain; pointer-events: none; }
.tile span.tl { white-space: nowrap; }
.tile.locked { filter: grayscale(.75); opacity: .85; }
.tile .badge { position: absolute; right: -8px; top: -9px; }

.modal-back { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(60,30,50,.5); animation: fade .18s both; }
.modal { position: relative; min-width: 380px; max-width: 700px; max-height: 480px; animation: pop .22s cubic-bezier(.2,1.4,.4,1) both; }
.modal .minner { padding: 22px 6px 0; text-align: center; overflow-y: auto; scrollbar-width: none; max-height: 330px; }
.modal .mtext { font: 700 22px/1.4 var(--font); white-space: pre-line; }
.modal .mbtns { display: flex; justify-content: center; gap: 14px; padding-top: 14px; flex-wrap: wrap; }
.toastbox { position: absolute; left: 0; right: 0; top: 84px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 8px 22px; border-radius: 26px; background: rgba(255,248,238,.97); border: 4px solid var(--coral); color: var(--ink); font: 800 21px/1.25 var(--font); box-shadow: 0 4px 0 rgba(150,60,50,.4); animation: toastIn .3s cubic-bezier(.2,1.4,.4,1) both; max-width: 760px; }
.toast.out { animation: toastOut .25s both; }
.toast img { width: 32px; height: 32px; object-fit: contain; }
#bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.bubble { position: absolute; left: 124px; bottom: 14px; width: 630px; box-sizing: border-box; pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 30px; background: var(--cream); border: 5px solid var(--coral);
  box-shadow: 0 6px 0 rgba(150,60,50,.35); color: var(--ink); font: 800 21px/1.35 var(--font); min-height: 90px; animation: bubIn .25s cubic-bezier(.2,1.4,.4,1) both; }
.bubble .bface { flex: none; width: 68px; height: 68px; border-radius: 50%; overflow: hidden; background: var(--peach); border: 3px solid #fff; box-shadow: 0 0 0 3px var(--coral); }
.bubble .bface img { width: 68px; height: 68px; object-fit: cover; object-position: 50% 15%; border-radius: 50%; border: 0; box-shadow: none; }
.bubble .btext { flex: 1; min-height: 56px; padding-right: 22px; display: flex; align-items: center; }
.bubble .bnext { position: absolute; right: 18px; bottom: 6px; color: var(--coral); font-size: 18px; animation: blink 1s infinite; }
.face { object-fit: cover; object-position: 50% 15%; border-radius: 16px; background: #fff; border: 3px solid #fff; box-shadow: 0 2px 0 rgba(74,47,63,.3); box-sizing: border-box; flex: none; }

.screen { position: absolute; inset: 0; pointer-events: none; animation: screenIn .2s ease-out both; }
#screens > .screen { pointer-events: none; }
.screen > * { pointer-events: auto; }
.hudbar { position: absolute; left: 96px; top: 8px; width: 670px; height: 54px; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 0 16px; overflow: hidden;
  border-radius: 27px; background: rgba(255,248,238,.95); border: 3px solid var(--peach); box-shadow: 0 3px 0 rgba(200,120,100,.4); color: var(--ink); font: 900 20px/1 var(--font); white-space: nowrap; pointer-events: none; }
.hudbar .hco { flex: 0 1 190px; min-width: 96px; display: flex; flex-direction: column; gap: 4px; }
.hudbar .hname { display: flex; align-items: center; gap: 6px; }
.hudbar .hname { min-width: 0; }
.hudbar .hname b { overflow: hidden; text-overflow: ellipsis; max-width: 150px; min-width: 0; font-weight: 900; font-size: 18px; white-space: nowrap; }
.hudbar .hco .bar { height: 8px; }
.hudbar .hco .bar > i { background: var(--coral); }
.hudbar .hdate { flex: none; font-size: 18px; }
.hudbar .hfunds { flex: none; }
.hudbar .hfunds.low { color: #e0362c; }
.hudbar .hfans, .hudbar .hgold { display: flex; align-items: center; gap: 4px; flex: none; }
.hudbar .hfans i { color: var(--coral); font-style: normal; }
.hudbar .hgold img { width: 26px; height: 26px; object-fit: contain; }
.hudbar .grow { flex: 1; }
.hcam { position: absolute; left: 774px; top: 4px; width: 68px; height: 68px; padding: 0; border-radius: 50%; background: var(--cream); border: 4px solid var(--coral); box-shadow: 0 3px 0 rgba(150,60,50,.4); transition: transform .12s, filter .12s; }
.hcam img { width: 40px; height: 40px; object-fit: contain; pointer-events: none; }
.hcam:active { transform: scale(.92); }

.row-item { display: flex; gap: 10px; padding: 8px; margin-bottom: 8px; border-radius: 18px; background: rgba(255,255,255,.75); border: 2px solid var(--peach); }
.rpanel .rbody { display: flex; gap: 12px; overflow: hidden; padding-top: 14px; }
.rpanel .rcol { flex: 1; min-width: 0; overflow-y: auto; padding: 4px 2px; }
.rpanel .rside { width: 230px; flex: none; overflow-y: auto; font-size: 17px; }
.rpanel .rside .mrow { font-size: 17px; }
.rpanel .rside .banner { font-size: 22px; padding: 4px 14px; white-space: normal; }
.rpanel .rside > div:first-child .hr { display: none; }
.rpanel .rside .rentnote { font-size: 15px; font-weight: 700; color: var(--ink-soft); text-align: right; line-height: 1.3; }
.rcards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rcard { position: relative; box-sizing: border-box; min-width: 0; padding: 6px 8px; border-radius: 16px; background: #fff; border: 3px solid var(--peach); font: 800 17px/1.2 var(--font); animation: pop .3s cubic-bezier(.2,1.5,.4,1) both; position: relative; }
.rcard .gains { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; }
.rcard .lvup { position: absolute; right: -6px; top: -10px; transform: rotate(8deg); }
/* the day's spotlight card spans both columns; the others follow in a compact grid */
.rcard.feat { grid-column: 1 / -1; border-color: var(--coral); background: linear-gradient(135deg, #fff 60%, #ffe9dc); box-shadow: 0 3px 0 rgba(255,122,107,.35); padding: 8px 12px; font-size: 18px; }
.rcard.feat .gains { font-size: 19px; }
.rcard.feat .fstat { position: absolute; right: 12px; top: 26px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 15px; color: var(--ink-soft); }
.rcard.feat .fstat .fb { color: #e0517a; }
.rothers { grid-column: 1 / -1; font: 900 15px/1 var(--font); color: var(--ink-soft); padding: 4px 4px 0; letter-spacing: .04em; }
.rcard .bondup { display: inline-block; margin-top: 3px; background: #ffe1ea; color: #e0517a; border: 2px solid #ffb3c7; font-size: 14px; padding: 1px 8px; border-radius: 10px; }
.rpanel .rside .cexp { color: #b8860b; font-weight: 900; flex-wrap: wrap; }
.rpanel .rside .cexp .boost { font-size: 14px; color: #fff; background: var(--coral); border-radius: 9px; padding: 1px 7px; }
.rspot { position: absolute; left: 14px; top: 70px; z-index: 2; padding: 6px 16px 8px; border-radius: 16px; background: rgba(255,248,238,.92); border: 3px solid var(--coral);
  box-shadow: 0 3px 0 rgba(74,47,63,.18); animation: pop .35s cubic-bezier(.2,1.5,.4,1) both; max-width: 280px; pointer-events: none; }
.rspot small { display: block; font: 900 14px/1.1 var(--font); color: var(--coral); letter-spacing: .05em; }
.rspot b { display: block; font: 900 24px/1.2 var(--font); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* info bubbles (src/tip.js) */
.tipbox { position: absolute; left: 0; top: 0; z-index: 46; pointer-events: none; min-width: 190px; max-width: 300px; box-sizing: border-box;
  padding: 10px 14px 11px; border-radius: 18px; background: rgba(255,248,238,.97); border: 3px solid var(--mint); box-shadow: 0 6px 18px rgba(74,47,63,.25), 0 3px 0 var(--mint-d);
  font: 800 16px/1.3 var(--font); color: var(--ink); opacity: 0; transform: scale(.92); transition: opacity .12s ease-out, transform .16s cubic-bezier(.2,1.5,.4,1); }
.tipbox.on { opacity: 1; transform: scale(1); }
.tip-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.tip-h b { font-size: 19px; font-weight: 900; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 #fff; }
.tip-sub { margin-left: auto; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.tip-l { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.tip-l > span:first-child { flex: none; min-width: 64px; font-weight: 900; }
.tip-v { margin-left: auto; font-weight: 900; font-variant-numeric: tabular-nums; }
.tip-bar .tip-track { flex: 1; height: 8px; border-radius: 5px; background: #f1e3d8; overflow: hidden; min-width: 60px; }
.tip-bar .tip-fill { display: block; height: 100%; border-radius: 5px; }
.tip-bar .tip-v { min-width: 34px; text-align: right; }
.tip-l.spec > span:first-child::after { content: " ★"; color: var(--gold); }
.tip-sum { border-top: 2px dashed #f1d9c8; margin-top: 4px; padding-top: 3px; }
.tip-hr { height: 2px; background: #f1d9c8; margin: 6px 0; border-radius: 2px; }
.tip-cap { font-size: 13px; color: var(--ink-soft); font-weight: 900; margin: 2px 0 3px; }
.tip-gains { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.tip-g { font-weight: 900; font-size: 16px; color: #fff; background: var(--c); border-radius: 10px; padding: 1px 8px; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.tip-g.small { font-size: 13px; opacity: .7; }
.tip-note { font-size: 14px; color: var(--ink-soft); font-weight: 800; }
.tip-note.warn { color: #e0362c; }
.tiphost { cursor: help; }
.hr { height: 3px; background: var(--peach); border-radius: 2px; margin: 10px 0; opacity: .7; }
.mrow { display: flex; justify-content: space-between; gap: 12px; font: 800 20px/1.5 var(--font); }

@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.panel.modal { animation-name: pop; }
@keyframes slam { 0% { transform: scale(2.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-24px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-16px); } }
@keyframes bubIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* ---- schedule screen: plan colours (lesson blue, job orange, promo pink, rest grey) ---- */
.sch-row { border-left: 8px solid var(--kc, var(--peach)); align-items: flex-start; }
.sch-row.unplanned { background: rgba(255,240,236,.9); border-color: #ffb3a6; border-left-color: var(--coral); box-shadow: 0 0 0 2px rgba(255,122,107,.25) inset; }
.sch-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; min-height: 34px; }
.sch-name { font: 900 21px/1.2 var(--font); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-cond { font: 800 16px/1 var(--font); }
.sch-sta { width: 90px; height: 12px; }
.sch-tag { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 3px 12px 3px 5px; border-radius: 18px; background: var(--kc); color: #fff;
  font: 900 17px/1.2 var(--font); text-shadow: 0 1px 0 rgba(0,0,0,.3); border: 2px solid #fff; box-shadow: 0 2px 0 rgba(74,47,63,.25); max-width: 220px; }
.sch-tag img { width: 24px; height: 24px; object-fit: contain; flex: none; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
.sch-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-tag.none { background: #fff; color: var(--coral); text-shadow: none; border: 2px dashed var(--coral); padding: 3px 12px; flex-direction: column; gap: 0; align-items: flex-start; animation: schPulse 1.6s ease-in-out infinite; }
.sch-tag.none b { font-size: 17px; line-height: 1.1; }
.sch-tag.none small { font: 700 13px/1.1 var(--font); color: var(--ink-soft); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes schPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,122,107,.45); } 50% { box-shadow: 0 0 0 5px rgba(255,122,107,0); } }
.sch-drink { min-height: 44px; }
.sch-row .seg .chip.seg-lesson.on { background: #5b9bff; text-shadow: 0 2px 0 rgba(20,50,120,.4); }
.sch-row .seg .chip.seg-job.on { background: #ff9f43; text-shadow: 0 2px 0 rgba(120,60,10,.4); }
.sch-row .seg .chip.seg-promo.on { background: #ff6fae; text-shadow: 0 2px 0 rgba(120,20,70,.4); }
.chip.c-lesson { border-color: #a9c9ff; }
.chip.c-job { border-color: #ffcf9f; }
.chip.c-promo { border-color: #ffb6d6; }
.chip.c-rest { border-color: #c9c9d2; }
.chip.c-lesson.on { background: #5b9bff; border-color: #3a76d8; text-shadow: 0 2px 0 rgba(20,50,120,.4); }
.chip.c-job.on { background: #ff9f43; border-color: #d97a1f; text-shadow: 0 2px 0 rgba(120,60,10,.4); }
.chip.c-promo.on { background: #ff6fae; border-color: #d94a8a; text-shadow: 0 2px 0 rgba(120,20,70,.4); }
.chip.c-rest.on { background: #9a9aa6; border-color: #76768a; text-shadow: 0 2px 0 rgba(30,30,40,.4); }
.chip.c-lesson.on small, .chip.c-job.on small, .chip.c-promo.on small, .chip.c-rest.on small { color: #fff; }
.chip.carry { border-style: dashed; border-color: #5b9bff; background: #eef4ff; }
.chip.c-job, .chip.c-promo { position: relative; }
.chip .chip-ic { position: absolute; left: 6px; top: 50%; width: 26px; height: 26px; margin-top: -13px; object-fit: contain; }
.chip:has(.chip-ic) { padding-left: 36px; }

/* ---- 今日試算 panel ---- */
.est { display: flex; flex-direction: column; gap: 2px; }
.est-l { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font: 800 15px/1.35 var(--font); color: var(--ink); }
.est-l span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.est-l b { font: 900 16px/1.35 var(--font); white-space: nowrap; flex: none; }
.est-l.pos b { color: #2f9a62; } .est-l.neg b { color: #e0362c; } .est-l.zero b { color: #a99aa2; }
.est-l.gold b { color: #c9971a; } .est-l.fans b { color: #e0517a; }
.est-l.sub { font-size: 14px; padding-left: 10px; color: var(--ink-soft); } .est-l.sub b { font-size: 14px; }
.est-l.big { font-size: 16px; margin-top: 2px; } .est-l.big b { font-size: 20px; text-shadow: 0 1px 0 #fff; }
.sch-row .chips .chip:has(.chip-ic) { padding-left: 38px; }
.est-hr { height: 2px; background: var(--peach); border-radius: 2px; margin: 5px 0; opacity: .8; }
.est-note { margin-top: 6px; font: 700 14px/1.3 var(--font); color: var(--ink-soft); text-align: center; }
.est-warn { margin-top: 6px; padding: 5px 8px; border-radius: 12px; background: #fff0ec; border: 2px dashed var(--coral); color: #d2493c; font: 800 14px/1.3 var(--font); text-align: center; }
