@font-face { font-family: Anton; src: url(/fonts/Anton-Regular.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: Serif; src: url(/fonts/InstrumentSerif-Italic.ttf) format('truetype'); font-style: italic; font-display: swap; }
@font-face { font-family: Tight; src: url(/fonts/InterTight-Bold.ttf) format('truetype'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: Tight; src: url(/fonts/InterTight-ExtraBold.ttf) format('truetype'); font-weight: 800 900; font-display: swap; }

:root {
  --blue: #1534D1; --deep: #0E259E; --night: #081667; --line: rgba(255,255,255,.16); --line2: rgba(255,255,255,.32);
  --yellow: #FFD23F; --white: #F6F7FF; --mute: #AFB9F2; --lime: #DDF54A; --cream: #FFF4E4; --ink: #0A1450; --red: #FF6A5C;
  --d: Anton, Impact, sans-serif; --s: Serif, Georgia, serif; --t: Tight, system-ui, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1); --spring: cubic-bezier(.34,1.56,.64,1);
  --pad: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--blue); -webkit-text-size-adjust: 100%; }
body { font-family: var(--t); font-weight: 700; color: var(--white); background: var(--blue); min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--yellow); color: var(--ink); }

/* court backdrop: the lines of a padel court, drawn once */
.court-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.court-bg svg { width: 100%; height: 100%; }
.court-bg path { fill: none; stroke: var(--line); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: draw 2.4s var(--ease) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.grain { position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }

.wrap { position: relative; z-index: 2; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--pad); background: var(--blue); border-bottom: 1px solid var(--line); }
.top .brand { display: flex; align-items: center; gap: 14px; }
.top .arc { height: 26px; width: auto; }
.top .x { font-family: var(--s); font-style: italic; font-size: 20px; color: var(--mute); }
.top .ew { height: 16px; width: auto; }
.livechip { display: flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .02em; color: var(--white); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: pulse 1.4s ease-in-out infinite; }
.dot.off { background: var(--mute); animation: none; }
@keyframes pulse { 50% { transform: scale(.55); opacity: .5; } }

/* nav */
.nav { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; display: flex; gap: 4px; padding: 5px; background: var(--ink); border-radius: 16px; border: 1px solid var(--line); }
.nav a { position: relative; padding: 11px 16px; border-radius: 12px; font-size: 14px; color: var(--mute); transition: color .25s; white-space: nowrap; }
.nav a.on { color: var(--ink); }
.nav .blob { position: absolute; z-index: -1; top: 5px; height: calc(100% - 10px); border-radius: 12px; background: var(--yellow); transition: left .45s var(--spring), width .45s var(--spring); }
.nav { isolation: isolate; }

main { padding: 0 var(--pad) 120px; max-width: 1280px; margin: 0 auto; }

/* hero */
.hero { position: relative; display: grid; grid-template-columns: 1fr; gap: 20px; padding: 34px 0 28px; }
.hero .logo { width: min(64vw, 340px); height: auto; transform-origin: 50% 0; animation: drop 1s var(--spring) both; }
@keyframes drop { from { transform: translateY(-30px) rotate(-6deg) scale(.9); opacity: 0; } }
.hero h1 { font-family: var(--d); font-weight: 400; font-size: clamp(44px, 11vw, 120px); line-height: .86; text-transform: uppercase; letter-spacing: -.005em; }
.hero h1 em { display: block; font-family: var(--s); font-style: italic; text-transform: none; color: var(--yellow); font-size: .5em; letter-spacing: 0; margin-top: .12em; }
.hero p { max-width: 560px; color: var(--mute); font-weight: 600; font-size: 16px; line-height: 1.45; }
@media (min-width: 900px) {
  .hero { grid-template-columns: auto 1fr; align-items: center; gap: 64px; padding: 56px 0 44px; }
}

.sec { padding: 28px 0 8px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line2); }
.sec-h h2 { font-family: var(--d); font-weight: 400; font-size: clamp(30px, 6vw, 52px); text-transform: uppercase; line-height: .9; }
.sec-h h2 em { font-family: var(--s); font-style: italic; text-transform: none; color: var(--yellow); }
.sec-h span { color: var(--mute); font-size: 14px; font-weight: 600; }

