/* Transfer Business v2. Scoped to .tb2 / body.tb2-page so nothing leaks into other pages. Same look as Guess the Fee v2. */
body.tb2-page {
  background:
    radial-gradient(70% 38% at 10% 0%, rgba(74, 163, 255, 0.14), transparent 70%),
    radial-gradient(70% 38% at 92% 0%, rgba(255, 138, 61, 0.11), transparent 70%),
    #060a12;
  background-attachment: fixed;
}
@media (max-width: 640px) { body.tb2-page .site-header, body.tb2-page .circuit-bar { position: static; } }
.tb2-h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.tb2, .tb2-modal {
  --panel: #0e1424; --panel2: #141c32; --line: rgba(255, 255, 255, .12);
  --txt: #f3f5fa; --dim: #9aa6bd; --acc: #4aa3ff; --warn: #f5b83d; --ink: #0a0d14;
  --good: #38c977; --bad: #ff6b6b; --agree: #38c977; --against: #ff6b6b;
  color: var(--txt);
}
.tb2 { max-width: 440px; margin: 0 auto; padding: 6px 0 90px; }
.tb2 button, .tb2 input { font-family: inherit; }
.tb2 [hidden] { display: none !important; }
.tb2 :focus-visible, .tb2-modal :focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.tb2-preview { background: rgba(245, 184, 61, .1); border: 1px dashed rgba(245, 184, 61, .6); color: #ffe2a8; border-radius: 8px; padding: 8px 12px; font-size: 12px; line-height: 1.4; margin: 4px 0 10px; }

/* HUD */
.tb2-hud { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 2px 6px; position: relative; }
.tb2-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; width: 100%; gap: 8px; }
.tb2.keep .tb2-row { justify-content: center; }
.tb2-brand { padding: 0 40px; font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 28px; line-height: 1; text-align: center; }
.tb2-brand small { display: block; font-family: var(--font-body, Inter, sans-serif); font-size: 9.5px; letter-spacing: .22em; font-weight: 700; color: var(--acc); margin-top: 5px; }
.tb2-modes { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.tb2-modes button { border: 0; background: transparent; color: var(--dim); font-weight: 800; font-size: 12.5px; letter-spacing: .04em; padding: 8px 14px; border-radius: 999px; cursor: pointer; min-height: 34px; }
.tb2-modes button[aria-selected="true"] { background: var(--txt); color: var(--ink); }
.tb2-datenav { display: flex; align-items: center; justify-content: center; gap: 8px; }
.tb2-datenav button, .tb2-icons button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--txt); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.tb2-datenav button:disabled { opacity: .3; cursor: not-allowed; }
.tb2-datenav button:not(:disabled):hover, .tb2-icons button:hover { border-color: var(--acc); }
.tb2-datenav span { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 15px; color: var(--acc); min-width: 84px; text-align: center; white-space: nowrap; }
.tb2-icons { position: absolute; right: 2px; top: 4px; display: flex; gap: 6px; }
.tb2-cur { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 2px; flex: none; }
.tb2-cur button { border: 0; background: transparent; color: var(--dim); font-weight: 900; font-size: 15px; width: 36px; min-height: 30px; border-radius: 999px; cursor: pointer; }
.tb2-cur button[aria-pressed="true"] { background: var(--acc); color: var(--ink); }

/* Progress */
.tb2-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 8px; min-height: 30px; }
.tb2-prog { display: flex; gap: 3px; flex: 1; min-width: 0; }
.tb2-prog i { flex: 1; height: 8px; border-radius: 3px; background: #232c45; transition: background .25s, transform .25s; }
.tb2-prog i.now { background: #5b6788; transform: scaleY(1.5); }
.tb2-prog i.done { background: #5b6788; }
.tb2-prog i.g { background: var(--good); } .tb2-prog i.b { background: var(--bad); }
.tb2-rnd { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--dim); white-space: nowrap; }
.tb2-sess { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--dim); }
.tb2-sess b { color: var(--txt); }

/* Transfer card */
.tb2-card { position: relative; background: var(--panel); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 12px 14px; text-align: center; }
.tb2-card.enter { animation: tbEnter .4s ease backwards; }
.tb2-card.voted-g { border-color: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 16%, transparent); }
.tb2-card.voted-b { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 16%, transparent); }
.tb2-feelab { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; font-weight: 800; color: var(--dim); }
.tb2-fee { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 58px; line-height: 1.02; font-variant-numeric: tabular-nums; }
.tb2-chips { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 2px; }
.tb2-tag { font-size: 9px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; border-radius: 999px; padding: 3px 8px; background: var(--panel2); color: var(--dim); border: 1px solid var(--line); }
.tb2-tag.new { background: var(--warn); color: var(--ink); border-color: var(--warn); }
.tb2-name { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 29px; line-height: 1.05; text-transform: uppercase; margin: 6px 0 2px; overflow-wrap: anywhere; }
.tb2-sub { font-size: 12.5px; color: var(--dim); font-weight: 600; }
.tb2-move { display: flex; align-items: flex-start; justify-content: center; gap: 6px; margin-top: 12px; }
.tb2-club { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; min-width: 0; max-width: 120px; }
.tb2-club svg { width: 52px; height: 52px; display: block; }
.tb2-club-name { font-size: 12.5px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.tb2-club-role { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); font-weight: 800; }
.tb2-arrow { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 30px; color: var(--dim); padding-top: 12px; }

