/* style-polish.css - Job 1 (designer pass): small, safe refinements on top of the other style files. Loaded LAST. CSS only; phone first. */
:root { --focus: #7DF0A8; }
/* keyboard / switch-control focus ring (hidden for mouse + touch) */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
button { transition: filter .12s ease, background-color .12s ease, transform .08s ease; -webkit-tap-highlight-color: transparent; }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { cursor: not-allowed; }
input, select, textarea { transition: border-color .12s ease, box-shadow .12s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #06C755; box-shadow: 0 0 0 3px rgba(6,199,85,.22); }
::placeholder { color: #7F7F84; }

/* long words / Japanese / Filipino never break the layout */
.bar-item-name, .bar-item-desc, .bar-card, .place-text, .place-about, .hist-more, .bar-note, .chat-place-row, #chat-list li { overflow-wrap: anywhere; }

/* iOS safe areas: top bars clear the notch, sheets / send bar clear the home indicator */
.topbar { padding-top: max(8px, env(safe-area-inset-top)); padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
.send-bar { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
.panel-inner { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.bar-pad { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

/* touch targets >= 44px */
.topbar button, .icon-btn { min-height: 44px; min-width: 44px; }
.bar-admin-nav button { min-height: 44px; padding: 8px 12px; font-weight: 600; }
.bar-qty button { width: 44px; height: 44px; }
.bar-card-actions button { min-height: 44px; }
button.small { min-height: 36px; }
.bar-edit-tabs li, .bar-edit-items li { min-height: 52px; }
.drag-handle { padding: 10px 6px; }

/* admin nav: sticky, scroll-snaps, with a soft fade that hints "more to the right" */
.bar-admin-nav { position: sticky; top: 0; z-index: 5; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.bar-admin-nav::-webkit-scrollbar { display: none; }
.bar-admin-nav button { flex: 0 0 auto; scroll-snap-align: center; border-radius: 22px; }
.bar-admin-nav button.on { box-shadow: 0 0 0 1px rgba(6,199,85,.5), 0 2px 8px rgba(6,199,85,.25); }

/* cards: calmer hierarchy */
.bar-card { box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 4px 14px rgba(0,0,0,.25); }
.bar-card-total { font-size: 17px; font-variant-numeric: tabular-nums; }
.bar-item-price, .hist-price, .bar-lines li span:last-child { font-variant-numeric: tabular-nums; }
.bar-item { padding: 10px 0; }
.bar-item-name { line-height: 1.3; }
.bar-stats > div { border: 1px solid #2C2C2E; }
.bar-stats b { font-size: 1.5em; }
.bar-settings h3, .bar-pad h3 { letter-spacing: .01em; }
.bar-pad h3 { margin: 16px 0 6px; }

/* empty states: centred, quieter, a little air */
.bar-board > .bar-note:only-child, .bar-pad > .bar-note:only-child, .hist-list + .bar-note, .bar-people > li.bar-note {
  text-align: center; padding: 28px 12px; border: 1px dashed #333; border-radius: 12px; margin: 10px 0;
}

/* money: the pay / cart bar stays unmissable on any phone */
.bar-cart button { min-height: 52px; font-size: 17px; letter-spacing: .01em; }
#btn-bar-cart.bar-pay-bar { box-shadow: 0 0 0 3px rgba(255,159,10,.35), 0 6px 20px rgba(0,0,0,.5); }
.bar-paypay-amount { font-size: 2.4em; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ===== Round 2: pop-ups + game screens ===== */
/* the sheet's round X no longer sits on top of the title (long titles wrap instead, any language) */
#bar-sheet-inner > h2 { padding-right: 52px; line-height: 1.25; text-wrap: balance; overflow-wrap: anywhere; }
#bar-sheet-inner > h2 + .bar-note, #bar-sheet-inner > .bar-note { margin-top: 2px; }
#bar-sheet-inner .secondary[data-close] { min-height: 48px; margin-top: 4px; }
/* games: the one big action is really big; options and answers wrap, never clip */
#game-spin, #game-go, #game-join, .bar-pay-big { min-height: 60px; font-size: 20px; border-radius: 14px; letter-spacing: .01em; }
.game-opt { min-height: 48px; line-height: 1.25; overflow-wrap: anywhere; }
.game-row { gap: 8px; }
.game-q { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.tri-ans { min-height: 56px; text-align: left; line-height: 1.3; overflow-wrap: anywhere; padding: 12px 16px; font-size: 16px; }
.tri-life button, .tri-life .small { min-height: 44px; }
.game-players li { align-items: center; min-height: 44px; font-variant-numeric: tabular-nums; }
.game-players li > :first-child { min-width: 0; overflow-wrap: anywhere; }
.game-players li > :last-child { flex: none; text-align: right; }
.game-landed { overflow-wrap: anywhere; line-height: 1.2; }
.game-result { box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.game-result h2 { line-height: 1.15; overflow-wrap: anywhere; }
.game-wl > div { font-size: 15px; line-height: 1.35; }
.game-card { padding: 12px 14px; }
.game-card-top button { min-height: 44px; }
.game-card-top b { min-width: 0; overflow-wrap: anywhere; }
@media (max-height: 700px) { .game-wheel-wrap { width: min(62vw, 240px); } .game-dice { font-size: 72px; } }
.game-by { display: block; font-size: 13px; font-weight: 500; color: #9A9A9A; margin-top: 2px; }

/* ===== Round 2: money cards ===== */
/* My tab: each order is a tidy row (what / price), the "Ask a friend to pay" button sits under it */
.bar-order-line { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-start; }
.bar-order-line > div { flex: 1 1 0; min-width: 9em; line-height: 1.45; overflow-wrap: anywhere; }
.bar-order-line > span { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.bar-order-line > button { flex: 0 0 auto; max-width: 100%; min-height: 40px; background: transparent; color: #FFD39A; border: 1px dashed #8A6A2E; font-weight: 600; }
.bar-lines li.bar-total { font-size: 20px; padding-top: 12px; border-top: 2px solid #3A3A3C; font-variant-numeric: tabular-nums; }
.bar-chip { max-width: 100%; overflow-wrap: anywhere; }
/* "Leave this bar" must never look like "Pay" */
#btn-leave-bar { width: 100%; min-height: 48px; background: #2C2C2E; color: #EDEDED; border: 1px solid #3A3A3C; font-weight: 600; }
/* Kappy's order card: the amber money style, upright text, big total */
.host-card { font-style: normal; background: #3A2A10; border: 2px solid #FFB547; border-radius: 14px; padding: 12px 14px; }
.host-card * { font-style: normal; }
.host-card-head { color: #FFD39A; font-size: 16px; }
.host-card-lines li { overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; padding: 6px 0; }
.host-card-lines li span:last-child { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.host-card-total { align-items: baseline; font-size: 16px; } .host-card-total b { font-size: 28px; color: #FFB547; font-variant-numeric: tabular-nums; }
.host-card-btns button { min-height: 52px; font-size: 16px; }
.host-card.accepted, .host-card.declined { background: #1C1C1E; border-color: #3A3A3C; }
.host-card small { font-size: 12px; opacity: .85; line-height: 1.4; }
/* request cards in the chat list (green = friends, amber = money) */
#chat-list li.req-card { min-height: 56px; overflow-wrap: anywhere; }
#chat-list li.req-card button { min-height: 44px; }
#chat-list li.req-card.pay-serious .pay-amount { font-size: 26px; font-variant-numeric: tabular-nums; }

/* ===== Round 2: names are user text - they wrap (max 2 lines), they never run off in one line (English / Japanese / Filipino) ===== */
.chat-row-title, .topbar span#chat-title, .topbar span#cal-title, .grp-head b, .grp-card-name, .grp-card-line, .hist-what, .music-list .song-title {
  white-space: normal; overflow: hidden; text-overflow: ellipsis; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.topbar span#chat-title, .topbar span#cal-title { line-height: 1.2; }
.grp-member { flex-wrap: wrap; row-gap: 6px; }
.grp-mname { flex: 1 1 8em; overflow-wrap: anywhere; line-height: 1.35; }
.grp-member button, .grp-card button { min-height: 40px; }
.grp-card-top { align-items: flex-start; }
.grp-pop-sum { flex-wrap: wrap; }
.bar-people li { flex-wrap: wrap; }
.bar-person-row { flex: 1 1 8em; overflow-wrap: anywhere; }