/* round header */
.roundbar { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; }
.roundbar .big { font-family: var(--d); font-size: clamp(64px, 16vw, 150px); line-height: .8; }
.roundbar .big small { font-size: .38em; color: var(--mute); }
.roundbar .lbl { font-family: var(--s); font-style: italic; font-size: clamp(22px, 4vw, 34px); color: var(--yellow); line-height: 1; }
.roundbar .lbl b { display: block; font-family: var(--t); font-style: normal; font-size: 14px; color: var(--mute); margin-top: 6px; }
.progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 22px; }
.progress i { display: block; height: 100%; background: var(--yellow); transform-origin: 0 50%; transition: transform .8s var(--ease); }

/* court cards */
.courts { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .courts { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; } }
.court { position: relative; overflow: hidden; background: var(--deep); border: 1px solid var(--line2); border-radius: 22px; padding: 20px; min-height: 260px; }
.court .cn { position: absolute; right: 18px; top: 4px; font-family: var(--d); font-size: 150px; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--line2); pointer-events: none; }
.court .head { position: relative; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--mute); margin-bottom: 8px; }
.court .head b { color: var(--white); font-size: 14px; }
.court .clock { font-variant-numeric: tabular-nums; color: var(--white); }
.court .clock.over { color: var(--red); animation: pulse 1s infinite; }
.side { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 4px; }
.side .names { font-family: var(--d); font-size: clamp(22px, 3.4vw, 32px); line-height: .95; text-transform: uppercase; overflow-wrap: anywhere; }
.side .names small { display: block; font-family: var(--t); font-size: 12px; color: var(--mute); text-transform: none; margin-top: 4px; }
.side.win .names { color: var(--yellow); }
.score { position: relative; display: inline-block; min-width: 1.1em; text-align: right; font-family: var(--d); font-size: clamp(64px, 12vw, 108px); line-height: .9; font-variant-numeric: tabular-nums; overflow: hidden; height: .98em; }
.score span { display: block; }
.side.win .score { color: var(--yellow); }
.court.idle .score { color: var(--mute); }
.court.flash { animation: flash .7s var(--ease); }
@keyframes flash { 0% { border-color: var(--yellow); } 100% { border-color: var(--line2); } }

.duo { display: flex; }
.av { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--night); border: 2px solid var(--blue); display: grid; place-items: center; font-family: var(--d); font-size: 18px; color: var(--white); overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.duo .av + .av { margin-left: -14px; }
.av.lg { width: 64px; height: 64px; font-size: 26px; }
.av.xl { width: 112px; height: 112px; font-size: 44px; }

.empty { padding: 40px 0; color: var(--mute); font-family: var(--s); font-style: italic; font-size: 26px; line-height: 1.2; }
.empty b { font-family: var(--t); font-style: normal; font-size: 15px; display: block; margin-top: 10px; }