/* Vote buttons */
.tb2-ask { text-align: center; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 800; color: var(--dim); margin: 12px 0 8px; }
.tb2-votes { display: flex; gap: 10px; }
.tb2-vbtn { flex: 1; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 14px; cursor: pointer; font-weight: 900; font-size: 16px; color: var(--txt); background: var(--panel); border: 2px solid var(--line); transition: transform .08s, background .2s; }
.tb2-vbtn span { font-size: 28px; line-height: 1; }
.tb2-vbtn.good { border-color: var(--good); background: rgba(56, 201, 119, .12); }
.tb2-vbtn.bad { border-color: var(--bad); background: rgba(255, 107, 107, .1); }
.tb2-vbtn:active:not(:disabled) { transform: scale(.97); }
.tb2-vbtn:disabled { opacity: .5; cursor: not-allowed; }
.tb2-keys { text-align: center; font-size: 11px; color: #6c7894; margin-top: 8px; }
.tb2-keys kbd { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-family: inherit; font-size: 11px; }
@media (hover: none) { .tb2-keys { display: none; } }

/* Reveal */
.tb2-reveal { margin-top: 12px; animation: tbRise .35s ease backwards; }
.tb2-yours { text-align: center; font-weight: 900; font-size: 15px; margin-bottom: 8px; }
.tb2-yours em { font-style: normal; border-radius: 999px; padding: 4px 12px; color: var(--ink); margin: 0 4px; }
.tb2-yours em.g { background: var(--good); } .tb2-yours em.b { background: var(--bad); }
.tb2-note { text-align: center; font-size: 12px; color: var(--dim); margin: 4px 0 8px; }
.tb2-bars { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.tb2-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.tb2-bar:last-of-type { margin-bottom: 0; }
.tb2-bar-l { width: 34px; flex: none; }
.tb2-bar-t { flex: 1; height: 16px; background: rgba(255, 255, 255, .07); border-radius: 8px; overflow: hidden; }
.tb2-bar-f { height: 100%; width: 0; transition: width .5s ease; }
.tb2-bar.good .tb2-bar-f { background: var(--good); } .tb2-bar.bad .tb2-bar-f { background: var(--bad); }
.tb2-bar.good .tb2-bar-l { color: var(--good); } .tb2-bar.bad .tb2-bar-l { color: var(--bad); }
.tb2-bar-p { width: 44px; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.tb2-tot { text-align: center; font-size: 11px; color: var(--dim); margin-top: 10px; }
.tb2-match { text-align: center; font-weight: 900; font-size: 14px; margin-top: 10px; }
.tb2-match.agree { color: var(--agree); } .tb2-match.against { color: #ffb27a; }
.tb2-fact { text-align: center; font-size: 12.5px; color: #cfd6e6; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 10px 0 0; }
.tb2-next { width: 100%; min-height: 50px; margin-top: 10px; font-weight: 900; font-size: 16px; border-radius: 14px; border: 2px solid var(--txt); background: transparent; color: var(--txt); cursor: pointer; }
.tb2-next:hover { background: var(--txt); color: var(--ink); }

/* Result */
.tb2-result { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; text-align: center; margin: 12px 0; animation: tbRise .5s ease backwards; }
.tb2-kicker { font-size: 10.5px; letter-spacing: .22em; font-weight: 800; color: var(--acc); text-transform: uppercase; }
.tb2-grade { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 34px; line-height: 1.1; margin: 6px 0 2px; }
.tb2-bigscore { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 56px; line-height: 1; margin: 2px 0; }
.tb2-bigscore small { font-size: 22px; color: var(--dim); }
.tb2-rsub { font-size: 13px; color: var(--dim); margin: 0 0 10px; }
.tb2-emoji { font-size: 22px; line-height: 1.5; letter-spacing: 2px; margin: 6px 0 10px; }
.tb2-minstats { display: flex; justify-content: center; gap: 18px; margin: 0 0 12px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.tb2-minstats b { display: block; font-size: 20px; color: var(--txt); letter-spacing: 0; }
.tb2-acts { display: flex; gap: 8px; }
.tb2-acts button { flex: 1; font-weight: 800; font-size: 14px; padding: 13px 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .3); cursor: pointer; background: transparent; color: var(--txt); min-height: 46px; }
.tb2-acts button.primary { background: var(--acc); border-color: var(--acc); color: var(--ink); }
.tb2-list { text-align: left; margin-top: 14px; }
.tb2-list h3, .tb2-boards h3 { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); font-weight: 800; margin: 0 0 8px; }
.tb2-li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.tb2-li:first-of-type { border-top: 0; }
.tb2-li-dot { width: 18px; height: 18px; border-radius: 50%; background: #3a4560; }
.tb2-li-dot.agree { background: var(--agree); } .tb2-li-dot.against { background: var(--against); }
.tb2-li b { display: block; font-size: 13.5px; }
.tb2-li small { color: var(--dim); font-size: 11.5px; }
.tb2-li-r { text-align: right; font-size: 12px; font-weight: 800; white-space: nowrap; }
.tb2-li-r i { display: block; font-style: normal; font-size: 11px; color: var(--dim); font-weight: 700; }

/* Boards */
.tb2-boards { margin-top: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px 12px; }
.tb2-boards > summary { cursor: pointer; font-weight: 900; font-size: 14px; padding: 12px 0 8px; list-style: none; }
.tb2-boards > summary::-webkit-details-marker { display: none; }
.tb2-boards > summary::after { content: "+"; float: right; color: var(--dim); }
.tb2-boards[open] > summary::after { content: "–"; }
.tb2-tabs { display: flex; gap: 6px; margin: 4px 0 10px; flex-wrap: wrap; }
.tb2-tabs button { border: 1px solid var(--line); background: var(--panel2); color: var(--dim); border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: 12px; cursor: pointer; min-height: 34px; }
.tb2-tabs button[aria-selected="true"] { background: var(--txt); color: var(--ink); border-color: var(--txt); }
.tb2-bi { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.tb2-bi:first-of-type { border-top: 0; }
.tb2-bi-n { color: var(--dim); font-weight: 900; }
.tb2-bi b { display: block; font-size: 13.5px; }
.tb2-bi small { color: var(--dim); font-size: 11.5px; }
.tb2-bi-r { text-align: right; font-weight: 900; font-size: 14px; white-space: nowrap; }
.tb2-bi-r i { display: block; font-style: normal; font-size: 11px; color: var(--dim); font-weight: 700; }
.tb2-bnote { font-size: 12px; color: var(--dim); margin: 6px 0 0; }

.tb2-empty { text-align: center; padding: 32px 16px; color: var(--dim); font-size: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-top: 12px; }
.tb2-empty b { display: block; color: var(--txt); font-size: 16px; margin-bottom: 6px; }
.tb2-empty button { margin-top: 12px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--acc); background: transparent; color: var(--txt); font-weight: 800; cursor: pointer; }

/* Preview tools */
.tb2-tools { margin-top: 18px; padding: 12px; border: 1px dashed rgba(245, 184, 61, .6); border-radius: 10px; font-size: 12px; color: #ffe2a8; }
.tb2-tools label { display: block; margin: 8px 0 4px; }
.tb2-tools input[type="date"] { background: var(--panel); color: var(--txt); border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.tb2-tools div { margin-top: 6px; }
.tb2-tools button { margin: 4px 6px 0 0; padding: 7px 10px; border-radius: 6px; border: 1px solid rgba(245, 184, 61, .6); background: transparent; color: #ffe2a8; cursor: pointer; font-weight: 700; }
.tb2-tools code { display: block; white-space: pre-wrap; margin-top: 8px; font-size: 11.5px; color: #cfd6e6; }

/* Modal */
.tb2-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(3, 6, 12, .78); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tb2-modal-box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 18px; width: 100%; max-width: 380px; max-height: 88vh; overflow: auto; }
.tb2-modal-box h2 { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 28px; margin: 0 0 12px; font-weight: 400; }
.tb2-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 14px; }
.tb2-stat-grid b { display: block; font-size: 24px; font-family: var(--font-display, 'Jersey 15', sans-serif); font-weight: 400; }
.tb2-stat-grid small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 800; }
.tb2-modal-box button.tb2-close { width: 100%; min-height: 46px; margin-top: 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: var(--txt); font-weight: 800; cursor: pointer; }

@keyframes tbRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tbEnter { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tb2 *, .tb2-modal * { animation: none !important; transition: none !important; } }
@media (max-width: 360px) { .tb2-fee { font-size: 50px; } .tb2-name { font-size: 24px; } .tb2-brand { padding: 0 38px; font-size: 26px; } }
