:root {
  --paper: #FBF7EE; --paper-2: #F3ECDD; --paper-3: #E9DFC9; --edge: #DDD2B8;
  --ink: #1F2A24; --ink-2: #4E5B52; --ink-3: #8A9287;
  --moss: #3E5641; --moss-2: #2E4231; --moss-soft: #DCE6D8; --fern: #6B8A5E;
  --clay: #B8674A; --clay-soft: #F8E3DA; --ochre: #C98B3C; --ochre-soft: #F6E8CF; --robin: #86B3C1;
  --good: #4F7A45; --warn: #C98B3C; --bad: #B24A3A;
  --f-display: 'Fraunces', Georgia, serif; --f-body: 'Inter', system-ui, sans-serif; --f-hand: 'Caveat', cursive;
  --shadow: 0 1px 2px rgba(31,42,36,.06), 0 14px 34px -16px rgba(31,42,36,.32);
  --r: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper-2); color: var(--ink); font-family: var(--f-body); -webkit-font-smoothing: antialiased; min-height: 100svh; overflow-x: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* background */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background:
  radial-gradient(ellipse 70% 50% at 10% 0%, #F7E3CF 0%, transparent 60%),
  radial-gradient(ellipse 60% 50% at 100% 30%, #DDE8DC 0%, transparent 60%),
  var(--paper-2); }
.leaf { position: absolute; width: 180px; height: 180px; opacity: .22; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 98 C 48 70 50 40 56 6' stroke='%233E5641' stroke-width='2' fill='none'/%3E%3Cpath d='M53 30 C 30 24 18 8 20 2 C 38 4 52 16 53 30Z M54 48 C 78 42 90 26 88 18 C 70 22 56 34 54 48Z M52 66 C 26 60 14 44 16 36 C 34 40 50 50 52 66Z' fill='%236B8A5E'/%3E%3C/svg%3E"); animation: sway 9s ease-in-out infinite alternate; }
.l1 { top: -30px; left: -40px; transform: rotate(30deg); }
.l2 { top: 34%; right: -60px; transform: rotate(-120deg); animation-delay: -3s; }
.l3 { bottom: -40px; left: 12%; transform: rotate(160deg); animation-delay: -5s; }
.l4 { bottom: 20%; right: 22%; width: 90px; height: 90px; opacity: .14; }
@keyframes sway { to { rotate: 8deg; } }

.top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top,0px)) 16px 12px; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-size: 14px; background: rgba(251,247,238,.9); backdrop-filter: blur(8px); padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow); }
.demo-flag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; background: var(--ochre-soft); color: #7A5320; padding: 6px 12px; border-radius: 999px; font-weight: 600; }

.wrap { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 8px 20px 60px; }

