/* Metod Ranked's look: paper, ink and the Metod yellow. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", "Noto Sans", sans-serif;
  color: #2b2a26; background: #f6f5f0; font-synthesis: none;
  --ink: #2b2a26; --yellow: #f5c400; --yellow-text: #8a6500; --muted: #77736a; --line: #e4e1d8; --red: #b3261e;
  --ease: cubic-bezier(.22,.8,.25,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #f6f5f0; }
body { -webkit-font-smoothing: antialiased; }
button, input { font: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; color: inherit; transition: transform .18s var(--ease), background .18s; }
button:active { transform: scale(.97); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(36px, 9.5vw, 46px); line-height: 1.07; letter-spacing: -2px; font-weight: 550; }
h1 em { font-style: normal; color: #b58600; }
h2 { font-size: 26px; line-height: 1.18; letter-spacing: -1px; font-weight: 550; }

#root { width: min(100%, 480px); min-height: 100dvh; margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 24px max(22px, env(safe-area-inset-bottom)); display: flex; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 22px; animation: arrive .36s var(--ease) both; min-width: 0; }
@keyframes arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.identity { display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.logo { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; line-height: 1; }
.logo img { height: 24px; width: auto; display: block; }
.logo span { font-size: 9.5px; font-weight: 500; letter-spacing: .34em; color: var(--ink); padding-left: 1px; }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: 1.8px; font-weight: 550; text-transform: uppercase; }
.sub { color: var(--muted); font-size: 15px; line-height: 1.6; }
.caption { color: var(--muted); font-size: 12px; line-height: 1.5; }
.intro { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; }

.form { display: flex; flex-direction: column; gap: 10px; }
.field-label { font-size: 11px; color: var(--muted); }
input { appearance: none; width: 100%; height: 50px; border: 0; border-bottom: 1px solid #cfcabd; border-radius: 0; background: transparent; padding: 0; color: var(--ink); outline: none; font-size: 18px; }
input::placeholder { color: #a39e92; }
input:focus { border-color: var(--yellow-text); }
.code-input { font-size: 30px; letter-spacing: 12px; font-variant-numeric: tabular-nums; }
.form .primary { margin-top: 14px; }
.form .caption { text-align: center; }
.error { color: var(--red); font-size: 13px; }
.dev { font-size: 12px; color: var(--yellow-text); background: #fbf3cf; padding: 8px 10px; border-radius: 10px; }

.primary { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; padding: 0 20px; border: 0; border-radius: 28px; background: var(--yellow); color: #2a2100; font-size: 15px; font-weight: 550; }
.text-button { border: 0; background: transparent; padding: 10px 4px; min-height: 44px; font-size: 14px; color: var(--ink); }
.text-button.small { font-size: 13px; color: var(--muted); }

.pick-head { display: grid; gap: 8px; }
.langs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.lang { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf7; min-width: 0; }
.lang img { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.lang span { font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang.selected { border-color: var(--yellow); background: #fff6cf; box-shadow: inset 0 0 0 1px var(--yellow); }
.bottom { position: sticky; bottom: 0; display: grid; gap: 12px; padding-top: 12px; background: linear-gradient(transparent, #f6f5f0 18px); }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #ece9df; padding: 4px; border-radius: 22px; }
.level { border: 0; background: transparent; height: 38px; border-radius: 18px; font-size: 13px; color: var(--muted); }
.level.selected { background: #fffdf7; color: var(--ink); font-weight: 550; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.talk { gap: 14px; }
.stage { position: relative; flex: 1; min-height: 360px; border-radius: 26px; overflow: hidden; background: #e9e6dc; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.stage.ready video { opacity: 1; }
.stage:not(.ready)::after { content: ''; position: absolute; left: 50%; top: 45%; width: 34px; height: 34px; margin: -17px; border-radius: 50%; border: 3px solid #d6d1c3; border-top-color: var(--yellow-text); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.topbar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; }
.pill { background: rgba(246,245,240,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 14px; padding: 5px 11px; font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums; }
.pill:empty { display: none; }
.captions { position: absolute; left: 12px; right: 12px; bottom: 12px; display: grid; gap: 6px; }
.captions p { max-width: 88%; padding: 8px 12px; border-radius: 16px; font-size: 14px; line-height: 1.4; background: rgba(43,42,38,.72); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.captions p[data-who="me"] { justify-self: end; background: rgba(245,196,0,.92); color: #2a2100; }
.talk-bottom { display: grid; gap: 10px; text-align: center; }
.live { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 13px; min-height: 20px; }
.live::before { content: ''; width: 7px; height: 7px; background: var(--yellow); border-radius: 50%; }
.stage.speaking + .talk-bottom .live::before { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .6; } }
.end { height: 52px; border: 0; border-radius: 28px; background: var(--ink); color: #f6f5f0; font-size: 15px; font-weight: 550; }

.balance { display: inline-block; justify-self: start; margin-top: 6px; background: #fff6cf; color: var(--yellow-text); font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 12px; }
.nopack { display: grid; gap: 12px; align-content: start; }
.nopack .primary { text-decoration: none; margin-top: 8px; }
.pick-body { display: flex; flex-direction: column; gap: 16px; flex: 1; }

.mic { margin: auto 0; padding: 40px 0; gap: 14px; }
.mic-icon { width: 76px; height: 76px; margin: 0 auto 4px; border-radius: 50%; background: #fff6cf; display: flex; align-items: center; justify-content: center; }
.mic-icon svg { width: 36px; height: 36px; fill: none; stroke: var(--yellow-text); stroke-width: 2; stroke-linecap: round; }

.lang { position: relative; }
.lang.locked { background: #f1eee5; border-color: #e4e0d4; }
.lang.locked img, .lang.locked span, .lang.locked small { opacity: .5; }
.lang .lk { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; fill: none; stroke: #8b867b; stroke-width: 2; stroke-linecap: round; }
.balance.none { background: #ece9df; color: var(--muted); }
.lock { position: fixed; inset: 0; z-index: 50; }
.lock-bg { position: absolute; inset: 0; background: rgba(20,18,14,.45); animation: lkf .2s ease both; }
.lock-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fbf8f1; border-radius: 24px 24px 0 0; padding: 10px 24px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 14px; animation: lku .3s var(--ease) both; }
@keyframes lku { from { transform: translateY(100%); } } @keyframes lkf { from { opacity: 0; } }
.lock-grab { width: 40px; height: 5px; border-radius: 3px; background: #d8d2c3; margin: 0 auto 4px; }
.lock-head { display: flex; gap: 14px; align-items: center; }
.lock-head img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.lock-sheet .primary { text-decoration: none; }

.packs { display: grid; gap: 8px; }
.packs label { position: relative; cursor: pointer; }
.packs input { position: absolute; opacity: 0; }
.packs span { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1.5px solid #e4dfd2; border-radius: 14px; background: #fff; }
.packs b { font-size: 16px; } .packs small { font-size: 12.5px; color: var(--muted); } .packs em { font-style: normal; font-weight: 800; }
.packs input:checked + span { border-color: var(--yellow-text); background: #fff6cf; box-shadow: 0 0 0 1px var(--yellow-text) inset; }
.notice { position: fixed; left: 16px; right: 16px; top: max(14px, env(safe-area-inset-top)); z-index: 60; max-width: 448px; margin: 0 auto; background: #22242a; color: #fff; padding: 14px 16px; border-radius: 16px; font-size: 14px; line-height: 1.45; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