/* standings */
.table { display: grid; gap: 0; }
.row { position: relative; display: grid; grid-template-columns: 44px auto 1fr auto; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.row .rk { font-family: var(--d); font-size: 30px; line-height: 1; color: var(--mute); text-align: right; }
.row.top .rk { color: var(--yellow); }
.row .nm { font-family: var(--d); font-size: 22px; text-transform: uppercase; line-height: 1; overflow-wrap: anywhere; }
.row .nm small { display: block; font-family: var(--t); font-size: 12px; color: var(--mute); text-transform: none; margin-top: 5px; }
.row .pt { font-family: var(--d); font-size: 34px; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.row .pt small { display: block; font-family: var(--t); font-size: 11px; color: var(--mute); }
.row .lv { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-left: 8px; vertical-align: middle; animation: pulse 1.4s infinite; }
.cut { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--yellow); font-family: var(--s); font-style: italic; font-size: 20px; }
.cut::before, .cut::after { content: ''; flex: 1; border-top: 2px dashed var(--yellow); }

/* matches list */
.rounds { display: grid; gap: 22px; }
.rnd h3 { font-family: var(--d); font-weight: 400; font-size: 26px; text-transform: uppercase; display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.rnd h3 small { font-family: var(--t); font-size: 13px; color: var(--mute); text-transform: none; }
.rnd.now h3 { color: var(--yellow); }
.mline { display: grid; grid-template-columns: 70px 1fr auto 1fr; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.mline .c { color: var(--mute); font-size: 13px; }
.mline .tA { text-align: right; }
.mline .sc { font-family: var(--d); font-size: 24px; min-width: 76px; text-align: center; font-variant-numeric: tabular-nums; }
.mline .w { color: var(--yellow); }
.mline .nc { color: var(--mute); font-size: 11px; display: block; }

/* players */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 10px; border: 1px solid var(--line); border-radius: 18px; text-align: center; transition: transform .3s var(--spring), border-color .2s; }
.pcard:hover { transform: translateY(-3px); border-color: var(--line2); }
.pcard .nm { font-family: var(--d); font-size: 20px; text-transform: uppercase; line-height: 1; }
.pcard small { color: var(--mute); font-size: 12px; }
.pcard .add { color: var(--yellow); font-size: 12px; }

/* sponsors band */
.band { position: relative; z-index: 2; background: var(--cream); color: var(--ink); padding: 26px var(--pad) 120px; }
.band p { font-family: var(--s); font-style: italic; font-size: 20px; text-align: center; margin-bottom: 16px; }
.band .logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px 36px; }
.band img { height: 34px; width: auto; }
.band img.tall { height: 52px; }

/* sheet (photo upload) */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(5,12,60,.72); display: grid; align-items: end; justify-items: center; animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(520px, 100%); background: var(--white); color: var(--ink); border-radius: 26px 26px 0 0; padding: 26px 22px max(26px, env(safe-area-inset-bottom)); animation: up .45s var(--spring) both; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 26px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet h3 { font-family: var(--d); font-weight: 400; font-size: 36px; text-transform: uppercase; line-height: .9; }
.sheet p { font-weight: 600; color: #3D477F; margin: 10px 0 18px; line-height: 1.4; }
.sheet .av { border-color: var(--white); margin: 0 auto 16px; }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 15px; box-shadow: 0 4px 0 #C99A00; transition: transform .12s, box-shadow .12s; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #C99A00; }
.btn.ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px var(--line2); }
.btn.ghost:active { transform: translateY(1px); }
.sheet .btn.ghost { color: var(--ink); box-shadow: inset 0 0 0 1.5px #C8CDEB; }
.btn.dark { background: var(--ink); color: var(--white); box-shadow: 0 4px 0 #000A33; }
.btn.red { background: var(--red); color: var(--ink); box-shadow: 0 4px 0 #B8382C; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--mute); }
.inp { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line2); background: var(--night); color: var(--white); font-weight: 600; outline: none; transition: border-color .2s; }
.inp:focus { border-color: var(--yellow); }
textarea.inp { min-height: 150px; resize: vertical; line-height: 1.5; }
.toast { position: fixed; left: 50%; top: 18px; z-index: 80; transform: translateX(-50%); background: var(--white); color: var(--ink); padding: 12px 18px; border-radius: 12px; font-size: 14px; animation: up .35s var(--spring) both; max-width: calc(100% - 32px); }
.toast.err { background: var(--red); }

/* admin */
.login { max-width: 420px; margin: 8vh auto 0; }
.login h1 { font-family: var(--d); font-weight: 400; font-size: 64px; line-height: .9; text-transform: uppercase; margin-bottom: 8px; }
.login p { color: var(--mute); font-weight: 600; margin-bottom: 22px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 16px 0; scrollbar-width: none; }
.tabs button { flex: none; padding: 10px 16px; border-radius: 12px; color: var(--mute); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; }
.tabs button.on { background: var(--white); color: var(--ink); box-shadow: none; }
.panel { display: grid; gap: 22px; }
.box { border: 1px solid var(--line2); border-radius: 20px; padding: 20px; }
.box h3 { font-family: var(--d); font-weight: 400; font-size: 28px; text-transform: uppercase; line-height: 1; margin-bottom: 4px; }
.box > p { color: var(--mute); font-weight: 600; font-size: 14px; margin-bottom: 16px; line-height: 1.4; }
.two { display: grid; gap: 22px; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1fr; align-items: start; } }
.plist { display: grid; gap: 0; }
.pitem { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pitem .nm { font-size: 16px; }
.pitem .nm small { display: block; color: var(--mute); font-size: 12px; font-weight: 600; margin-top: 2px; }
.pitem .act { display: flex; gap: 6px; }
.mini { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; box-shadow: inset 0 0 0 1.5px var(--line2); color: var(--white); }
.mini.y { background: var(--yellow); color: var(--ink); box-shadow: none; }
.fmt { display: grid; gap: 12px; }
@media (min-width: 700px) { .fmt { grid-template-columns: repeat(3, 1fr); } }
.fmt button { text-align: left; padding: 18px; border-radius: 18px; box-shadow: inset 0 0 0 1.5px var(--line2); transition: transform .3s var(--spring); }
.fmt button b { display: block; font-family: var(--d); font-weight: 400; font-size: 30px; text-transform: uppercase; line-height: 1; }
.fmt button i { display: block; font-family: var(--s); font-size: 20px; color: var(--yellow); margin: 4px 0 8px; }
.fmt button span { color: var(--mute); font-size: 13px; font-weight: 600; line-height: 1.4; display: block; }
.fmt button.on { background: var(--yellow); color: var(--ink); box-shadow: none; transform: translateY(-2px); }
.fmt button.on i { color: var(--ink); }
.fmt button.on span { color: var(--deep); }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg button { min-width: 48px; min-height: 42px; padding: 0 12px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--line2); font-size: 15px; }
.seg button.on { background: var(--white); color: var(--ink); box-shadow: none; }
.warn { padding: 12px 14px; border-radius: 12px; background: var(--night); border-left: 4px solid var(--yellow); font-size: 14px; font-weight: 600; line-height: 1.4; }
.teams { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.teams div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--night); font-size: 14px; }

/* scorer */
.scorer { display: grid; gap: 16px; }
@media (min-width: 900px) { .scorer { grid-template-columns: 1fr 1fr; } }
.sc-court { border: 1.5px solid var(--line2); border-radius: 22px; padding: 16px; background: var(--deep); }
.sc-court.live { border-color: var(--yellow); }
.sc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sc-top b { font-family: var(--d); font-weight: 400; font-size: 30px; text-transform: uppercase; }
.sc-top span { font-size: 14px; color: var(--mute); font-variant-numeric: tabular-nums; }
.sc-side { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.sc-side .nm { font-family: var(--d); font-size: 22px; text-transform: uppercase; line-height: 1; }
.sc-side .ctl { display: flex; align-items: center; gap: 8px; }
.sc-side .val { font-family: var(--d); font-size: 56px; min-width: 70px; text-align: center; line-height: 1; font-variant-numeric: tabular-nums; }
.plus { width: 76px; height: 76px; border-radius: 20px; background: var(--yellow); color: var(--ink); font-family: var(--d); font-size: 42px; box-shadow: 0 5px 0 #C99A00; touch-action: manipulation; }
.plus:active { transform: translateY(4px); box-shadow: 0 1px 0 #C99A00; }
.minus { width: 44px; height: 44px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line2); font-size: 22px; touch-action: manipulation; }
.sc-foot { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- TV (projector), fixed 1920x1080 canvas scaled to fit ---------- */
body.tvmode { overflow: hidden; background: var(--night); }
.tvstage { position: fixed; inset: 0; display: grid; place-items: center; background: var(--night); }
.tv { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; flex: none; background: var(--blue); overflow: hidden; transform-origin: center; }
.tv .court-bg { position: absolute; }
.tv .grain { position: absolute; }
.tv-top { position: absolute; left: 64px; right: 64px; top: 40px; height: 120px; display: flex; align-items: center; justify-content: space-between; z-index: 3; }
.tv-top .l { display: flex; align-items: center; gap: 28px; }
.tv-top .tl { height: 120px; width: auto; }
.tv-top .arc { height: 56px; width: auto; }
.tv-top .ew { height: 30px; width: auto; }
.tv-top .x { font-family: var(--s); font-style: italic; font-size: 40px; color: var(--mute); }
.tv-top .r { text-align: right; }
.tv-top .rn { font-family: var(--d); font-size: 96px; line-height: .85; }
.tv-top .rn small { font-size: 44px; color: var(--mute); }
.tv-top .sub { font-family: var(--s); font-style: italic; font-size: 30px; color: var(--yellow); margin-top: 6px; }
.tv-courts { position: absolute; left: 64px; top: 200px; width: 1150px; height: 690px; display: grid; grid-template-rows: repeat(var(--n, 2), 1fr); gap: 26px; z-index: 3; }
.tv-courts[style*='--n:3'], .tv-courts[style*='--n:4'] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 20px; }
.tv-courts[style*='--n:3'] .tv-side .nm, .tv-courts[style*='--n:4'] .tv-side .nm { font-size: 32px; }
.tv-courts[style*='--n:3'] .tv-side .score, .tv-courts[style*='--n:4'] .tv-side .score { font-size: 90px; min-width: 110px; }
.tv-courts[style*='--n:3'] .tv-side .av, .tv-courts[style*='--n:4'] .tv-side .av { width: 56px; height: 56px; font-size: 22px; }
.tv-courts[style*='--n:3'] .tv-court .cn, .tv-courts[style*='--n:4'] .tv-court .cn { font-size: 200px; }
.tv-court { position: relative; border: 2px solid var(--line2); border-radius: 30px; background: var(--deep); padding: 18px 34px 8px; display: grid; grid-template-rows: auto minmax(0,1fr) minmax(0,1fr); overflow: hidden; }
.tv-court.live { border-color: var(--yellow); }
.tv-court.flash { animation: flash .9s var(--ease); }
.tv-court .cn { display: none; }
.tv-court .hd { display: flex; gap: 22px; align-items: baseline; font-size: 26px; color: var(--mute); position: relative; }
.tv-court .hd b { color: var(--white); font-family: var(--d); font-weight: 400; font-size: 34px; text-transform: uppercase; }
.tv-court .hd .clock { color: var(--white); font-variant-numeric: tabular-nums; }
.tv-court .hd .clock.over { color: var(--red); }
.tv-side { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center; }
.tv-side + .tv-side { border-top: 2px dashed var(--line2); }
.tv-side .av { width: 92px; height: 92px; font-size: 36px; border-width: 3px; }
.tv-side .duo .av + .av { margin-left: -26px; }
.tv-side .nm { font-family: var(--d); font-size: 56px; line-height: .92; text-transform: uppercase; }
.tv-side .nm small { display: block; font-family: var(--t); font-size: 20px; color: var(--mute); text-transform: none; margin-top: 6px; }
.tv-side .score { font-size: 118px; min-width: 170px; }
.tv-side.win .nm, .tv-side.win .score { color: var(--yellow); }
.tv-court.idle .score { color: var(--mute); }
.tv-board { position: absolute; right: 64px; top: 200px; width: 600px; height: 690px; z-index: 3; display: flex; flex-direction: column; }
.tv-board h2 { font-family: var(--d); font-weight: 400; font-size: 60px; text-transform: uppercase; line-height: 1; display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 2px solid var(--line2); }
.tv-board h2 em { font-family: var(--s); font-size: 30px; color: var(--yellow); text-transform: none; }
.tv-board .list { position: relative; flex: 1; overflow: hidden; }
.tv-row { display: grid; grid-template-columns: 50px 62px 1fr auto; gap: 16px; align-items: center; height: 60px; border-bottom: 1px solid var(--line); }
.tv-row .rk { font-family: var(--d); font-size: 34px; color: var(--mute); text-align: right; }
.tv-row.top .rk { color: var(--yellow); }
.tv-row .av { width: 50px; height: 50px; font-size: 20px; }
.tv-row .duo .av { width: 42px; height: 42px; font-size: 16px; }
.tv-row .duo .av + .av { margin-left: -20px; }
.tv-row .nm { font-family: var(--d); font-size: 28px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-row .pt { font-family: var(--d); font-size: 38px; font-variant-numeric: tabular-nums; }
.tv-cut { display: flex; align-items: center; gap: 12px; height: 34px; color: var(--yellow); font-family: var(--s); font-style: italic; font-size: 24px; }
.tv-cut::before, .tv-cut::after { content: ''; flex: 1; border-top: 2px dashed var(--yellow); }
.tv-foot { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; z-index: 3; display: grid; grid-template-columns: 1215px 1fr; }
.tv-next { padding: 26px 64px; display: flex; align-items: center; gap: 30px; border-top: 2px solid var(--line2); }
.tv-next b { font-family: var(--s); font-style: italic; font-weight: 400; font-size: 34px; color: var(--yellow); flex: none; }
.tv-next .m { font-family: var(--d); font-size: 30px; text-transform: uppercase; line-height: 1.1; }
.tv-next .m small { display: block; font-family: var(--t); font-size: 18px; color: var(--mute); text-transform: none; }
.tv-spons { background: var(--cream); overflow: hidden; display: flex; align-items: center; }
.tv-spons .track { display: flex; align-items: center; justify-content: space-evenly; width: 100%; padding: 0 30px; }
.tv-spons img { height: 34px; width: auto; flex: none; }
.tv-spons img.tall { height: 58px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tv-empty { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; text-align: center; }
.tv-empty img { width: 620px; height: auto; margin: 0 auto 30px; animation: drop 1.2s var(--spring) both; }
.tv-empty p { font-family: var(--s); font-style: italic; font-size: 56px; color: var(--yellow); }
.tv-empty small { display: block; font-size: 30px; color: var(--mute); margin-top: 12px; font-family: var(--t); font-style: normal; }
.tv-burst { position: absolute; z-index: 6; pointer-events: none; font-family: var(--d); font-size: 120px; color: var(--yellow); animation: burst 1s var(--ease) forwards; }
@keyframes burst { from { transform: translateY(20px) scale(.6); opacity: 0; } 25% { opacity: 1; transform: translateY(0) scale(1.05); } to { transform: translateY(-80px) scale(1); opacity: 0; } }

.enter > * { animation: rise .7s var(--ease) both; }
.enter > *:nth-child(2) { animation-delay: .06s; } .enter > *:nth-child(3) { animation-delay: .12s; } .enter > *:nth-child(4) { animation-delay: .18s; } .enter > *:nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { transform: translateY(26px); opacity: 0; } }
::view-transition-old(root) { animation: .25s ease both fadeout; }
::view-transition-new(root) { animation: .45s var(--ease) both rise; }
@keyframes fadeout { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .court-bg path { stroke-dashoffset: 0; }
}

/* ---------- animated Tipsy logo ---------- */
.tlogo { --ink: #1B1531; display: inline-block; font-size: var(--ls, 120px); line-height: 1; }
.tl-in { display: flex; flex-direction: column; align-items: center; animation: sway 5.5s ease-in-out 2.4s infinite; transform-origin: 50% 90%; }
@keyframes sway { 0%,100% { transform: rotate(-1.6deg) translateY(0); } 50% { transform: rotate(1.6deg) translateY(-.03em); } }
.tw { position: relative; display: flex; font-family: var(--d); text-transform: uppercase; line-height: .92; white-space: nowrap; }
.tw span { display: inline-block; paint-order: stroke fill; -webkit-text-stroke: var(--sw) var(--ink); text-shadow: var(--ext);
  transform: translateY(var(--y)) rotate(var(--r)); animation: ldrop .9s var(--spring) var(--d) both; }
@keyframes ldrop { 0% { transform: translateY(-1.4em) rotate(calc(var(--r) * -4)); opacity: 0; } 60% { opacity: 1; } 100% { transform: translateY(var(--y)) rotate(var(--r)); } }
.tw.the { font-size: .31em; color: #fff; --sw: .15em; letter-spacing: .08em; margin-bottom: .95em; transform: rotate(-5deg); }
.tw.tipsy { font-size: 1em; color: var(--yellow); --sw: .067em; letter-spacing: .015em; z-index: 1; }
.tw.games { font-size: .84em; color: #fff; --sw: .07em; letter-spacing: .03em; margin-top: -.03em; }
.tlogo:hover .tw span { animation: jig .5s var(--spring); }
.tlogo:hover .tw span:nth-child(odd) { animation-delay: .04s; }
@keyframes jig { 40% { transform: translateY(calc(var(--y) - .08em)) rotate(calc(var(--r) * -1.5)); } }
.foam { position: absolute; z-index: 2; overflow: visible; pointer-events: none; }
.foam .fbar { transform-box: fill-box; transform-origin: 0 50%; animation: pour .55s var(--ease) 1.0s both; }
@keyframes pour { from { transform: scaleX(0); } }
.foam .fb { transform-box: fill-box; transform-origin: 50% 100%; animation: pop .5s var(--spring) both; animation-delay: calc(1.15s + var(--i) * .05s); }
@keyframes pop { from { transform: scale(0); } }
.foam .fd { transform-box: fill-box; transform-origin: 50% 0; animation: drip 1.1s var(--ease) both, dripidle 3.4s ease-in-out infinite; animation-delay: calc(1.45s + var(--i) * .12s), calc(2.8s + var(--i) * .5s); }
@keyframes drip { from { transform: scaleY(.15); } }
@keyframes dripidle { 50% { transform: scaleY(1.12); } }
.foam .bubbles circle { transform-box: fill-box; animation: bub 3.6s ease-in infinite; animation-delay: calc(2s + var(--i) * .55s); opacity: 0; }
@keyframes bub { 0% { transform: translateY(0) scale(.4); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-1.4em) scale(1); opacity: 0; } }
.tlogo.still .tl-in, .tlogo.still .tw span, .tlogo.still .foam * { animation: none !important; opacity: 1; }

.mv { font-style: normal; font-family: var(--t); font-size: 12px; margin-left: 8px; vertical-align: middle; animation: rise .4s var(--spring) both; }
.mv.up { color: var(--lime); } .mv.dn { color: var(--red); }
.tv-row .mv { font-size: 18px; }

.vn { font-family: var(--d); font-size: 18px; text-transform: uppercase; letter-spacing: .01em; }
.tv-top .vn { font-size: 40px; }

.tlogo.settled .tw span, .tlogo.settled .foam .fbar, .tlogo.settled .foam .fb { animation: none; }
.tlogo.settled .foam .fd { animation: dripidle 3.4s ease-in-out infinite; animation-delay: calc(var(--i) * .5s); }
.tlogo.settled .tl-in { animation-delay: 0s; }

/* ---------- padel court pitch (each court card is drawn as a court) ---------- */
.court { padding: 16px; min-height: 0; }
.court .head { margin-bottom: 12px; }
.pitch { position: relative; display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 2 / 1; min-height: 170px; border-radius: 10px; background: #1C47E6; box-shadow: inset 0 0 0 3px rgba(255,255,255,.22); overflow: hidden; }
.pitch::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(255,255,255,.025) 22px 44px); pointer-events: none; }
.pitch .lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.pitch .lines * { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 2; vector-effect: non-scaling-stroke; }
.pitch .lines .netl { stroke: var(--white); stroke-width: 4; stroke-dasharray: 2 5; }
.half { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 12px 14px; min-width: 0; text-align: left; color: var(--white); }
.half.b { align-items: flex-end; text-align: right; }
.half .who { display: grid; gap: 8px; }
.half.b .who { justify-items: end; }
.half .names { font-family: var(--d); font-size: clamp(16px, 2.4vw, 24px); line-height: .95; text-transform: uppercase; overflow-wrap: anywhere; text-shadow: 0 1px 0 rgba(0,0,0,.18); }
.half .names small { display: block; font-family: var(--t); font-size: 11px; color: var(--mute); text-transform: none; margin-top: 3px; }
.half .score { font-size: clamp(54px, 10vw, 96px); align-self: flex-end; text-align: right; }
.half.b .score { align-self: flex-start; text-align: left; }
.half.win .names, .half.win .score { color: var(--yellow); }
.half.me .names { text-decoration: underline 3px var(--yellow); text-underline-offset: 4px; }
.court.idle .half .score { color: rgba(255,255,255,.5); }
.court.live { border-color: var(--yellow); }
.ball { position: absolute; z-index: 2; top: 44%; width: 16px; height: 16px; border-radius: 50%; background: var(--lime); box-shadow: inset -3px -3px 0 rgba(0,0,0,.18); left: calc(25% - 8px); transition: left .6s var(--spring); animation: hop .9s ease-in-out infinite; }
.ball.b { left: calc(75% - 8px); }
@keyframes hop { 50% { transform: translateY(-14px); } }
.duo .av { width: 38px; height: 38px; font-size: 15px; }
.duo .av + .av { margin-left: -12px; }
/* TV size */
.tv-court { padding: 16px 22px 18px; grid-template-rows: auto 1fr; }
.tv-court .head { font-size: 22px; color: var(--mute); margin-bottom: 10px; display: flex; gap: 18px; align-items: baseline; }
.tv-court .head b { font-family: var(--d); font-weight: 400; font-size: 34px; color: var(--white); text-transform: uppercase; }
.tv-court .clock { color: var(--white); font-variant-numeric: tabular-nums; }
.tv-court .clock.over { color: var(--red); }
.tv-court .pitch { aspect-ratio: auto; height: 100%; }
.tv-court .half { padding: 20px 34px; flex-direction: row; align-items: center; }
.tv-court .half.b { flex-direction: row-reverse; }
.tv-court .half .duo .av { width: 70px; height: 70px; font-size: 28px; border-width: 3px; }
.tv-court .half .duo .av + .av { margin-left: -20px; }
.tv-court .half .names { font-size: 44px; }
.tv-court .half .names small { font-size: 18px; }
.tv-court .half .score { font-size: 160px; align-self: center; }
.tv-court .ball { width: 26px; height: 26px; left: calc(25% - 13px); }
.tv-court .ball.b { left: calc(75% - 13px); }
.tv-courts[style*='--n:3'] .tv-court .half, .tv-courts[style*='--n:4'] .tv-court .half { flex-direction: column; align-items: flex-start; padding: 14px 18px; }
.tv-courts[style*='--n:3'] .tv-court .half.b, .tv-courts[style*='--n:4'] .tv-court .half.b { align-items: flex-end; }
.tv-courts[style*='--n:3'] .tv-court .half .names, .tv-courts[style*='--n:4'] .tv-court .half .names { font-size: 26px; }
.tv-courts[style*='--n:3'] .tv-court .half .score, .tv-courts[style*='--n:4'] .tv-court .half .score { font-size: 84px; }
/* scorer: tap a half of the court */
.sc-court .pitch { min-height: 220px; }
.sc-court button.half { cursor: pointer; touch-action: manipulation; transition: background .15s; -webkit-tap-highlight-color: transparent; }
.sc-court button.half:active { background: rgba(255,210,63,.28); }
.sc-hint { font-size: 12px; color: var(--mute); margin-top: 8px; }
.sc-court .minus { width: auto; padding: 0 12px; font-size: 13px; }

/* me banner + profile */
.mebar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 22px; border-radius: 16px; background: var(--white); color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.35; animation: rise .6s var(--ease) both; }
.mebar .av { border-color: var(--white); }
.mebar > span:not(.av) { flex: 1; } .mebar i { font-style: normal; font-weight: 800; font-size: 13px; white-space: nowrap; }
.prof { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 34px 0 20px; }
.prof h1 { font-family: var(--d); font-weight: 400; font-size: clamp(48px, 12vw, 110px); line-height: .85; text-transform: uppercase; overflow-wrap: anywhere; }
.prof p { color: var(--mute); font-weight: 600; margin: 8px 0 14px; } .prof p em { font-family: var(--s); color: var(--yellow); font-size: 19px; }
.prof-av { position: relative; } .prof-av .av.xl { width: clamp(110px, 26vw, 180px); height: clamp(110px, 26vw, 180px); font-size: 54px; border: 4px solid var(--yellow); }
.addph { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); background: var(--yellow); color: var(--ink); font-size: 12px; padding: 5px 10px; border-radius: 10px; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.stat { padding: 16px 6px; text-align: center; } .stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--d); font-weight: 400; font-size: clamp(34px, 8vw, 60px); line-height: 1; }
.stat span { font-size: 12px; color: var(--mute); }
.pm { position: relative; } .pm .res { position: absolute; left: 0; top: 4px; font-style: normal; font-size: 11px; color: var(--mute); }
.pm .res.w { color: var(--yellow); } .pm .res.l { color: var(--red); } .pm .res.lv2 { color: var(--lime); }
.pm .mline { padding-top: 22px; }
@media (max-width: 560px) { .mline { grid-template-columns: 1fr auto 1fr; } .mline .c { grid-column: 1 / -1; } .stats { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 420px) { .nav a { padding: 11px 11px; font-size: 13px; } }
.panel, .scorer, .scorer > *, .sc-court, .two > *, .box { min-width: 0; }
.pitch { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; }
.row-btns .seg { flex-wrap: wrap; }