/* masthead */
.masthead { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; margin: 8px 0 26px; }
.clerk { width: 120px; height: 120px; cursor: pointer; }
.clerk svg { width: 100%; height: 100%; overflow: visible; }
.clerk .cl-bird { transform-origin: 60px 100px; animation: clerkIdle 4s ease-in-out infinite; }
.clerk .cl-stamp { transform-origin: 96px 66px; transition: transform .2s; }
.clerk.stamping .cl-stamp { animation: stampDown .5s ease; }
@keyframes clerkIdle { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-3deg) translateY(-2px); } }
@keyframes stampDown { 40% { transform: translateY(14px) rotate(-10deg); } }
.dept { margin: 0; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--clay); font-weight: 600; }
.masthead h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(32px, 5vw, 54px); line-height: 1.02; letter-spacing: -.02em; margin: 6px 0 10px; }
.masthead h1 em { font-weight: 300; color: var(--moss); }
.lede { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; max-width: 52ch; }
.counter-card { background: var(--moss); color: #F3ECDD; border-radius: var(--r); padding: 18px 22px; min-width: 170px; box-shadow: var(--shadow); display: flex; flex-direction: column; transform: rotate(2deg); }
.c-num { font-family: var(--f-display); font-size: 58px; line-height: 1; font-weight: 300; font-variant-numeric: tabular-nums; }
.c-lbl { font-size: 12.5px; opacity: .85; margin-top: 4px; line-height: 1.3; }
.c-sub { font-family: var(--f-hand); font-size: 20px; margin-top: 8px; color: #F6D9A8; }
@media (max-width: 760px) {
  .masthead { grid-template-columns: 76px 1fr; gap: 14px; }
  .clerk { width: 76px; height: 76px; align-self: start; }
  .counter-card { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; transform: none; }
  .c-num { font-size: 44px; } .c-sub { margin: 0 0 0 auto; text-align: right; }
}

/* tabs */
.tabs { display: flex; gap: 6px; padding: 5px; background: rgba(233,223,201,.7); border-radius: 999px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; }
.tab { border: 0; background: none; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tab.on { background: var(--paper); color: var(--ink); box-shadow: 0 2px 8px -3px rgba(0,0,0,.2); }
.tab b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--clay); color: #fff; font-size: 11px; }
.tab b:empty { display: none; }
.panel { display: none; animation: rise .45s cubic-bezier(.2,.7,.2,1); }
.panel.on { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* paper form */
.paper { position: relative; background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); padding: 28px clamp(18px, 4vw, 40px) 26px; }
.paper::before { content: ''; position: absolute; left: 0; top: 24px; bottom: 24px; width: 4px; border-radius: 0 4px 4px 0; background: var(--clay); opacity: .6; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--paper-3); transition: background .3s; }
.steps i.on { background: var(--moss); }
fieldset.step { border: 0; padding: 0; margin: 0; display: none; }
fieldset.step.on { display: block; animation: rise .35s ease; }
legend { font-family: var(--f-display); font-size: clamp(22px, 3vw, 28px); font-weight: 400; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; padding: 0; }
legend .n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--moss-soft); color: var(--moss); font-family: var(--f-body); font-size: 14px; font-weight: 700; flex-shrink: 0; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.cat { position: relative; text-align: left; border: 1.5px solid var(--paper-3); background: var(--paper); border-radius: 14px; padding: 14px 14px 14px 58px; min-height: 84px; transition: transform .2s, border-color .2s, background .2s, box-shadow .2s; }
.cat:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -12px rgba(0,0,0,.4); }
.cat .ico { position: absolute; left: 12px; top: 14px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; background: var(--paper-2); transition: transform .3s cubic-bezier(.3,1.8,.5,1); }
.cat b { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.cat span { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.cat.on { border-color: var(--moss); background: #F2F6EF; }
.cat.on .ico { background: var(--moss); transform: rotate(-8deg) scale(1.08); }
.cat.on::after { content: '✓'; position: absolute; top: 10px; right: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--moss); color: #fff; font-size: 12px; display: grid; place-items: center; }

.mood { display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: center; background: var(--paper-2); border-radius: 16px; padding: 18px 24px; }
.mood-face svg { width: 150px; height: 130px; overflow: visible; }
.mood-face .mf-body { transition: fill .4s; }
.mood-face .mf-steam { opacity: 0; transition: opacity .3s; }
.mood-face.s5 .mf-steam, .mood-face.s4 .mf-steam { opacity: 1; animation: steam 1s ease-in-out infinite; }
.mood-face.s5 { animation: shake .4s infinite; }
@keyframes steam { 50% { transform: translateY(-5px); opacity: .5; } }
@keyframes shake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.mood-lbl { font-family: var(--f-display); font-size: 26px; margin: 0 0 12px; }
.mood-lbl small { display: block; font-family: var(--f-body); font-size: 13px; color: var(--ink-2); margin-top: 2px; }
input[type=range] { width: 100%; accent-color: var(--clay); height: 28px; }
.mood-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 560px) { .mood { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 8px; } .mood-ctrl { width: 100%; } }

.sub-q { margin: 22px 0 10px; font-size: 14px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--paper-3); background: var(--paper); border-radius: 999px; padding: 9px 15px; font-size: 14px; transition: all .2s; }
.chip:hover { border-color: var(--fern); }
.chip.on { background: var(--moss); border-color: var(--moss); color: #F6F1E6; transform: scale(1.04); }

.fl { display: block; font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.fl small { font-weight: 400; color: var(--ink-3); }
.fl input, .fl textarea { display: block; width: 100%; margin-top: 8px; border: 1.5px solid var(--paper-3); background: #FFFDF8; border-radius: 12px; padding: 12px 14px; font-size: 16px; resize: vertical; }
.fl textarea { font-family: var(--f-hand); font-size: 22px; line-height: 1.35; background: repeating-linear-gradient(180deg, #FFFDF8 0 29px, #EFE6D3 29px 30px); }
.fl input:focus, .fl textarea:focus { outline: none; border-color: var(--moss); }
.count { text-align: right; font-size: 12px; color: var(--ink-3); margin: -8px 0 0; }

.review { margin-top: 22px; border: 1.5px dashed var(--edge); border-radius: 14px; padding: 14px 16px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.review b { color: var(--ink); }

.form-err { color: var(--bad); font-family: var(--f-hand); font-size: 21px; min-height: 26px; margin: 14px 0 0; }
.form-nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 24px; background: var(--moss); color: #F6F1E6; font-weight: 600; font-size: 14.5px; box-shadow: 0 8px 20px -10px rgba(46,66,49,.8); transition: transform .2s, background .2s; }
.btn:hover { background: var(--moss-2); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--paper-3); }
.btn.stamp-btn { background: var(--clay); box-shadow: 0 8px 20px -10px rgba(184,103,74,.9); }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* filed ticket */
.filed { display: flex; flex-direction: column; align-items: center; padding: 12px 0; }
.ticket-big { position: relative; width: min(100%, 520px); background: var(--paper); border-radius: 16px; padding: 30px 30px 24px; box-shadow: var(--shadow); animation: ticketIn .7s cubic-bezier(.2,1.3,.4,1); overflow: hidden; }
.ticket-big::before, .ticket-big::after { content: ''; position: absolute; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--paper-2); }
.ticket-big::before { left: -13px; } .ticket-big::after { right: -13px; }
@keyframes ticketIn { from { transform: translateY(40px) rotate(-3deg) scale(.9); opacity: 0; } }
.tb-stamp { position: absolute; top: 22px; right: 18px; border: 3px solid var(--clay); color: var(--clay); font-weight: 800; letter-spacing: .14em; padding: 6px 12px; border-radius: 8px; transform: rotate(-12deg) scale(2.4); opacity: 0; animation: stamp .45s .5s cubic-bezier(.3,1.6,.5,1) forwards; font-size: 15px; mix-blend-mode: multiply; }
@keyframes stamp { to { transform: rotate(-12deg) scale(1); opacity: .88; } }
.tb-kicker { margin: 0; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.tb-id { font-family: var(--f-display); font-size: 40px; margin: 4px 0 18px; letter-spacing: -.01em; }
.tb-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; border-top: 1.5px dashed var(--edge); padding-top: 16px; }
.tb-rows small { display: block; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.tb-rows b { font-size: 14px; font-weight: 600; }
.tb-note { margin: 18px 0 0; font-family: var(--f-hand); font-size: 21px; color: var(--ink-2); line-height: 1.25; }
.filed-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.flying-letter { position: fixed; z-index: 90; font-size: 34px; pointer-events: none; animation: flyAway 1.4s ease-in forwards; }
@keyframes flyAway { to { transform: translate(60vw, -80vh) rotate(-30deg) scale(.4); opacity: 0; } }

/* my tickets */
.filter-row, .range-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.fchip { border: 0; background: rgba(233,223,201,.7); padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.fchip.on { background: var(--ink); color: var(--paper); }
.tickets { display: grid; gap: 14px; }
.tk { position: relative; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); display: grid; grid-template-columns: 78px 1fr; overflow: hidden; }
.tk-side { background: var(--paper-2); border-right: 2px dashed var(--edge); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 12px 6px; }
.tk-side .ico { font-size: 28px; }
.tk-side small { font-size: 10px; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
.tk-main { padding: 16px 18px; min-width: 0; }
.tk-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.tk-top .cat-n { color: var(--ink-2); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.pill.open { background: var(--clay-soft); color: #93432B; }
.pill.resolved { background: var(--moss-soft); color: var(--moss-2); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tk h4 { font-family: var(--f-display); font-weight: 500; font-size: 20px; margin: 6px 0 4px; }
.tk p.det { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.tk .sev { font-size: 13px; }
.tk .rem { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tk .rem span { font-size: 12px; background: var(--ochre-soft); color: #6E4A17; padding: 3px 9px; border-radius: 999px; }
.tk .reply { margin-top: 14px; background: #F2F6EF; border-radius: 12px; padding: 12px 14px; position: relative; }
.tk .reply small { display: block; font-size: 11px; color: var(--moss); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; }
.tk .reply p { margin: 0; font-family: var(--f-hand); font-size: 21px; line-height: 1.25; }
.tk.resolved::after { content: 'RESOLVED'; position: absolute; right: 14px; top: 14px; border: 2px solid var(--moss); color: var(--moss); font-size: 10px; font-weight: 800; letter-spacing: .14em; padding: 3px 7px; border-radius: 5px; transform: rotate(8deg); opacity: .7; }
.empty { text-align: center; padding: 50px 20px; color: var(--ink-2); background: var(--paper); border-radius: 16px; }
.empty .big { font-size: 44px; }
.empty p { font-family: var(--f-hand); font-size: 24px; margin: 8px 0 0; }

/* stats */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--paper); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.tile small { display: block; font-size: 12px; color: var(--ink-2); }
.tile b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 36px; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr 1fr; } .tile b { font-size: 30px; } }
.grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.grid2 .wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.card { background: var(--paper); border-radius: 16px; padding: 18px 20px 20px; box-shadow: var(--shadow); min-width: 0; }
.card header h3 { font-family: var(--f-display); font-weight: 500; font-size: 19px; margin: 0; }
.card header p { font-size: 12.5px; color: var(--ink-3); margin: 2px 0 16px; }

.hbars { display: grid; gap: 7px; }
.hb { display: grid; grid-template-columns: 150px 1fr 26px; align-items: center; gap: 10px; font-size: 13px; padding: 3px 0; border-radius: 8px; }
.hb .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.hb .track { height: 14px; border-radius: 0 4px 4px 0; position: relative; }
.hb .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--moss); width: 0; transition: width .9s cubic-bezier(.2,.7,.2,1); }
.hb:first-child .fill { background: var(--clay); }
.hb .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.hb:hover .lbl { color: var(--ink); }
@media (max-width: 480px) { .hb { grid-template-columns: 112px 1fr 22px; font-size: 12px; } }

.vbars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 20px; border-bottom: 1px solid var(--paper-3); }
.vb { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.vb .col { width: 100%; max-width: 44px; background: var(--moss); border-radius: 4px 4px 0 0; height: 0; transition: height .9s cubic-bezier(.2,.7,.2,1); min-height: 0; }
.vb .n { font-size: 12px; font-weight: 600; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.vbars.sev .vb:nth-child(4) .col, .vbars.sev .vb:nth-child(5) .col { background: var(--clay); }
.vlabels { display: flex; gap: 10px; margin-top: 6px; }
.vlabels span { flex: 1; text-align: center; font-size: 11.5px; color: var(--ink-3); line-height: 1.2; }
.vlabels span .e { display: block; font-size: 18px; }

.gauge { display: flex; flex-direction: column; align-items: center; }
.gauge svg { width: 100%; max-width: 260px; }
.gauge .g-val { font-family: var(--f-display); font-size: 44px; margin-top: -58px; line-height: 1; }
.gauge .g-lbl { font-family: var(--f-hand); font-size: 23px; color: var(--ink-2); margin-top: 8px; text-align: center; }
.gauge .g-arc { transition: stroke-dashoffset 1.2s cubic-bezier(.2,.7,.2,1); }

.remedy-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rb-item { background: var(--paper-2); border-radius: 14px; padding: 14px; position: relative; overflow: hidden; }
.rb-item .e { font-size: 26px; }
.rb-item b { display: block; font-size: 13.5px; margin-top: 6px; }
.rb-item span { font-size: 12px; color: var(--ink-3); }
.rb-item .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--ochre); width: 0; transition: width .9s ease; }
.rb-item.is-top { background: var(--ochre-soft); }
.rb-item.is-top::after { content: '👑'; position: absolute; top: 8px; right: 10px; font-size: 16px; }

.insight { margin: 20px 0 0; text-align: center; font-family: var(--f-hand); font-size: 25px; color: var(--moss); line-height: 1.25; }

/* tooltip */
.tooltip { position: fixed; z-index: 100; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 12.5px; padding: 7px 10px; border-radius: 8px; box-shadow: var(--shadow); max-width: 240px; transform: translate(-50%, calc(-100% - 10px)); }
.tooltip b { font-weight: 700; }

/* admin */
.admin-lock { max-width: 420px; }
.admin-lock h3 { font-family: var(--f-display); font-weight: 500; font-size: 24px; margin: 0 0 4px; }
.admin-lock p { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; }
#pinForm { display: flex; gap: 8px; }
#pinForm input { flex: 1; border: 1.5px solid var(--paper-3); border-radius: 999px; padding: 11px 16px; background: #FFFDF8; font-size: 16px; }
.adm { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 12px; }
.adm h4 { font-family: var(--f-display); font-weight: 500; font-size: 19px; margin: 6px 0; }
.adm p { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; line-height: 1.5; }
.adm textarea { width: 100%; border: 1.5px solid var(--paper-3); border-radius: 12px; padding: 10px 12px; font-family: var(--f-hand); font-size: 20px; background: #FFFDF8; resize: vertical; margin: 8px 0 10px; }
.adm .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.adm .wa { background: #1F7A4B; }
.adm .del { margin-left: auto; font-size: 12px; }
.adm-h { font-family: var(--f-display); font-size: 20px; font-weight: 500; margin: 18px 0 10px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom,0px)); transform: translateX(-50%); z-index: 110; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); animation: rise .3s ease; }

.foot { text-align: center; margin-top: 40px; }
.link { background: none; border: 0; color: var(--ink-3); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 640px) {
  .top { position: relative; }
  .tabs { width: 100%; }
  .tab { padding: 9px 11px; font-size: 13px; flex: 1; }
  .tb-stamp { top: 12px; right: 10px; font-size: 12px; padding: 4px 8px; }
  .tb-id { margin-top: 26px; font-size: 34px; }
}
@media (max-width: 420px) { .tabs { gap: 2px; } .tab { padding: 8px 7px; font-size: 12.5px; } }
