:root {
  --bg: #0a1020;
  --bg-2: #11192e;
  --panel: #121c31;
  --panel-2: #16213a;
  --text: #f5f7ff;
  --muted: #93a1bf;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --primary: #5f6cff;
  --primary-2: #7c68ff;
  --accent: #20d3a1;
  --danger: #ef5c79;
  --chip: rgba(255,255,255,0.06);
  --shadow: 0 16px 40px rgba(0,0,0,0.32);
}
body.light {
  --bg: #eef3ff;
  --bg-2: #f6f8ff;
  --panel: #ffffff;
  --panel-2: #f9fbff;
  --text: #0e1728;
  --muted: #65748e;
  --line: rgba(16,24,40,0.08);
  --line-2: rgba(16,24,40,0.15);
  --primary: #5867f2;
  --primary-2: #705eff;
  --accent: #12a67c;
  --danger: #dd4f70;
  --chip: rgba(16,24,40,0.05);
  --shadow: 0 14px 32px rgba(31, 41, 55, 0.12);
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; min-height:100%; }
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 100% 0%, rgba(95,108,255,0.18), transparent 25%),
    radial-gradient(circle at 0% 18%, rgba(32,211,161,0.14), transparent 20%),
    linear-gradient(180deg, var(--bg) 0%, #0a0f1d 100%);
  color: var(--text);
  font-size: 16px;
}
body.light { background: linear-gradient(180deg, #eef3ff 0%, #f8faff 100%); }
button, input, select { font: inherit; }
.hidden { display:none !important; }
.app-shell { max-width: 1380px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 12px calc(94px + env(safe-area-inset-bottom)); width:100%; }
.mobile-header {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding: 10px 12px; border-radius: 18px; border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(95,108,255,0.18), rgba(95,108,255,0.08));
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.brand-inline { display:flex; align-items:center; gap:10px; min-width:0; }
.brand-ball { width:32px; height:32px; border-radius:50%; display:grid; place-items:center; border:2px solid #64e3c0; color:#76e4c7; font-weight:800; }
.brand-ball.small { width:28px; height:28px; font-size:14px; }
.brand-name { font-weight:900; font-size: 1.05rem; line-height:1; }
.brand-subname, .drawer-sub { color: var(--muted); font-size: .76rem; margin-top: 2px; }
.header-actions { display:flex; align-items:center; gap:8px; }
.icon-btn, .lang-btn, .setting-btn, .mini-btn, .primary-action, .bottom-btn, .tab-btn, .drawer-link { cursor:pointer; border:0; }
.icon-btn {
  width:40px; height:40px; border-radius:14px; background:var(--panel); color:var(--text);
  border:1px solid var(--line); display:grid; place-items:center; font-size:1.05rem;
}
.lang-btn {
  min-width:48px; height:40px; padding:0 12px; border-radius:14px; background:var(--panel); color:var(--text); border:1px solid var(--line); font-weight:800;
}
.content { display:grid; gap: 12px; max-width: none; margin: 0 auto; width:100%; }
.hero-compact, .compact-card, .modal {
  background: linear-gradient(180deg, rgba(18,28,49,0.98), rgba(10,16,32,0.98));
  border:1px solid var(--line); box-shadow: var(--shadow); border-radius: 22px;
}
body.light .hero-compact, body.light .compact-card, body.light .modal {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,255,0.98));
}
.hero-compact { padding: 12px; display:grid; gap:8px; }
.hero-mini h1 { font-size: 1.18rem; }
.hero-kicker { display:inline-flex; padding:4px 9px; border-radius:999px; background: rgba(95,108,255,0.16); color:#c7ccff; font-size:.74rem; font-weight:800; }
body.light .hero-kicker { color:#4250e8; }
.hero-compact h1 { margin:0; font-size: 1.32rem; line-height:1.08; }
.hero-compact p { margin: 4px 0 0; color: var(--muted); line-height:1.35; font-size:.95rem; }
.role-pills { display:flex; gap:8px; overflow:auto; padding-bottom:2px; }
.role-pill { padding:8px 12px; border-radius:999px; background:var(--chip); white-space:nowrap; font-size:.84rem; font-weight:700; color: var(--muted); }
.role-pill.active { background: var(--primary); color: white; }
.banner { padding: 11px 13px; border-radius: 16px; font-weight:700; font-size:.92rem; }
.banner.error { background: rgba(239,92,121,0.13); border:1px solid rgba(239,92,121,0.24); color:#ffd0d9; }
.banner.success { background: rgba(32,211,161,0.14); border:1px solid rgba(32,211,161,0.24); color:#bffceb; }
.stats-row { display:grid; grid-template-columns: repeat(3,1fr); gap:8px; }
.stat-card { padding: 10px 11px; }
.stat-card.mini { border-radius:18px; }
.stat-label { color: var(--muted); font-size:.74rem; line-height:1.2; }
.stat-value { margin-top:4px; font-weight:900; font-size: 1.05rem; line-height:1; }
.stat-value.small, .stat-value.tiny { font-size: 1rem; }
.section-tabs { display:flex; gap:8px; overflow:auto; padding-bottom:2px; }
.tab-btn {
  background: var(--panel); color: var(--muted); border:1px solid var(--line);
  padding: 10px 14px; border-radius: 999px; font-weight:800; white-space:nowrap;
}
.tab-btn.active { background: var(--primary); color:#fff; border-color: transparent; }
.section-panel { display:none; gap: 10px; }
.section-panel.active { display:grid; }
.compact-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.full-list{padding-bottom:6px;}
.compact-head h2, .card-head h3 { margin:0; font-size:1.08rem; }
.primary-action {
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color:#fff; padding:10px 12px; border-radius:14px; font-weight:800;
}
.mini-btn { background: transparent; color: var(--primary); font-weight:800; padding:0; }
.two-col { display:grid; grid-template-columns: repeat(2, 1fr); gap:10px; }
.list-card { padding: 12px; }
.inline-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.compact-list { display:grid; gap:8px; }
.item-row {
  display:grid; grid-template-columns: 1fr auto; gap:8px; align-items:center;
  padding: 10px 11px; border-radius: 14px; background: var(--chip); border: 1px solid var(--line);
}
.item-main { min-width:0; }
.item-title { font-size:.92rem; font-weight:800; line-height:1.2; }
.item-meta { margin-top:2px; color: var(--muted); font-size:.74rem; line-height:1.25; }
.item-actions { display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.icon-chip, .status-chip {
  display:inline-flex; align-items:center; gap:4px; border-radius:999px; padding:6px 9px; font-size:.74rem; font-weight:800; border:1px solid var(--line);
}
.status-open { color:#9ff3db; background: rgba(32,211,161,0.13); }
.status-finished { color:#c9ceff; background: rgba(95,108,255,0.12); }
.status-favorite { color:#ffe17f; background: rgba(244,201,93,0.14); }
.status-active { color:#9ff3db; background: rgba(32,211,161,0.13); }
.status-inactive { color:#ffc8d1; background: rgba(239,92,121,0.12); }
.ghost-small, .danger-small {
  background: var(--panel); color: var(--text); border:1px solid var(--line); padding:8px 10px; border-radius: 12px; font-weight:800;
}
.danger-small { color: #ffc8d1; border-color: rgba(239,92,121,0.22); background: rgba(239,92,121,0.1); }
.drawer-backdrop, .modal-backdrop { position:fixed; inset:0; background: rgba(4,8,16,0.54); z-index:39; }
.drawer {
  position:fixed; inset:0 auto 0 0; width:min(82vw, 340px); background: #0d1425; border-right:1px solid var(--line); z-index:40; box-shadow: var(--shadow); padding: 12px; display:grid; grid-template-rows:auto auto 1fr auto; gap:12px;
}
body.light .drawer { background:#f8fbff; }
.drawer-head { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.drawer-brand { display:flex; align-items:center; gap:10px; }
.drawer-title { font-weight:900; }
.drawer-search {
  display:flex; align-items:center; gap:8px; padding: 12px 14px; border-radius: 18px; background: var(--chip); border:1px solid var(--line);
}
.drawer-search input { flex:1; background:transparent; border:0; outline:0; color:var(--text); }
.drawer-nav { display:grid; gap:4px; align-content:start; }
.drawer-link {
  display:flex; align-items:center; gap:12px; padding: 13px 12px; border-radius: 16px; background: transparent; color: var(--text); text-align:left;
}
.drawer-link:hover, .drawer-link.active { background: var(--chip); }
.drawer-footer { display:grid; gap:8px; }
.setting-btn {
  height:42px; border-radius: 14px; background: var(--panel); color: var(--text); border:1px solid var(--line); font-weight:800;
}
.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 24px));
  height: min(880px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  z-index: 41;
  padding: 12px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  overflow: hidden;
}

.modal-head { display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; background:inherit; padding-bottom:4px; z-index:2; }
.modal-head h3 { margin:0; font-size:.98rem; }
.compact-form { display:grid; gap:9px; }
.compact-form .field-grid { display:grid; grid-template-columns: 1fr; gap:10px; }
.compact-form label { display:grid; gap:5px; font-size:.78rem; font-weight:700; }
.compact-form input, .compact-form select {
  width:100%; height:40px; border-radius: 12px; border:1px solid var(--line-2); background: var(--bg-2); color: var(--text); padding: 0 11px; outline:none;
}
.compact-form .checkbox-row { display:flex; align-items:center; gap:10px; }
.compact-form .form-actions { display:flex; gap:8px; justify-content:flex-end; }
.bottom-nav {
  position: fixed; left:0; right:0; bottom:0; z-index:35; display:grid; grid-template-columns: repeat(5,1fr); gap:6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(8,12,22,0.92); backdrop-filter: blur(14px); border-top:1px solid var(--line);
}
body.light .bottom-nav { background: rgba(248,250,255,0.94); }
.bottom-btn {
  background: transparent; color: var(--muted); border-radius: 14px; padding: 8px 4px; display:grid; place-items:center; gap:3px;
}
.bottom-btn span { font-size: 1rem; }
.bottom-btn em { font-style: normal; font-size:.72rem; font-weight:800; }
.bottom-btn.active { color: var(--text); background: rgba(255,255,255,0.06); }
@media (max-width: 760px) {
  .two-col, .compact-form .field-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  body { font-size: 15px; }
  .app-shell { padding: calc(8px + env(safe-area-inset-top)) 10px calc(88px + env(safe-area-inset-bottom)); }
  .mobile-header { padding: 8px 10px; border-radius:16px; }
  .brand-name { font-size: .98rem; }
  .hero-compact h1 { font-size: 1.16rem; }
  .item-title { font-size:.9rem; }
  .compact-head h2, .card-head h3 { font-size: .98rem; }
  .primary-action { padding: 9px 11px; font-size: .84rem; }
  .role-pills { gap:6px; }
  .role-pill, .tab-btn { padding: 8px 11px; font-size:.8rem; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .stat-card { padding: 9px 10px; }
  .stat-label { font-size:.7rem; }
  .stat-value.tiny { font-size:.95rem; }
}


body.modal-open{overflow:hidden;}
.mobile-header.slim{padding:8px 10px;border-radius:16px;}
.brand-inline.compact{gap:8px;min-width:0;}
.hero-strip{padding:12px 14px;display:grid;gap:10px;}
.hero-strip h1{margin:4px 0 0;font-size:1.12rem;line-height:1.1;}
.role-strip{display:flex;gap:6px;overflow:auto;padding-bottom:2px;}
.role-mini{padding:7px 10px;border-radius:999px;background:var(--chip);white-space:nowrap;font-size:.78rem;font-weight:800;color:var(--muted);}
.role-mini.active{background:rgba(95,108,255,.16);color:var(--text);border:1px solid rgba(95,108,255,.25);}
.stats-inline{padding:10px 12px;display:flex;gap:12px;align-items:center;overflow:auto;}
.mini-stat{display:flex;flex-direction:column;gap:3px;min-width:88px;}
.mini-stat.wide{min-width:132px;}
.mini-label{font-size:.72rem;color:var(--muted);line-height:1.15;}
.mini-stat strong{font-size:.95rem;line-height:1.1;font-weight:900;}
.section-tabs{display:none !important;}
.content.compact-gap{gap:10px;}
.compact-head.sticky-tools{position:sticky;top:0;z-index:4;background:linear-gradient(180deg,var(--bg) 70%, rgba(0,0,0,0));padding-bottom:6px;}
.primary-action.small{padding:8px 10px;font-size:.8rem;border-radius:12px;}
.item-row{padding:9px 10px;border-radius:13px;}
.item-title{font-size:.88rem;}
.item-meta{font-size:.72rem;}
.compact-card,.hero-strip,.modal{border-radius:20px;}
.list-card{padding:10px;}
.bottom-nav{gap:4px;padding:6px 8px calc(8px + env(safe-area-inset-bottom));}
.bottom-btn{padding:7px 2px;border-radius:12px;gap:2px;}
.bottom-btn em{font-size:.68rem;}
.modal{inset:calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom)) 8px;padding:12px 12px 14px;display:grid;grid-template-rows:auto 1fr;overflow:hidden;}
.modal-head{position:sticky;top:0;padding-bottom:8px;background:inherit;border-bottom:1px solid var(--line);margin-bottom:4px;}
.compact-form{overflow:auto;padding-right:2px;padding-top:2px; min-height:0; overscroll-behavior:contain;}
.compact-form .field-grid{gap:8px;}
.compact-form label{gap:4px;font-size:.76rem;}
.compact-form input,.compact-form select{height:42px;border-radius:12px;padding:0 12px;}
.compact-form .form-actions{position:sticky;bottom:0;background:linear-gradient(180deg, rgba(10,16,32,0), rgba(10,16,32,.96) 28%);padding-top:10px;margin-top:8px;}
body.light .compact-form .form-actions{background:linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.97) 28%);}
@media (max-width:540px){
  .hero-strip{padding:11px 12px;}
  .hero-strip h1{font-size:1.04rem;}
  .hero-kicker{font-size:.7rem;padding:4px 8px;}
  .stats-inline{padding:9px 10px;gap:10px;}
  .mini-stat{min-width:74px;}
  .mini-stat.wide{min-width:116px;}
  .mini-stat strong{font-size:.9rem;}
  .section-head h2{font-size:.94rem;}
  .item-actions{gap:6px;}
  .ghost-small,.danger-small{padding:7px 9px;font-size:.74rem;border-radius:11px;}
  .drawer{width:min(86vw,320px);}
}


.search-hint{margin-top:6px;color:var(--muted);font-size:.72rem;line-height:1.25;}
.item-main.with-index{display:grid;grid-template-columns:30px 1fr;gap:10px;align-items:flex-start;}
.item-index{display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:rgba(95,108,255,.14);border:1px solid rgba(95,108,255,.2);font-size:.76rem;font-weight:900;color:var(--text);}
.hidden{display:none !important;}

.top-tight{padding-top:0;}
.top-stats{margin-top:2px;}
.bottom-nav-4{grid-template-columns:repeat(4,1fr);}
.search-hint{padding:7px 2px 0;font-size:.72rem;color:var(--muted);}

.player-row{
  display:grid;
  grid-template-columns:44px 1fr 18px;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  background:var(--chip);
  border:1px solid var(--line);
  cursor:pointer;
}
.player-row:active{transform:scale(.995);}
.player-row:focus-visible{outline:2px solid rgba(95,108,255,.55);outline-offset:2px;}
.player-index{
  width:36px;height:36px;border-radius:999px;display:grid;place-items:center;
  background:rgba(95,108,255,.16);border:1px solid rgba(95,108,255,.25);
  font-weight:900;color:var(--text);
}
.player-main.compact-only{min-width:0;}
.player-main.compact-only .item-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.player-arrow{font-size:1.3rem;color:var(--muted);line-height:1;}

.section-note{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:28px;padding:4px 10px;border-radius:999px;
  background:rgba(95,108,255,.12);color:var(--text);font-weight:800;font-size:.76rem;width:max-content;
}
.section-note.sub-note{margin-top:4px;}
.form-block{display:grid;gap:10px;}
.date-stack{display:grid;gap:10px;}
.date-stack small{color:var(--muted);font-size:.72rem;line-height:1.2;}
.single-mobile{grid-template-columns:repeat(2,1fr);}
.expand-btn{
  width:100%; min-height:42px; border-radius:14px; border:1px solid var(--line);
  background:var(--panel); color:var(--text); font-weight:800; margin-top:2px;
}
.optional-wrap{display:none;gap:10px;padding-top:4px;}
.optional-wrap.active{display:grid;}
.split-actions{display:flex;justify-content:space-between;align-items:center;gap:8px;}
.actions-right{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;}

@media (max-width:640px){
  .single-mobile{grid-template-columns:1fr;}
  .player-row{grid-template-columns:40px 1fr 14px;padding:9px 10px;}
  .player-index{width:32px;height:32px;font-size:.9rem;}
  .split-actions{align-items:stretch;flex-direction:column;}
  .split-actions > div{width:100%;}
  .actions-right{width:100%;}
  .actions-right .ghost-small,.actions-right .primary-action,.split-actions .danger-small{width:100%;justify-content:center;text-align:center;}
}

.section-toolbar{
  padding:8px 10px;
  position:sticky;
  top:0;
  z-index:4;
}
.toolbar-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:center;
}
.main-search{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:0 12px;
  border-radius:14px;
  background:var(--chip);
  border:1px solid var(--line);
}
.main-search input{
  flex:1;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
}
.toolbar-add{
  min-width:98px;
  white-space:nowrap;
  padding:9px 12px;
}
.home-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px;
}
.home-card{
  text-align:left;
  padding:14px 12px;
  border-radius:18px;
  border:1px solid var(--line);
  background:var(--chip);
  color:var(--text);
  display:grid;
  gap:6px;
}
.home-card-icon{font-size:1.2rem;}
.home-card strong{font-size:.92rem;line-height:1.2;}
.home-card small{color:var(--muted);font-size:.76rem;}
.player-main.compact-only .item-meta{margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

@media (max-width:640px){
  .toolbar-add{min-width:84px;padding:9px 10px;font-size:.78rem;}
  .home-grid{grid-template-columns:1fr 1fr;gap:8px;}
  .home-card{padding:12px 10px;border-radius:16px;}
}

.kraguj-tabs{display:flex;gap:8px;overflow:auto;padding:2px 0;}
.pill-tab{
  border:1px solid var(--line);background:var(--panel);color:var(--muted);
  padding:9px 12px;border-radius:999px;font-weight:800;white-space:nowrap;cursor:pointer;
}
.pill-tab.active{background:var(--primary);color:#fff;border-color:transparent;}
.kraguj-panel{display:none;gap:10px;}
.kraguj-panel.active{display:grid;}
.kraguj-tools{padding:8px 10px;}
.participant-row{
  display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;
  padding:10px 11px;border-radius:14px;background:var(--chip);border:1px solid var(--line);
}
.participant-selected{border-color:rgba(95,108,255,.26);}
.participant-main{min-width:0;display:grid;gap:2px;}
.mini-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;}
.muted-inline{color:var(--muted);font-size:.76rem;}
.day-summary-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;}
.summary-pill{padding:10px 11px;border-radius:14px;background:var(--chip);border:1px solid var(--line);display:grid;gap:4px;}
.summary-pill strong{font-size:.95rem;line-height:1.1;}
.summary-pill span{font-size:.72rem;color:var(--muted);line-height:1.2;}
.top-gap-small{margin-top:10px;}
.chip-list{display:flex;flex-wrap:wrap;gap:8px;}
.player-chip{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:var(--chip);border:1px solid var(--line);font-size:.76rem;font-weight:700;}
.match-row{display:grid;gap:6px;padding:10px 11px;border-radius:14px;background:var(--chip);border:1px solid var(--line);cursor:pointer;}
.match-row:active{transform:scale(.995);}
.match-line-top,.match-line-bottom{display:flex;justify-content:space-between;gap:8px;align-items:center;}
.match-line-mid{font-size:.86rem;line-height:1.25;font-weight:800;display:grid;gap:2px;}
.match-line-mid span{font-size:.72rem;color:var(--muted);font-weight:700;}
.match-line-bottom{color:var(--muted);font-size:.74rem;}
.check-list{display:grid;gap:8px;max-height:46dvh;overflow:auto;padding-right:2px;}
.check-item{display:grid;grid-template-columns:auto 1fr;gap:8px 10px;align-items:center;padding:9px 10px;border-radius:12px;background:var(--chip);border:1px solid var(--line);}
.check-item input{grid-row:1 / span 2;width:18px;height:18px;accent-color:var(--primary);}
.check-item span{font-weight:800;font-size:.84rem;line-height:1.15;}
.check-item small{grid-column:2;color:var(--muted);font-size:.72rem;line-height:1.2;}
.match-detail-card{display:grid;gap:6px;padding:10px 11px;border-radius:14px;background:var(--chip);border:1px solid var(--line);}
.judge-board{display:grid;gap:12px;padding:12px;border-radius:16px;background:var(--chip);border:1px solid var(--line);}
.judge-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.judge-team{display:grid;gap:10px;padding:10px;border-radius:14px;background:var(--panel);border:1px solid var(--line);}
.judge-label{font-size:.78rem;font-weight:800;line-height:1.25;}
.judge-score{font-size:2rem;font-weight:900;line-height:1;text-align:center;}
.judge-controls{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;}
.judge-timer-wrap{display:grid;gap:8px;justify-items:center;padding-top:4px;}
.judge-timer{font-size:2rem;font-weight:900;line-height:1;}
.stand-row{display:grid;grid-template-columns:32px 1fr;gap:10px;align-items:start;padding:10px 11px;border-radius:14px;background:var(--chip);border:1px solid var(--line);}
.stand-rank{width:28px;height:28px;border-radius:999px;display:grid;place-items:center;background:rgba(95,108,255,.16);border:1px solid rgba(95,108,255,.25);font-weight:900;}
.stand-main{min-width:0;display:grid;gap:3px;}
.tiny-meta{color:var(--muted);font-size:.72rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.stand-stats{grid-column:2;display:flex;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:.74rem;}
.stand-stats strong{color:var(--text);}
@media (max-width:640px){
  .day-summary-grid{grid-template-columns:1fr 1fr;}
  .participant-row{grid-template-columns:1fr;}
  .mini-actions{justify-content:stretch;}
  .mini-actions .ghost-small,.mini-actions .danger-small{width:100%;}
  .judge-row{grid-template-columns:1fr;}
  .judge-score{font-size:1.75rem;}
  .match-line-mid{font-size:.82rem;}
  .home-grid{grid-template-columns:1fr 1fr;}
}

/* v24 sofascore-like polish */
:root {
  --sofa-surface: #0f1727;
  --sofa-surface-2: #131d31;
  --sofa-surface-3: #17233b;
  --sofa-accent: #7a73ff;
  --sofa-accent-2: #5f8cff;
}
body {
  background:
    linear-gradient(180deg, #0a101a 0%, #0d1422 26%, #0a111d 100%);
}
.mobile-header {
  background: linear-gradient(180deg, rgba(22,34,58,.96), rgba(17,25,44,.96));
  border-color: rgba(255,255,255,.06);
}
.hero-compact, .compact-card, .modal {
  background: linear-gradient(180deg, rgba(16,24,39,.98), rgba(13,21,35,.98));
}
.primary-action {
  background: linear-gradient(135deg, var(--sofa-accent), var(--sofa-accent-2));
  box-shadow: 0 8px 18px rgba(122,115,255,.24);
}
.pill-tab.active,
.bottom-btn.active {
  background: linear-gradient(135deg, rgba(122,115,255,.92), rgba(95,140,255,.88));
  color:#fff;
}
.score-shell {
  display:grid;
  gap:10px;
}
.score-hero {
  display:grid;
  gap:10px;
  padding:14px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(20,30,49,.98), rgba(13,20,33,.98));
  box-shadow: var(--shadow);
}
.score-badge {
  width:max-content;
  padding:5px 10px;
  border-radius:999px;
  background: rgba(122,115,255,.18);
  color:#d6d3ff;
  font-size:.72rem;
  font-weight:800;
}
.score-title-wrap h1 {
  margin:0;
  font-size:1.38rem;
  line-height:1.06;
}
.score-title-wrap p {
  margin:5px 0 0;
  color:var(--muted);
  font-size:.88rem;
  line-height:1.35;
}
.score-day-pill {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:16px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
}
.score-day-pill span,
.score-card small {
  color:var(--muted);
  font-size:.72rem;
  font-weight:700;
}
.score-day-pill strong,
.score-card strong {
  font-size:1rem;
  line-height:1;
  font-weight:900;
}
.score-summary {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
}
.score-card {
  padding:11px 12px;
  border-radius:18px;
  background: linear-gradient(180deg, rgba(18,29,48,.98), rgba(14,22,37,.98));
  border:1px solid rgba(255,255,255,.06);
  display:grid;
  gap:6px;
}
.score-tabs {
  margin-top:2px;
}
.score-board {
  border-color: rgba(255,255,255,.06);
}
.board-head {
  align-items:flex-start;
}
.board-head h3 {
  margin:0;
  font-size:1rem;
}
.participant-row,
.item-row,
.match-row,
.summary-pill,
.check-item,
.match-detail-card,
.judge-board,
.stand-line,
.stand-head {
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.06);
}
.participant-row {
  padding:10px 11px;
}
.participant-selected {
  border-color: rgba(122,115,255,.3);
  box-shadow: inset 0 0 0 1px rgba(122,115,255,.08);
}
.match-row {
  grid-template-columns:60px 1fr auto;
  align-items:center;
  gap:10px;
}
.match-side {
  display:grid;
  gap:2px;
  color:var(--muted);
  font-size:.7rem;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.match-side strong {
  font-size:.76rem;
  color:var(--text);
}
.match-center {
  display:grid;
  gap:4px;
  min-width:0;
}
.match-team {
  font-size:.83rem;
  font-weight:800;
  line-height:1.18;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.match-team.away {
  color:#c8d1e9;
}
.match-scorebox {
  display:grid;
  justify-items:end;
  gap:3px;
  min-width:60px;
}
.match-scorebox strong {
  font-size:.95rem;
  line-height:1;
}
.match-scorebox small {
  color:var(--muted);
  font-size:.68rem;
}
.stand-table {
  display:grid;
  gap:8px;
}
.stand-head,
.stand-line {
  display:grid;
  grid-template-columns:28px minmax(120px,1fr) 28px 34px 34px 42px 38px;
  gap:8px;
  align-items:center;
  padding:10px 11px;
  border-radius:16px;
}
.stand-head {
  color:var(--muted);
  font-size:.68rem;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:800;
}
.stand-line {
  font-size:.8rem;
}
.stand-pos {
  font-weight:900;
}
.stand-player {
  display:grid;
  min-width:0;
}
.stand-player strong,
.stand-player small {
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.stand-player strong {
  font-size:.84rem;
}
.stand-player small {
  color:var(--muted);
  font-size:.68rem;
}
.stand-points {
  font-weight:900;
  color:#fff;
}
.participant-picker-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.picker-search {
  margin-top:2px;
}
.picker-list {
  display:grid;
  gap:8px;
  max-height:52dvh;
  overflow:auto;
  padding-right:2px;
}
.picker-row {
  grid-template-columns:1fr auto;
}
.player-chip {
  background: rgba(122,115,255,.12);
  border-color: rgba(122,115,255,.18);
}
.summary-pill strong {
  font-size:.95rem;
}
.day-summary-grid.score-summary-grid {
  grid-template-columns:repeat(4,1fr);
}
@media (max-width:640px) {
  .score-summary,
  .day-summary-grid.score-summary-grid {
    grid-template-columns:repeat(2,1fr);
  }
  .match-row {
    grid-template-columns:52px 1fr auto;
    padding:9px 10px;
  }
  .stand-head,
  .stand-line {
    grid-template-columns:24px minmax(110px,1fr) 24px 30px 30px 38px 34px;
    gap:6px;
    padding:9px 8px;
    font-size:.74rem;
  }
  .stand-head {
    font-size:.62rem;
  }
  .score-title-wrap h1 {
    font-size:1.22rem;
  }
}

/* v25 schedule polish */
.compact-score-hero {
  padding: 12px 13px;
  gap: 8px;
}
.compact-summary-4 .score-card {
  padding: 10px 11px;
}
.score-card.success,
.summary-pill.success {
  border-color: rgba(44, 195, 126, 0.26);
  background: linear-gradient(180deg, rgba(24, 52, 39, 0.98), rgba(15, 35, 27, 0.98));
}
.score-card.success strong,
.summary-pill.success strong,
.schedule-count-line.ok {
  color: #73f0b1;
}
.compact-board-head {
  margin-bottom: 8px;
}
.wrap-mobile-head {
  align-items: flex-start;
}
.compact-actions-wrap {
  gap: 6px;
}
.day-micro-grid {
  margin-bottom: 8px;
}
.compact-head-row {
  align-items: flex-start;
  flex-wrap: wrap;
}
.schedule-list {
  gap: 7px;
}
.round-block {
  display: grid;
  gap: 8px;
}
.round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 0;
}
.round-head strong {
  display: block;
  font-size: .84rem;
}
.round-head small {
  color: var(--muted);
  font-size: .68rem;
}
.round-count {
  min-width: 44px;
  text-align: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}
.round-count.done {
  color: #73f0b1;
  border-color: rgba(44, 195, 126, 0.26);
  background: rgba(27, 86, 56, 0.22);
}
.match-row.finished {
  border-color: rgba(44, 195, 126, 0.22);
  background: linear-gradient(180deg, rgba(21, 50, 37, 0.92), rgba(15, 34, 27, 0.94));
}
.match-state {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.08);
}
.match-state.is-finished {
  color: #73f0b1;
  border-color: rgba(44, 195, 126, 0.24);
  background: rgba(27, 86, 56, 0.22);
}
.match-state.is-scheduled {
  color: #c9d4f3;
  background: rgba(255,255,255,.05);
}
.match-result-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.04);
}
.match-result-banner.finished {
  border-color: rgba(44, 195, 126, 0.24);
  background: linear-gradient(180deg, rgba(21, 50, 37, 0.92), rgba(15, 34, 27, 0.94));
}
.match-result-banner strong {
  display: block;
  font-size: .86rem;
  line-height: 1.2;
}
.match-result-banner small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .72rem;
}
.match-result-badge {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 74px;
}
.match-result-badge span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
}
.match-result-badge strong {
  font-size: 1rem;
  line-height: 1;
}
.match-result-badge.finished span,
.match-result-badge.finished strong {
  color: #73f0b1;
}
@media (max-width: 640px) {
  .compact-actions-wrap {
    width: 100%;
    justify-content: stretch;
  }
  .compact-actions-wrap .ghost-small,
  .compact-actions-wrap .primary-action {
    flex: 1 1 100%;
  }
  .match-result-banner {
    display: grid;
  }
}

/* v26 clean kraguj */
.modal {
  background: linear-gradient(180deg, rgba(12,18,30,.995), rgba(9,14,24,.995));
}
.compact-form {
  padding-top: 6px;
}
.slim-card {
  padding: 10px;
  border-radius: 18px;
}
.kraguj-clean-head {
  display: grid;
  gap: 10px;
}
.clean-head-top {
  display: grid;
  gap: 10px;
}
.clean-head-top h1 {
  margin: 6px 0 0;
  font-size: 1.18rem;
  line-height: 1.08;
}
.clean-head-top p {
  margin: 4px 0 0;
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.28;
}
.active-day-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.06);
}
.active-day-chip small {
  color: var(--muted);
  font-size: .68rem;
}
.active-day-chip strong {
  font-size: .98rem;
}
.clean-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.slim-stat {
  padding: 9px 10px;
  border-radius: 14px;
  gap: 4px;
}
.slim-tabs {
  margin-top: 0;
}
.compact-simple-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.compact-simple-head h3 {
  margin: 0;
  font-size: 1rem;
}
.compact-participant-list,
.compact-history-list {
  gap: 7px;
}
.compact-mini-actions {
  justify-content: flex-end;
}
.icon-danger-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 99, 132, .26);
  background: rgba(95, 20, 34, .28);
  color: #ffb2c2;
  font-weight: 900;
  cursor: pointer;
}
.empty-clean-state {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.08);
}
.empty-clean-state strong {
  font-size: .9rem;
}
.empty-clean-state small {
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.35;
}
.compact-chip-list {
  gap: 6px;
}
.compact-chip-list .player-chip {
  padding: 6px 9px;
  font-size: .72rem;
}
.clean-day-grid {
  grid-template-columns: repeat(4, 1fr);
}
.picker-header-clean {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.picker-title {
  margin-top: 6px;
  font-size: .95rem;
  font-weight: 800;
}
.compact-picker-search {
  margin-bottom: 8px;
}
.compact-picker-list {
  max-height: calc(100dvh - 230px);
}
.cleaner-picker-row,
.participant-row {
  padding: 9px 10px;
}
.match-row.finished {
  border-color: rgba(44,195,126,.28);
  background: linear-gradient(180deg, rgba(18, 46, 34, .96), rgba(12, 29, 22, .96));
}
.match-state.is-finished {
  color: #78efb5;
}
.match-state.is-scheduled {
  color: var(--muted);
}
@media (max-width: 640px) {
  .clean-stats-grid,
  .clean-day-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .compact-simple-head,
  .picker-header-clean {
    flex-direction: column;
    align-items: stretch;
  }
  .compact-mini-actions {
    width: auto;
  }
  .participant-row {
    grid-template-columns: 1fr auto;
  }
  .participant-row .mini-actions .ghost-small,
  .participant-row .mini-actions .danger-small,
  .participant-row .mini-actions .icon-danger-btn,
  .cleaner-picker-row .mini-actions .primary-action {
    width: auto;
  }
  .participant-row .mini-actions {
    justify-content: flex-end;
  }
}


/* v27 tighter kraguj */
.kraguj-compact-shell{display:grid;gap:10px;}
.kraguj-mini-head{display:grid;gap:8px;padding:10px 11px;}
.kraguj-mini-top{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.title-stack{display:grid;gap:4px;min-width:0;}
.title-stack h1{margin:0;font-size:1.08rem;line-height:1.05;}
.micro-info-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
.micro-info-chip{display:grid;gap:4px;padding:9px 10px;border-radius:14px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.06);}
.micro-info-chip span{font-size:.66rem;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.03em;}
.micro-info-chip strong{font-size:.98rem;line-height:1;font-weight:900;}
.micro-info-chip strong.ok{color:#73f0b1;}
.tight-head{margin-bottom:6px;}
.compact-player-row{padding:8px 9px;border-radius:13px;}
.compact-player-row .item-title{font-size:.92rem;line-height:1.12;}
.compact-player-row .item-meta{font-size:.74rem;line-height:1.18;color:var(--muted);}
.compact-player-row .icon-danger-btn{width:30px;height:30px;border-radius:9px;}
.slim-picker-list{max-height:calc(100dvh - 220px);}
.picker-stack-clean{display:grid;gap:8px;}
.compact-picker-head{margin-bottom:0;}
.split-mini-actions{display:flex;gap:6px;flex-wrap:wrap;}
.day-info-row{margin-bottom:8px;}
.schedule-list .match-row{padding:8px 9px;border-radius:13px;}
.schedule-list .match-team{font-size:.79rem;}
.schedule-list .match-scorebox strong{font-size:.9rem;}
.stand-table{gap:6px;}
.stand-head,.stand-line{padding:8px 9px;border-radius:14px;}
.compact-history-list .participant-row{cursor:pointer;}
@media (max-width:640px){
  .kraguj-mini-top{align-items:flex-start;flex-direction:column;}
  .micro-info-row{grid-template-columns:repeat(2,1fr);}
  .split-mini-actions{width:100%;}
  .split-mini-actions .ghost-small,.split-mini-actions .primary-action{flex:1 1 calc(50% - 4px);}
}

/* v28 day flow */
.kraguj-v28-shell{gap:12px;}
.kraguj-main-head .muted-inline{font-size:.8rem;line-height:1.2;}
.micro-info-grid-tight{grid-template-columns:repeat(4,minmax(0,1fr));}
.participant-inline-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;}
.participant-inline-list .player-chip{padding:5px 9px;font-size:.74rem;}
.schedule-list .match-row{grid-template-columns:72px 1fr 72px;align-items:center;}
.schedule-list .match-side strong{font-size:.76rem;}
.schedule-list .match-center{gap:3px;}
.schedule-list .match-scorebox{min-width:0;text-align:right;}
.schedule-list .match-scorebox small{font-size:.68rem;display:block;white-space:nowrap;}
.finish-day-btn{min-width:auto;}
.compact-participant-list .participant-row{padding:8px 10px;}
.compact-participant-list .item-title{font-size:.92rem;}
.compact-participant-list .item-meta{font-size:.75rem;}
@media (max-width:640px){
  .micro-info-grid-tight{grid-template-columns:repeat(2,minmax(0,1fr));}
  .schedule-list .match-row{grid-template-columns:62px 1fr 64px;}
  .schedule-list .match-team{font-size:.76rem;}
}

/* v30 compact workflow overrides */
.top-summary-card{padding:14px 14px 12px;}
.kraguj-shell-compact{display:grid;gap:10px;}
.tighter-row{padding:10px 12px;}
.compact-round-head{padding-bottom:6px;margin-bottom:6px;border-bottom:1px solid rgba(255,255,255,.06);}
.compact-schedule-list{gap:6px;}
.compact-match-row{grid-template-columns:72px 1fr 62px;padding:8px 10px;border-radius:16px;min-height:auto;}
.compact-match-side small{display:block;color:var(--muted);font-size:.7rem;margin-top:2px;}
.compact-scorebox{align-items:flex-end;}
.match-finished-row{border-color:rgba(38,170,84,.35);box-shadow:inset 0 0 0 1px rgba(38,170,84,.18);}
.top-gap-small{margin-top:8px;}
.item-meta-strong{font-weight:800;color:var(--text);}
.player-chip{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#openDayBtn[disabled]{opacity:.45;filter:grayscale(.1);cursor:not-allowed;}
body.light .match-finished-row{border-color:rgba(38,170,84,.25);}

.home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
@media (min-width: 761px){
  .compact-card,.hero-compact{padding-left:12px;padding-right:12px;}
  .participant-row,.item-row,.compact-match-row{padding:9px 10px;}
  .primary-action.small,.ghost-small,.danger-small{font-size:.8rem;padding:8px 10px;}
  .kraguj-shell-compact,.compact-list,.full-list{max-width:620px;margin:0 auto;}
}


/* v32 visual refresh */
.app-shell{max-width:560px;padding:calc(10px + env(safe-area-inset-top)) 10px calc(92px + env(safe-area-inset-bottom));}
.content{max-width:560px;}
.mobile-header{padding:9px 10px;border-radius:18px;}
.brand-inline.compact{max-width:calc(100% - 108px);} 
.header-actions{flex-shrink:0;}
.pickle-icon{position:relative;display:block;width:34px;height:34px;border-radius:50%;background:radial-gradient(circle at 30% 30%, #fff7b0 0 15%, #f6eb74 16% 40%, #d9d043 41% 100%);box-shadow:inset -5px -6px 12px rgba(0,0,0,.14),0 6px 16px rgba(14,20,36,.28);border:2px solid rgba(255,255,255,.18)}
.pickle-icon::before,.pickle-icon::after{content:"";position:absolute;border-radius:50%;background:rgba(14,20,36,.22)}
.pickle-icon::before{width:6px;height:6px;left:8px;top:9px;box-shadow:11px 1px 0 rgba(14,20,36,.22),6px 10px 0 rgba(14,20,36,.22),15px 11px 0 rgba(14,20,36,.22)}
.pickle-icon::after{width:8px;height:8px;right:6px;bottom:6px;opacity:.28}
.pickle-icon.small{width:28px;height:28px}
.pickle-icon.small::before{transform:scale(.8);transform-origin:top left}
.header-pickle{flex-shrink:0}
.home-stage{padding:14px;display:grid;gap:12px}
.home-kicker{width:max-content}
.home-brand-row{display:grid;grid-template-columns:54px 1fr;gap:12px;align-items:center}
.hero-pickle{width:52px;height:52px}
.hero-pickle::before{left:12px;top:13px;box-shadow:15px 1px 0 rgba(14,20,36,.22),7px 14px 0 rgba(14,20,36,.22),20px 14px 0 rgba(14,20,36,.22)}
.home-brand-copy h1{margin:0;font-size:1.28rem;line-height:1.04}
.home-brand-copy p{margin:5px 0 0;color:var(--muted);font-size:.84rem;line-height:1.35}
.hero-stats-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.hero-stat{padding:11px 10px;border-radius:16px;background:rgba(255,255,255,.04);border:1px solid var(--line);display:grid;gap:6px}
.hero-stat span{font-size:.72rem;color:var(--muted);font-weight:700}
.hero-stat strong{font-size:1.02rem;line-height:1;font-weight:900}
.home-primary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-radius:18px;border:1px solid rgba(122,115,255,.18);background:linear-gradient(135deg,rgba(122,115,255,.18),rgba(95,140,255,.14));color:var(--text)}
.home-primary strong{display:block;font-size:.96rem;line-height:1.1}
.home-primary small{display:block;margin-top:4px;color:#d6ddff;font-size:.74rem}
.home-primary span{font-size:1.2rem;font-weight:900}
.home-stack-nav{display:grid;gap:8px}
.home-list-card{display:grid;grid-template-columns:42px 1fr 14px;gap:10px;align-items:center;padding:11px 12px;border-radius:18px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--text);text-align:left}
.home-list-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:rgba(122,115,255,.12);font-size:1rem}
.home-list-copy{display:grid;gap:3px;min-width:0}
.home-list-copy strong{font-size:.92rem;line-height:1.15}
.home-list-copy small{color:var(--muted);font-size:.74rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-list-arrow{font-size:1.1rem;color:var(--muted)}
.section-toolbar,.compact-card,.hero-compact,.home-stage,.home-list-card,.player-row,.participant-row,.item-row{max-width:100%;}
.toolbar-row{grid-template-columns:minmax(0,1fr) auto}
.main-search{min-width:0}
.player-row{grid-template-columns:38px minmax(0,1fr) 12px;padding:9px 10px;border-radius:16px}
.player-index{width:30px;height:30px;font-size:.82rem}
.player-main.compact-only .item-title{font-size:.9rem}
.player-main.compact-only .item-meta{font-size:.73rem}
.home-card{display:none}
@media (max-width:540px){
  .app-shell{padding:calc(8px + env(safe-area-inset-top)) 8px calc(88px + env(safe-area-inset-bottom));}
  .mobile-header{padding:8px 9px}
  .icon-btn,.lang-btn{width:38px;height:38px;min-width:38px}
  .lang-btn{padding:0 10px}
  .home-stage{padding:12px}
  .home-brand-row{grid-template-columns:46px 1fr;gap:10px}
  .hero-pickle{width:44px;height:44px}
  .home-brand-copy h1{font-size:1.16rem}
  .home-brand-copy p{font-size:.8rem}
  .hero-stats-strip{gap:6px}
  .hero-stat{padding:9px 8px;border-radius:14px}
  .home-list-card{grid-template-columns:38px minmax(0,1fr) 12px;padding:10px 11px}
  .home-list-icon{width:34px;height:34px;border-radius:10px}
  .toolbar-add{min-width:92px}
}


/* v33 responsive desktop + overflow fix */
html, body {
  width: 100%;
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
}
.app-shell,
.content,
#kragujView,
.section-panel,
.section-toolbar,
.compact-card,
.home-stage,
.home-list-card,
.player-row,
.participant-row,
.item-row,
.match-row,
.match-detail-card,
.stand-head,
.stand-line,
.modal,
.main-search,
.toolbar-row {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.item-main,
.participant-main,
.player-main,
.match-center,
.stand-player,
.home-list-copy,
.title-stack,
.home-brand-copy,
.brand-inline,
.brand-inline.compact,
.main-search input,
.drawer-search input,
.compact-head,
.inline-head,
.compact-simple-head,
.compact-actions-wrap,
.item-actions,
.mini-actions,
.split-actions,
.actions-right {
  min-width: 0;
}
.compact-head,
.inline-head,
.compact-simple-head {
  flex-wrap: wrap;
}
.compact-actions-wrap,
.item-actions,
.mini-actions,
.actions-right {
  max-width: 100%;
  flex-wrap: wrap;
}
.primary-action,
.primary-action.small,
.ghost-small,
.danger-small,
.icon-danger-btn,
.toolbar-add,
.pill-tab {
  max-width: 100%;
}
.participant-inline-list,
.chip-list,
.compact-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.player-chip,
.role-pill,
.role-mini,
.hero-kicker,
.score-badge,
.round-count,
.section-note {
  max-width: 100%;
}
.match-team,
.item-title,
.item-meta,
.stand-player strong,
.stand-player small,
.home-list-copy small,
.home-brand-copy p,
.brand-subname {
  overflow-wrap: anywhere;
}
.player-row,
.participant-row,
.item-row,
.match-row,
.check-item,
.summary-pill,
.micro-info-chip,
.score-card,
.home-list-card,
.home-primary {
  overflow: hidden;
}

@media (max-width: 640px) {
  .app-shell {
    max-width: 100%;
    padding-left: 8px;
    padding-right: 8px;
  }
  .content {
    max-width: 100%;
  }
  .toolbar-row {
    grid-template-columns: minmax(0,1fr) auto;
  }
  .toolbar-add {
    min-width: 88px;
    padding: 9px 10px;
    font-size: .78rem;
  }
  .compact-simple-head,
  .inline-head {
    align-items: stretch;
  }
  .compact-actions-wrap,
  .item-actions,
  .mini-actions,
  .actions-right {
    width: 100%;
    justify-content: flex-start;
  }
  .participant-row,
  .item-row {
    grid-template-columns: minmax(0,1fr);
  }
  .participant-row .mini-actions,
  .item-row .item-actions {
    width: 100%;
  }
  .participant-row .mini-actions > *,
  .item-row .item-actions > * {
    flex: 1 1 auto;
  }
  .compact-card,
  .home-stage,
  .home-list-card,
  .section-toolbar {
    border-radius: 18px;
  }
}

@media (min-width: 961px) {
  body {
    font-size: 17px;
  }
  .app-shell {
    max-width: 1280px;
    padding: 20px 24px 120px;
  }
  .content {
    max-width: none;
    gap: 16px;
  }
  .mobile-header {
    padding: 14px 16px;
    border-radius: 24px;
  }
  .brand-inline.compact {
    max-width: none;
    flex: 1 1 auto;
  }
  .brand-name {
    font-size: 1.24rem;
  }
  .brand-subname {
    font-size: .86rem;
  }
  .icon-btn,
  .lang-btn {
    height: 44px;
    min-width: 44px;
  }
  .drawer {
    width: min(360px, 86vw);
  }
  .bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(760px, calc(100vw - 56px));
    border: 1px solid var(--line);
    border-radius: 24px;
    bottom: 18px;
    padding: 8px 10px;
  }
  #section-home.active {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
    gap: 16px;
    align-items: start;
  }
  #section-home .home-stage {
    padding: 20px;
    min-height: 100%;
  }
  #section-home .home-stack-nav {
    display: grid;
    gap: 10px;
  }
  .home-brand-row {
    grid-template-columns: 68px 1fr;
    gap: 16px;
  }
  .hero-pickle {
    width: 64px;
    height: 64px;
  }
  .home-brand-copy h1 {
    font-size: 1.8rem;
  }
  .home-brand-copy p {
    font-size: .98rem;
    max-width: 56ch;
  }
  .hero-stats-strip {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
  .home-primary {
    padding: 16px 18px;
    border-radius: 20px;
  }
  .home-primary strong {
    font-size: 1.08rem;
  }
  .home-primary small {
    font-size: .8rem;
  }
  .home-list-card {
    grid-template-columns: 52px minmax(0,1fr) 18px;
    padding: 14px 15px;
    border-radius: 20px;
  }
  .home-list-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.15rem;
  }
  .home-list-copy strong {
    font-size: 1rem;
  }
  .home-list-copy small {
    font-size: .82rem;
  }
  .section-toolbar {
    padding: 12px 14px;
  }
  .toolbar-row {
    grid-template-columns: minmax(0,1fr) auto;
  }
  .main-search {
    min-height: 46px;
    border-radius: 16px;
  }
  .toolbar-add {
    min-width: 128px;
    padding: 11px 15px;
    border-radius: 16px;
  }
  .kraguj-shell-compact,
  .compact-list,
  .full-list,
  #kragujView {
    max-width: none !important;
    width: 100%;
    margin: 0;
  }
  .top-summary-card {
    padding: 18px;
    border-radius: 24px;
  }
  .tight-head h2,
  .compact-simple-head h3 {
    font-size: 1.18rem;
  }
  .micro-info-grid-tight,
  .micro-info-row {
    grid-template-columns: repeat(4, minmax(0,1fr));
  }
  .micro-info-chip {
    padding: 12px 13px;
    border-radius: 16px;
  }
  .micro-info-chip span {
    font-size: .72rem;
  }
  .micro-info-chip strong {
    font-size: 1.08rem;
  }
  .pill-tab {
    padding: 10px 15px;
    font-size: .88rem;
  }
  .kraguj-panel.active {
    display: grid;
    gap: 16px;
  }
  .compact-card.slim-card {
    padding: 16px;
    border-radius: 24px;
  }
  .compact-participant-list,
  .compact-history-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
  }
  .participant-row,
  .item-row {
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    padding: 12px 13px;
    border-radius: 16px;
  }
  .compact-player-row {
    grid-template-columns: minmax(0,1fr) auto;
  }
  .mini-actions {
    justify-content: flex-end;
  }
  .item-title,
  .match-team {
    font-size: .94rem;
  }
  .item-meta,
  .muted-inline,
  .tiny-meta {
    font-size: .78rem;
  }
  .participant-inline-list {
    gap: 10px;
  }
  .player-chip {
    padding: 8px 11px;
    font-size: .78rem;
  }
  .compact-schedule-list,
  .schedule-list {
    display: grid;
    gap: 8px;
  }
  .compact-match-row,
  .match-row {
    grid-template-columns: 88px minmax(0,1fr) 92px;
    padding: 11px 13px;
    border-radius: 18px;
  }
  .match-team {
    white-space: normal;
  }
  .round-head {
    padding-inline: 4px;
  }
  .match-scorebox strong {
    font-size: 1.08rem;
  }
  .stand-head,
  .stand-line {
    grid-template-columns: 34px minmax(220px,1.8fr) 44px 44px 48px 56px 58px;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 18px;
  }
  .stand-head {
    font-size: .72rem;
  }
  .stand-line {
    font-size: .86rem;
  }
  .stand-player strong {
    font-size: .9rem;
  }
  .stand-player small {
    font-size: .74rem;
  }
  .modal {
    left: 50%;
    right: auto;
    top: 22px;
    bottom: 22px;
    transform: translateX(-50%);
    width: min(860px, calc(100vw - 96px));
    max-height: calc(100dvh - 44px);
    padding: 18px 18px 16px;
    border-radius: 26px;
  }
  .modal-head h3 {
    font-size: 1.12rem;
  }
  .compact-form {
    padding-top: 8px;
  }
  .compact-form .field-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
  }
  .compact-form label {
    font-size: .82rem;
  }
  .compact-form input,
  .compact-form select {
    height: 44px;
    border-radius: 14px;
  }
}


/* v34 desktop big-screen pass + modal centering */
html, body {
  max-width: 100%;
  overflow-x: hidden !important;
}
body.modal-open {
  overflow: hidden !important;
}
#section-players.active,
#section-clubs.active,
#section-referees.active,
#section-tournaments.active,
#section-kraguj.active {
  width: 100%;
}
#playerList,
#clubList,
#refereeList,
#tournamentList,
#kragujView {
  width: 100%;
  max-width: 100%;
}
.modal {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: min(920px, calc(100vw - 18px)) !important;
  max-width: calc(100vw - 18px) !important;
  overflow-x: hidden !important;
}
.compact-form,
.picker-stack-clean,
.compact-picker-list,
.cleaner-picker-row,
.picker-row {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.cleaner-picker-row,
.participant-row,
.item-row,
.player-row,
.match-row,
.compact-match-row,
.stand-head,
.stand-line {
  width: 100%;
  min-width: 0;
}

@media (max-width: 760px) {
  .modal {
    top: calc(8px + env(safe-area-inset-top)) !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    padding: 12px 12px 14px !important;
    border-radius: 22px !important;
  }
  .picker-header-clean,
  .compact-simple-head,
  .inline-head {
    flex-direction: column;
    align-items: stretch;
  }
  .compact-picker-list {
    max-height: calc(100dvh - 250px);
  }
  .cleaner-picker-row,
  .participant-row,
  .item-row {
    grid-template-columns: minmax(0,1fr) !important;
    gap: 10px;
  }
  .cleaner-picker-row .mini-actions,
  .participant-row .mini-actions,
  .item-row .item-actions {
    width: 100%;
    justify-content: stretch;
  }
  .cleaner-picker-row .mini-actions > *,
  .participant-row .mini-actions > *,
  .item-row .item-actions > * {
    flex: 1 1 auto;
  }
}

@media (min-width: 960px) {
  body {
    font-size: 17px;
  }
  .app-shell {
    max-width: min(1500px, calc(100vw - 40px)) !important;
    padding: 18px 20px 118px !important;
  }
  .content {
    max-width: none !important;
    width: 100% !important;
    gap: 18px !important;
  }
  .mobile-header {
    max-width: 1280px;
    margin: 0 auto 16px;
    padding: 14px 16px;
    border-radius: 24px;
  }
  .brand-name {
    font-size: 1.28rem;
  }
  .brand-subname {
    font-size: .88rem;
  }
  #section-home.active,
  #section-kraguj.active,
  #section-players.active,
  #section-clubs.active,
  #section-referees.active,
  #section-tournaments.active {
    max-width: 1280px;
    margin: 0 auto;
  }
  #section-home.active {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(350px, .92fr);
    gap: 18px;
    align-items: start;
  }
  #section-players.active,
  #section-clubs.active,
  #section-referees.active,
  #section-tournaments.active {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 14px;
  }
  #mainToolbar {
    max-width: 1280px;
    margin: 0 auto;
  }
  #playerList,
  #clubList,
  #refereeList,
  #tournamentList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }
  #playerList .player-row,
  #clubList .item-row,
  #refereeList .item-row,
  #tournamentList .item-row {
    min-height: 82px;
    padding: 14px 15px;
    border-radius: 20px;
  }
  #playerList .player-main.compact-only .item-title {
    font-size: 1rem;
  }
  #playerList .player-main.compact-only .item-meta,
  #clubList .item-meta,
  #refereeList .item-meta,
  #tournamentList .item-meta {
    font-size: .82rem;
  }
  .kraguj-shell-compact {
    max-width: 1280px !important;
    margin: 0 auto !important;
    gap: 16px;
  }
  .top-summary-card {
    padding: 18px 18px 16px;
    border-radius: 24px;
  }
  .micro-info-row.micro-info-grid-tight {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
  .micro-info-chip {
    min-height: 88px;
    padding: 14px;
    border-radius: 18px;
  }
  .micro-info-chip span {
    font-size: .76rem;
  }
  .micro-info-chip strong {
    font-size: 1.24rem;
  }
  .kraguj-tabs {
    gap: 10px;
  }
  .pill-tab {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: .92rem;
  }
  .kraguj-panel.active {
    display: grid !important;
    gap: 16px;
  }
  .kraguj-panel.active .compact-card {
    border-radius: 24px;
    padding: 18px;
  }
  .compact-participant-list,
  .compact-history-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .participant-row,
  .item-row,
  .compact-player-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 14px 15px;
    border-radius: 18px;
  }
  .participant-main .item-title,
  .item-title {
    font-size: 1rem;
  }
  .participant-main .item-meta,
  .item-meta {
    font-size: .82rem;
  }
  .participant-inline-list {
    gap: 10px;
  }
  .player-chip {
    padding: 9px 12px;
    border-radius: 999px;
    font-size: .8rem;
  }
  .compact-list.top-gap-small,
  .compact-schedule-list,
  .schedule-list {
    display: grid;
    gap: 10px;
  }
  .compact-match-row,
  .match-row {
    grid-template-columns: 96px minmax(0,1fr) 100px;
    padding: 13px 14px;
    border-radius: 20px;
  }
  .stand-head,
  .stand-line {
    grid-template-columns: 42px minmax(240px, 1.8fr) 52px 58px 58px 64px 64px;
    padding: 13px 14px;
    border-radius: 20px;
  }
  .modal {
    top: 24px !important;
    bottom: 24px !important;
    width: min(980px, calc(100vw - 80px)) !important;
    max-width: calc(100vw - 80px) !important;
    padding: 18px 18px 16px !important;
    border-radius: 28px !important;
  }
  .compact-form .field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
  }
  .compact-picker-list {
    max-height: calc(100dvh - 250px);
  }
}

/* v35 desktop workspace + modal center fix */
:root{
  --desktop-rail-width: 270px;
  --workspace-max: 1540px;
}

.desktop-rail{display:none}
.app-main{min-width:0;width:100%}

@media (min-width: 1100px){
  body{font-size:16px}
  .app-shell.desktop-ready{
    max-width: var(--workspace-max) !important;
    margin: 0 auto;
    padding: 22px 22px 26px !important;
    display:grid;
    grid-template-columns: var(--desktop-rail-width) minmax(0,1fr);
    gap:22px;
    align-items:start;
  }
  .desktop-rail{
    display:grid;
    gap:16px;
    position:sticky;
    top:18px;
    align-self:start;
    min-height: calc(100dvh - 70px);
    padding:18px;
    border:1px solid var(--line);
    border-radius:28px;
    background: linear-gradient(180deg, rgba(13,22,42,.96), rgba(9,17,33,.94));
    box-shadow: 0 18px 50px rgba(0,0,0,.22);
  }
  body.light .desktop-rail{
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,248,255,.94));
  }
  .desktop-rail-brand{display:grid;grid-template-columns:48px minmax(0,1fr);gap:12px;align-items:center}
  .desktop-rail-brand strong{display:block;font-size:1.06rem;color:var(--text)}
  .desktop-rail-brand small{display:block;color:var(--muted);font-size:.8rem;line-height:1.35}
  .desktop-rail-nav{display:grid;gap:8px;align-content:start}
  .desktop-nav-btn,
  .desktop-side-btn{
    width:100%;display:flex;align-items:center;gap:12px;justify-content:flex-start;
    min-height:52px;padding:12px 14px;border-radius:18px;
    border:1px solid var(--line);background:var(--panel);color:var(--text);
    font-weight:800;box-shadow:none;
  }
  .desktop-nav-btn span{font-size:1.1rem;line-height:1}
  .desktop-nav-btn em{font-style:normal;font-size:.95rem}
  .desktop-nav-btn.active{
    background: linear-gradient(135deg, rgba(120,113,255,.92), rgba(92,108,255,.88));
    color:#fff;border-color:transparent;box-shadow:0 16px 36px rgba(97,102,255,.28);
  }
  .desktop-rail-footer{display:grid;gap:10px;margin-top:auto}
  .desktop-side-btn{justify-content:center;font-size:.9rem}
  .mobile-header{margin:0 0 16px !important;max-width:none !important}
  #menuBtn{display:none}
  .bottom-nav{display:none}
  .content{
    max-width:none !important;
    width:100% !important;
    gap:18px !important;
  }
  #mainToolbar,
  #section-home.active,
  #section-players.active,
  #section-clubs.active,
  #section-referees.active,
  #section-tournaments.active,
  #section-kraguj.active{
    max-width:none !important;
    margin:0 !important;
    width:100% !important;
  }
  #section-home.active{
    grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr) !important;
    gap:18px !important;
  }
  #playerList,
  #clubList,
  #refereeList,
  #tournamentList{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:14px !important;
  }
  .desktop-kraguj-shell{
    width:100%;max-width:none !important;
    display:grid;gap:18px;
  }
  .desktop-summary-wide{padding:20px !important}
  .desktop-summary-wide .inline-head{align-items:flex-start}
  .desktop-summary-wide .item-actions{justify-content:flex-end}
  .kraguj-tabs{gap:10px}
  .kraguj-panel.active.kraguj-panel-day{
    display:grid !important;
    grid-template-columns:minmax(0,1.6fr) minmax(320px,.9fr);
    gap:16px;
    align-items:start;
  }
  .kraguj-panel.active.kraguj-panel-participants,
  .kraguj-panel.active.kraguj-panel-table,
  .kraguj-panel.active.kraguj-panel-history{
    display:grid !important;
    gap:16px;
  }
  .compact-participant-list{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  .compact-history-list{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  .micro-info-row.micro-info-grid-tight{grid-template-columns:repeat(4,minmax(0,1fr)) !important}
  .micro-info-chip{min-height:96px;padding:15px 16px !important}
  .micro-info-chip strong{font-size:1.3rem !important}
  .compact-card.slim-card{padding:18px !important;border-radius:24px !important}
  .participant-row,.item-row,.player-row,.match-row,.compact-match-row{min-height:84px}
  .player-row{grid-template-columns:58px minmax(0,1fr) 22px !important}
  .player-index{width:42px;height:42px;font-size:1rem}
  .item-title{font-size:1rem !important}
  .item-meta{font-size:.84rem !important}
}

@media (max-width: 1099px){
  .desktop-rail{display:none !important}
  .app-shell.desktop-ready{display:block}
}

/* modal centering and mobile overflow lock */
.modal-backdrop{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
}
.modal{
  left:0 !important;
  right:0 !important;
  margin:0 auto !important;
  transform:none !important;
  width:min(980px, calc(100vw - 20px)) !important;
  max-width:calc(100vw - 20px) !important;
  overflow-x:hidden !important;
}
@media (max-width: 760px){
  .modal-backdrop{padding:6px}
  .modal{
    width:calc(100vw - 10px) !important;
    max-width:calc(100vw - 10px) !important;
    top:calc(6px + env(safe-area-inset-top)) !important;
    bottom:calc(6px + env(safe-area-inset-bottom)) !important;
    border-radius:22px !important;
    padding:12px 10px 14px !important;
  }
  .picker-stack-clean,
  .compact-picker-list,
  .picker-row,
  .cleaner-picker-row,
  .participant-row,
  .item-row,
  .compact-match-row,
  .match-row,
  .compact-card,
  .section-toolbar,
  .mobile-header{
    width:100% !important;
    max-width:100% !important;
  }
  .picker-row,
  .cleaner-picker-row,
  .participant-row,
  .item-row{
    grid-template-columns:minmax(0,1fr) !important;
  }
  .mini-actions,.item-actions,.actions-right{width:100%}
  .mini-actions > *, .item-actions > *, .actions-right > *{flex:1 1 auto}
}


/* v36 desktop board + modal centering pass */
.desktop-summary-head{
  align-items:flex-start;
}
.desktop-summary-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.desktop-board-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:14px;
}
.desktop-board-main,
.desktop-board-side,
.desktop-board-main-full{
  min-width:0;
  display:grid;
  gap:14px;
}
.desktop-large-card,
.desktop-side-card{
  min-width:0;
}
.desktop-info-stack{
  display:grid;
  gap:10px;
}
.desktop-info-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.06);
}
.desktop-info-row span{
  color:var(--muted);
  font-size:.76rem;
  font-weight:700;
}
.desktop-info-row strong{
  font-size:1rem;
  line-height:1;
}
.desktop-info-row strong.ok{
  color:#73f0b1;
}
.desktop-help-state{
  min-height:160px;
  align-content:start;
}
.desktop-history-grid,
.desktop-participant-grid,
.desktop-results-list,
.desktop-schedule-list{
  min-width:0;
}
.desktop-inline-chip-list{
  margin-bottom:2px;
}

.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(4,8,16,.56);
  z-index:39;
}
.modal{
  position:fixed;
  left:50% !important;
  right:auto !important;
  top:max(10px, env(safe-area-inset-top)) !important;
  bottom:max(10px, env(safe-area-inset-bottom)) !important;
  transform:translateX(-50%) !important;
  margin:0 !important;
  width:min(980px, calc(100vw - 24px)) !important;
  max-width:calc(100vw - 24px) !important;
  max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow:hidden !important;
  overscroll-behavior:contain;
}
#entityForm{
  min-width:0;
  width:100%;
  overflow:auto;
}
#entityForm > *{
  min-width:0;
  max-width:100%;
}

@media (max-width: 760px){
  .desktop-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .desktop-info-row{
    padding:9px 10px;
  }
  .modal{
    top:max(6px, env(safe-area-inset-top)) !important;
    bottom:max(6px, env(safe-area-inset-bottom)) !important;
    width:calc(100vw - 12px) !important;
    max-width:calc(100vw - 12px) !important;
    border-radius:22px !important;
    padding:12px 10px 12px !important;
  }
  .modal-head{
    padding-bottom:8px;
  }
}

@media (min-width: 1100px){
  .desktop-summary-grid{
    grid-template-columns:repeat(8,minmax(0,1fr));
  }
  .desktop-board-grid{
    grid-template-columns:minmax(0,1.7fr) minmax(320px,.95fr);
    align-items:start;
    gap:18px;
  }
  .desktop-board-grid-table{
    grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr);
  }
  .desktop-board-grid-history{
    grid-template-columns:minmax(0,1fr);
  }
  .desktop-board-main-full{
    width:100%;
  }
  .desktop-side-card,
  .desktop-large-card{
    padding:20px !important;
    border-radius:24px !important;
  }
  .desktop-participant-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }
  .desktop-history-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }
  .desktop-results-list{
    grid-template-columns:1fr;
  }
  .desktop-schedule-list .round-block{
    gap:10px;
  }
  .desktop-schedule-list .match-row,
  .desktop-schedule-list .compact-match-row{
    grid-template-columns:92px minmax(0,1fr) 98px;
    min-height:74px;
  }
  .desktop-rail{
    width:300px;
    min-height:calc(100dvh - 44px);
  }
  .app-shell.desktop-ready{
    grid-template-columns:300px minmax(0,1fr) !important;
    gap:24px !important;
    max-width:min(1700px, calc(100vw - 32px)) !important;
    padding:18px 16px 24px !important;
  }
  .app-main{
    min-width:0;
    width:100%;
  }
  .mobile-header{
    padding:16px 18px;
    border-radius:24px;
  }
  #mainToolbar,
  #section-home.active,
  #section-players.active,
  #section-clubs.active,
  #section-referees.active,
  #section-tournaments.active,
  #section-kraguj.active{
    width:100% !important;
  }
  #playerList,
  #clubList,
  #refereeList,
  #tournamentList{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:14px !important;
  }
  .modal{
    top:24px !important;
    bottom:24px !important;
    width:min(1040px, calc(100vw - 96px)) !important;
    max-width:calc(100vw - 96px) !important;
    border-radius:28px !important;
    padding:18px 18px 16px !important;
  }
}


/* v37 stability and viewport guards */
html, body { overflow-x: hidden; }
body, .app-shell, .app-main, .content, .section-panel, #kragujView, #playerList, #clubList, #refereeList, #tournamentList { max-width: 100%; }
.main-search, .main-search input, .picker-search, .picker-search input { min-width: 0; }
.picker-row, .participant-row, .item-row, .player-row, .compact-card, .home-stage, .home-list-card, .section-toolbar { width: 100%; }
@media (min-width: 1200px){
  .app-shell.desktop-ready{ max-width: 1680px !important; }
  .content{ gap:22px !important; }
  #section-home.active{ grid-template-columns: minmax(420px, 560px) minmax(0, 1fr) !important; }
  #playerList, #clubList, #refereeList, #tournamentList{ grid-template-columns: repeat(2, minmax(360px, 1fr)) !important; }
}
@media (max-width: 760px){
  .modal{ inset:calc(6px + env(safe-area-inset-top)) 6px calc(6px + env(safe-area-inset-bottom)) 6px !important; }
}


/* v38 stable desktop + mobile containment pass */
html, body {
  overflow-x: hidden !important;
}

body {
  min-height: 100vh;
}

.app-shell,
.app-main,
.content,
.section-panel,
.compact-card,
.hero-strip,
.hero-compact,
.home-stage,
.home-list-card,
.item-row,
.player-row,
.participant-row,
.picker-row,
.round-block,
.stand-table,
.schedule-list,
.kraguj-shell-compact,
.desktop-board-main,
.desktop-board-side,
.desktop-board-main-full {
  min-width: 0;
  max-width: 100%;
}

.toolbar-row,
.main-search,
.participant-main,
.item-main,
.player-main,
.home-list-copy,
.home-brand-copy,
.inline-head,
.compact-head {
  min-width: 0;
}

.item-title,
.item-meta,
.home-list-copy strong,
.home-list-copy small,
.brand-name,
.brand-subname {
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-row,
.item-row,
.participant-row,
.home-list-card {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.modal {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: min(760px, calc(100vw - 24px)) !important;
  max-width: 100% !important;
  max-height: min(90vh, 920px) !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  border-radius: 24px;
}

.compact-form {
  min-width: 0;
  overflow: auto;
}

.compact-form .field-grid {
  min-width: 0;
}

.compact-form input,
.compact-form select {
  min-width: 0;
}

@media (max-width: 767px) {
  .modal-backdrop {
    align-items: stretch;
    justify-content: stretch;
    padding: 8px;
  }

  .modal {
    width: auto !important;
    height: auto !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 20px;
  }

  .toolbar-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }

  .main-search input {
    min-width: 0;
  }
}

@media (min-width: 1100px) {
  :root {
    --desktop-rail-width: 280px;
  }

  .app-shell.desktop-ready {
    max-width: none !important;
    width: 100%;
    min-height: 100vh;
    display: grid !important;
    grid-template-columns: var(--desktop-rail-width) minmax(0, 1fr);
    gap: 0;
    padding: 0;
    margin: 0;
  }

  .desktop-rail {
    display: grid !important;
    grid-template-rows: auto 1fr auto;
    gap: 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px 16px;
    overflow: auto;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(11,18,36,.98), rgba(9,14,28,.96));
  }

  body.light .desktop-rail {
    background: linear-gradient(180deg, rgba(248,251,255,.98), rgba(242,246,255,.96));
  }

  .app-main {
    min-width: 0;
    padding: 20px 24px 28px;
  }

  .mobile-header {
    margin: 0 0 18px;
    max-width: none !important;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .content {
    max-width: none !important;
    width: 100%;
    margin: 0;
    gap: 16px;
  }

  .bottom-nav {
    display: none !important;
  }

  #mainToolbar {
    width: 100%;
  }

  .toolbar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
  }

  .toolbar-add {
    min-width: 180px;
    justify-self: end;
  }

  #section-home.active {
    display: grid !important;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    gap: 18px;
    align-items: start;
  }

  .home-stage {
    min-height: 280px;
    padding: 24px;
  }

  .home-brand-copy h1 {
    font-size: 2rem;
  }

  .home-brand-copy p {
    max-width: 620px;
    font-size: 1.02rem;
  }

  .hero-stats-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-stack-nav {
    display: grid;
    gap: 12px;
    align-content: start;
  }

  .home-list-card {
    min-height: 88px;
  }

  #section-players.active,
  #section-clubs.active,
  #section-referees.active,
  #section-tournaments.active {
    display: block !important;
  }

  .full-list {
    display: grid;
    gap: 12px;
  }

  .player-row {
    grid-template-columns: 52px minmax(0, 1fr) 22px;
    padding: 14px 16px;
  }

  .player-index {
    width: 38px;
    height: 38px;
    font-size: .9rem;
  }

  .item-title {
    font-size: 1rem;
  }

  .item-meta {
    font-size: .82rem;
  }

  .desktop-board-grid,
  .desktop-board-grid-participants,
  .desktop-board-grid-day,
  .desktop-board-grid-table,
  .desktop-board-grid-history {
    display: grid !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr) !important;
    gap: 16px;
    align-items: start;
  }

  .desktop-board-main,
  .desktop-board-main-full,
  .desktop-board-side {
    min-height: 100%;
  }

  .desktop-large-card,
  .desktop-side-card,
  .compact-card,
  .hero-strip {
    padding: 18px;
  }

  .schedule-list .match-line,
  .compact-schedule-list .match-line {
    padding: 14px 16px;
  }

  .stand-head,
  .stand-line {
    grid-template-columns: 64px minmax(0, 1.5fr) repeat(5, minmax(54px, auto));
  }

  .modal {
    width: min(880px, calc(100vw - 96px)) !important;
    max-height: calc(100vh - 56px) !important;
  }
}

/* v39 focused Kraguj workflow */
.workflow-summary h2{margin:6px 0 4px;font-size:1.55rem;line-height:1.1}
.workflow-shell{display:grid;gap:14px}
.kraguj-main-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}
.kraguj-stage-card,.stack-card{min-width:0}
.kraguj-side-stack{display:grid;gap:14px;min-width:0}
.workflow-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0 12px}
.workflow-step{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:16px;background:rgba(255,255,255,.03);border:1px solid var(--line);color:var(--muted);font-size:.78rem;font-weight:800;min-width:0}
.workflow-step strong{width:24px;height:24px;display:grid;place-items:center;border-radius:999px;background:rgba(255,255,255,.06);font-size:.78rem;color:var(--text);flex:0 0 auto}
.workflow-step.done{background:rgba(32,211,161,.12);border-color:rgba(32,211,161,.18);color:#baf6e4}
.workflow-step.active{background:rgba(95,108,255,.14);border-color:rgba(95,108,255,.22);color:#dfe4ff}
.dense-list{gap:8px}
.compact-info-stack .desktop-info-row{padding:11px 12px}
.align-left{text-align:left;align-content:start;justify-items:start}
@media (max-width:760px){
  .workflow-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:1100px){
  .workflow-shell{gap:18px}
  .kraguj-main-grid{grid-template-columns:minmax(0,1.45fr) minmax(320px,.75fr);gap:18px}
  .workflow-summary h2{font-size:1.75rem}
  .desktop-summary-grid{grid-template-columns:repeat(8,minmax(0,1fr)) !important}
  .desktop-schedule-list .round-block{padding:2px 0}
}

/* v41 stability + modal + form fixes */
html, body {
  overflow-x: hidden;
}

#modal.hidden, #modalBackdrop.hidden { display:none !important; }
.modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(5, 10, 18, 0.72) !important;
  z-index: 2000 !important;
}
.modal {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(760px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  height: min(88dvh, 860px) !important;
  max-height: min(88dvh, 860px) !important;
  padding: 14px !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 10px !important;
  overflow: hidden !important;
  z-index: 2001 !important;
  border-radius: 22px !important;
}
.modal-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px !important;
}
#entityForm.compact-form {
  min-height: 0;
  overflow: auto !important;
  padding-right: 4px;
}
.two-up-desktop {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.birth-label-single { display:grid; gap:6px; }
.birth-inline-single {
  display:grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
}
.hidden-date-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.icon-date-btn {
  height: 42px;
  min-width: 46px;
  border-radius: 12px;
}
.sticky-form-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(6,10,18,0), rgba(6,10,18,0.98) 35%);
  padding-top: 12px;
  margin-top: 4px;
}
body.light .sticky-form-actions {
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.98) 35%);
}
.disabled-chip {
  opacity: .72;
  cursor: default;
}
.participant-selected {
  border-color: rgba(32,211,161,.3) !important;
  background: rgba(32,211,161,.08) !important;
}
.participant-row, .item-row, .compact-card, .home-list-card, .home-primary {
  max-width: 100%;
}
.app-shell.desktop-ready {
  max-width: 1600px;
  margin: 0 auto;
}
.app-main, .content {
  width: 100%;
  max-width: 100%;
}
#kragujView, #playerList, #clubList, #refereeList, #tournamentList {
  width: 100%;
  max-width: 100%;
}
@media (min-width: 980px) {
  .content.compact-gap {
    padding-right: 8px;
  }
  .modal {
    width: min(860px, calc(100vw - 80px)) !important;
    max-width: calc(100vw - 80px) !important;
    height: min(84vh, 900px) !important;
    max-height: min(84vh, 900px) !important;
  }
}
@media (max-width: 760px) {
  .two-up-desktop {
    grid-template-columns: 1fr;
  }
  .modal {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    padding: 12px !important;
  }
  .birth-inline-single {
    grid-template-columns: minmax(0,1fr) 46px;
  }
}

/* v42 save + modal stability */
.modal {
  overscroll-behavior: contain;
}
#entityForm.compact-form {
  max-height: 100%;
  min-height: 0;
}
@media (max-width: 760px) {
  .modal {
    top: calc(6px + env(safe-area-inset-top)) !important;
    left: 6px !important;
    right: 6px !important;
    bottom: calc(6px + env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    transform: none !important;
  }
  #entityForm.compact-form {
    padding-bottom: 18px;
  }
}
@media (min-width: 761px) {
  .modal {
    top: 50% !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
  }
}

@media (min-width: 901px) {
  .app-shell { padding-left: 22px; padding-right: 22px; }
  .content { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app-shell { max-width: 620px; }
  .content { max-width: 620px; }
}
@media (max-width: 640px) {
  .modal {
    left: 8px;
    right: 8px;
    top: calc(8px + env(safe-area-inset-top));
    bottom: calc(8px + env(safe-area-inset-bottom));
    transform: none;
    width: auto;
    height: auto;
    max-height: none;
    border-radius: 18px;
  }
}

/* v44 desktop sizing + stable modal + tennis-like widths */
:root{
  --content-max-readable: 1180px;
  --list-max-readable: 980px;
  --form-max-readable: 860px;
}

.app-shell,
.content,
.section-panel,
#playerList,
#clubList,
#refereeList,
#tournamentList,
#kragujView{
  width:100%;
  box-sizing:border-box;
}

.modal{
  width:min(var(--form-max-readable), calc(100vw - 40px)) !important;
  max-width:min(var(--form-max-readable), calc(100vw - 40px)) !important;
  max-height:calc(100dvh - 32px) !important;
  overflow:auto !important;
}

#entityForm{
  width:100%;
}

.two-up-desktop,
.field-grid.two-up-desktop{
  max-width:760px;
  margin:0 auto;
}

.birth-label-single,
.optional-wrap,
.form-block{
  max-width:760px;
  margin-left:auto;
  margin-right:auto;
}

.form-actions.split-actions,
.sticky-form-actions{
  max-width:760px;
  margin-left:auto;
  margin-right:auto;
}

@media (min-width: 1100px){
  .content{
    max-width:var(--content-max-readable) !important;
    margin:0 auto;
  }

  .desktop-ready .content,
  .app-shell.desktop-ready .content{
    max-width:calc(100vw - 340px) !important;
  }

  .section-toolbar,
  .hero-compact,
  .compact-card,
  .home-stage,
  .home-list-card,
  .kraguj-shell-compact,
  .workflow-shell,
  .desktop-board-grid,
  .desktop-board-grid-participants,
  .desktop-board-grid-day,
  .desktop-board-grid-table,
  .desktop-board-grid-history{
    max-width:var(--content-max-readable) !important;
    margin-left:auto;
    margin-right:auto;
  }

  #playerList,
  #clubList,
  #refereeList,
  #tournamentList{
    max-width:var(--list-max-readable);
    margin:0 auto;
  }

  .player-row,
  .item-row,
  .participant-row,
  .round-block,
  .compact-round-block,
  .schedule-list,
  .compact-schedule-list{
    max-width:100%;
  }

  .section-toolbar{
    max-width:var(--list-max-readable);
  }

  .main-search{
    max-width:720px;
  }

  .desktop-board-grid,
  .desktop-board-grid-participants,
  .desktop-board-grid-day,
  .desktop-board-grid-table,
  .desktop-board-grid-history{
    grid-template-columns:minmax(0,1fr) 320px !important;
    gap:18px !important;
    align-items:start;
  }

  .desktop-large-card,
  .desktop-side-card{
    padding:18px !important;
    border-radius:18px !important;
  }

  .micro-info-grid-tight,
  .desktop-summary-grid{
    grid-template-columns:repeat(4, minmax(0,1fr)) !important;
    gap:12px !important;
  }

  .micro-info-chip{
    min-height:auto;
    padding:12px 14px;
  }

  .modal{
    padding:18px 20px 18px !important;
    border-radius:20px !important;
  }
}

@media (max-width: 760px){
  .modal{
    inset:8px !important;
    width:auto !important;
    max-width:none !important;
    max-height:calc(100dvh - 16px) !important;
    border-radius:18px !important;
    overflow:auto !important;
  }

  #entityForm{
    padding-bottom:12px;
  }

  .two-up-desktop,
  .field-grid.two-up-desktop,
  .birth-label-single,
  .optional-wrap,
  .form-block,
  .form-actions.split-actions,
  .sticky-form-actions{
    max-width:100%;
  }
}


/* v46 balanced desktop + polished mobile pass */
:root{
  --rm-shell-max: 1660px;
  --rm-content-max: 1240px;
  --rm-list-max: 1020px;
  --rm-card-radius: 24px;
}

.app-shell.desktop-ready{
  max-width: var(--rm-shell-max);
  margin: 0 auto;
}

.app-main{
  min-width: 0;
}

.section-panel.active{
  gap: 14px;
}

.content.compact-gap{
  gap: 12px;
}

#mainToolbar,
#playerList,
#clubList,
#refereeList,
#tournamentList,
#kragujView,
#section-home{
  width: 100%;
}

#section-home,
#kragujView,
#playerList,
#clubList,
#refereeList,
#tournamentList{
  margin-left: auto;
  margin-right: auto;
}

.player-row,
.item-row,
.participant-row,
.home-list-card,
.home-stage,
.section-toolbar,
.compact-card,
.hero-strip,
.home-primary{
  box-sizing: border-box;
}

.item-row,
.participant-row{
  grid-template-columns: minmax(0,1fr) auto;
}

.item-actions,
.mini-actions{
  align-items: center;
}

.home-list-card,
.player-row,
.item-row,
.participant-row,
.section-toolbar,
.home-stage,
.compact-card{
  border-radius: var(--rm-card-radius);
}

@media (min-width: 980px){
  body{
    font-size: 15px;
  }

  .app-shell.desktop-ready{
    padding: 18px 22px 26px;
    column-gap: 24px;
  }

  .desktop-rail{
    position: sticky;
    top: 18px;
    height: calc(100dvh - 36px);
    border-radius: 30px;
    padding: 18px 16px;
    box-shadow: 0 22px 44px rgba(0,0,0,.28);
  }

  .desktop-rail-nav{
    gap: 10px;
  }

  .desktop-nav-btn,
  .desktop-side-btn{
    min-height: 52px;
    border-radius: 18px;
    padding: 0 14px;
  }

  .app-main{
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: start;
    min-width: 0;
  }

  .content,
  .desktop-ready .content,
  .app-shell.desktop-ready .content{
    width: 100%;
    max-width: var(--rm-content-max) !important;
    margin: 0 auto;
    padding-bottom: 28px;
  }

  #mainToolbar,
  #playerList,
  #clubList,
  #refereeList,
  #tournamentList,
  #kragujView{
    max-width: var(--rm-list-max) !important;
  }

  .section-toolbar{
    padding: 10px 12px;
    position: sticky;
    top: 12px;
    z-index: 10;
    backdrop-filter: blur(16px);
    background: linear-gradient(180deg, rgba(17,25,44,.94), rgba(17,25,44,.86));
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 16px 32px rgba(0,0,0,.18);
  }

  body.light .section-toolbar{
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.9));
  }

  .toolbar-row{
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .main-search{
    min-height: 46px;
    border-radius: 18px;
    padding: 0 14px;
  }

  .toolbar-add{
    min-width: 122px;
    min-height: 46px;
    border-radius: 16px;
    font-size: .92rem;
  }

  #section-home.active{
    max-width: var(--rm-content-max);
    display: grid;
    gap: 16px;
  }

  .home-stage{
    padding: 22px;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .95fr);
    grid-template-areas:
      "brand stats"
      "brand primary";
    align-items: stretch;
    gap: 18px;
  }

  .home-stage-top{
    grid-area: brand;
    display: grid;
    align-content: start;
    gap: 16px;
  }

  .hero-stats-strip{
    grid-area: stats;
    align-content: stretch;
    gap: 10px;
  }

  .hero-stat{
    min-height: 88px;
    display: grid;
    align-content: center;
    padding: 14px 16px;
    border-radius: 20px;
  }

  .home-primary{
    grid-area: primary;
    min-height: 88px;
    padding: 16px 18px;
    border-radius: 22px;
  }

  .home-brand-row{
    align-items: center;
    gap: 18px;
  }

  .home-brand-copy h1{
    font-size: 2rem;
    line-height: 1.02;
  }

  .home-brand-copy p{
    max-width: 560px;
    font-size: .98rem;
    line-height: 1.5;
  }

  .home-stack-nav{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
    max-width: var(--rm-content-max);
  }

  .home-list-card{
    min-height: 92px;
    grid-template-columns: 52px minmax(0,1fr) 18px;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.08);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
  }

  .home-list-card:hover,
  .player-row:hover,
  .item-row:hover,
  .participant-row:hover{
    transform: translateY(-1px);
    border-color: rgba(122,115,255,.24);
    box-shadow: 0 16px 28px rgba(0,0,0,.16);
  }

  .home-list-icon{
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(122,115,255,.14);
    font-size: 1.25rem;
  }

  .home-list-copy strong{
    font-size: 1rem;
  }

  .home-list-copy small{
    font-size: .82rem;
    margin-top: 4px;
  }

  .player-row{
    grid-template-columns: 52px minmax(0,1fr) 18px;
    gap: 14px;
    padding: 14px 16px;
    min-height: 82px;
  }

  .player-index{
    width: 42px;
    height: 42px;
    font-size: .95rem;
  }

  .item-row,
  .participant-row{
    gap: 16px;
    padding: 14px 16px;
    min-height: 84px;
    align-items: center;
  }

  .item-main,
  .participant-main,
  .player-main.compact-only{
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .item-title{
    font-size: .98rem;
    line-height: 1.25;
  }

  .item-meta,
  .tiny-meta,
  .muted-inline{
    font-size: .8rem;
    line-height: 1.35;
  }

  .item-actions,
  .mini-actions{
    min-width: 230px;
    justify-content: flex-end;
    gap: 8px;
  }

  .ghost-small,
  .danger-small,
  .icon-chip,
  .status-chip{
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: .8rem;
  }

  .modal{
    width: min(940px, calc(100vw - 84px));
    height: min(860px, calc(100dvh - 56px));
    max-height: calc(100dvh - 56px);
    padding: 18px 20px 18px;
    border-radius: 28px;
  }

  .modal-head{
    padding-bottom: 10px;
    margin-bottom: 4px;
  }

  .compact-form{
    gap: 12px;
  }

  .compact-form .field-grid,
  .two-up-desktop,
  .field-grid.two-up-desktop{
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 12px;
  }

  .compact-form label{
    font-size: .8rem;
  }

  .compact-form input,
  .compact-form select{
    height: 44px;
    border-radius: 14px;
  }
}

@media (min-width: 980px) and (max-width: 1239px){
  .home-stage{
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "stats"
      "primary";
  }

  .home-stack-nav{
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 979px){
  .content,
  .desktop-ready .content,
  .app-shell.desktop-ready .content{
    max-width: 920px !important;
    margin: 0 auto;
  }

  #mainToolbar,
  #playerList,
  #clubList,
  #refereeList,
  #tournamentList,
  #kragujView,
  #section-home{
    max-width: 920px !important;
  }
}

@media (max-width: 760px){
  .app-shell{
    padding: calc(8px + env(safe-area-inset-top)) 10px calc(86px + env(safe-area-inset-bottom));
  }

  .mobile-header.slim{
    position: sticky;
    top: calc(6px + env(safe-area-inset-top));
    z-index: 14;
    padding: 10px 12px;
    border-radius: 18px;
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
  }

  .brand-subname{
    font-size: .74rem;
    line-height: 1.2;
  }

  .content.compact-gap{
    gap: 10px;
  }

  .section-toolbar{
    position: sticky;
    top: calc(74px + env(safe-area-inset-top));
    z-index: 13;
    padding: 8px 10px;
    backdrop-filter: blur(14px);
    background: linear-gradient(180deg, rgba(17,25,44,.95), rgba(17,25,44,.9));
    box-shadow: 0 10px 20px rgba(0,0,0,.16);
  }

  body.light .section-toolbar{
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.92));
  }

  .toolbar-row{
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
  }

  .main-search{
    min-height: 42px;
    border-radius: 14px;
  }

  .toolbar-add{
    min-width: 78px;
    min-height: 42px;
    border-radius: 14px;
    padding: 8px 10px;
  }

  .home-stage{
    padding: 14px;
    gap: 12px;
  }

  .home-brand-row{
    gap: 12px;
    align-items: center;
  }

  .home-brand-copy h1{
    font-size: 1.24rem;
    line-height: 1.04;
  }

  .home-brand-copy p{
    font-size: .84rem;
    line-height: 1.42;
  }

  .hero-stats-strip{
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 8px;
  }

  .hero-stat{
    padding: 10px 8px;
    border-radius: 16px;
  }

  .hero-stat span{
    font-size: .68rem;
    line-height: 1.15;
  }

  .hero-stat strong{
    font-size: 1rem;
    line-height: 1.05;
  }

  .home-primary{
    padding: 13px 14px;
    border-radius: 18px;
  }

  .home-stack-nav{
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home-list-card{
    grid-template-columns: 40px minmax(0,1fr) 14px;
    gap: 10px;
    padding: 12px 12px;
    min-height: 74px;
  }

  .home-list-icon{
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(122,115,255,.14);
  }

  .player-row,
  .item-row,
  .participant-row{
    padding: 11px 12px;
    min-height: 70px;
  }

  .player-row{
    grid-template-columns: 40px minmax(0,1fr) 14px;
  }

  .player-index{
    width: 32px;
    height: 32px;
  }

  .item-title{
    font-size: .9rem;
  }

  .item-meta,
  .tiny-meta,
  .muted-inline{
    font-size: .73rem;
  }

  .item-actions,
  .mini-actions{
    gap: 6px;
  }

  .ghost-small,
  .danger-small,
  .icon-chip,
  .status-chip{
    min-height: 34px;
    padding: 7px 10px;
    font-size: .75rem;
  }

  .bottom-nav{
    padding: 7px 8px calc(8px + env(safe-area-inset-bottom));
    gap: 4px;
  }

  .bottom-btn{
    min-height: 52px;
    border-radius: 14px;
  }

  .bottom-btn span{
    font-size: 1.02rem;
  }

  .bottom-btn em{
    font-size: .67rem;
  }

  .modal{
    inset: 8px !important;
    width: auto !important;
    height: auto !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 22px !important;
    padding: 12px 12px 14px !important;
  }

  .compact-form .field-grid,
  .two-up-desktop,
  .field-grid.two-up-desktop{
    grid-template-columns: 1fr !important;
  }

  .compact-form .form-actions{
    display: grid;
    grid-template-columns: 1fr;
  }

  .compact-form .form-actions > *{
    width: 100%;
    justify-content: center;
  }
}


/* v47 picker interaction + mobile layout fix */
.picker-tap-row {
  cursor: pointer;
}
.picker-row-disabled {
  cursor: default;
}
.picker-row .mini-actions {
  min-width: 132px;
}
.picker-row .picker-add-btn,
.picker-row .disabled-chip {
  min-width: 132px;
  justify-content: center;
}
.compact-picker-list {
  padding-bottom: 88px;
}
.sticky-form-actions {
  z-index: 3;
}

@media (max-width: 760px) {
  .compact-picker-list {
    max-height: calc(100dvh - 280px) !important;
    padding-bottom: 112px;
  }
  .picker-row,
  .cleaner-picker-row {
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .picker-row .mini-actions,
  .cleaner-picker-row .mini-actions {
    width: auto !important;
    min-width: 112px;
    justify-content: flex-end !important;
  }
  .picker-row .mini-actions > *,
  .cleaner-picker-row .mini-actions > * {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 112px;
  }
  .picker-row .item-title,
  .cleaner-picker-row .item-title {
    font-size: .94rem;
    line-height: 1.12;
  }
  .picker-row .item-meta,
  .cleaner-picker-row .item-meta {
    font-size: .75rem;
    line-height: 1.2;
  }
}


/* v50 all-in-one Kraguj polish */
.kr-shell-v50 {
  max-width: 1460px;
  margin: 0 auto;
}

.kr-summary-card,
.kr-primary-card {
  border: 1px solid rgba(133, 164, 255, 0.22);
  box-shadow: 0 18px 48px rgba(7, 18, 49, 0.28);
}

.kr-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.kr-wide-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.kr-side-column {
  display: grid;
  gap: 18px;
}

.kr-inline-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.kr-scroll-list {
  max-height: min(68vh, 760px);
  overflow: auto;
  padding-right: 6px;
}

.kr-match-row {
  align-items: center;
}

.kr-match-row .item-meta {
  margin-top: 6px;
}

.kr-clickable-row,
.kr-open-player,
.kr-open-pair,
.kr-open-fixture,
.kr-open-history-day,
.kr-stand-row {
  cursor: pointer;
}

.kr-standings-list {
  display: grid;
  gap: 8px;
}

.kr-standings-head,
.kr-stand-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.5fr) 52px 52px 52px 64px 64px;
  gap: 10px;
  align-items: center;
}

.kr-standings-head {
  font-size: 12px;
  opacity: 0.7;
  padding: 0 10px;
}

.kr-stand-row {
  border: 1px solid rgba(133, 164, 255, 0.18);
  border-radius: 18px;
  padding: 12px 10px;
  background: rgba(10, 17, 37, 0.58);
}

.kr-stand-row:hover {
  border-color: rgba(116, 153, 255, 0.34);
  box-shadow: 0 10px 28px rgba(19, 33, 71, 0.24);
}

.kr-stand-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kr-stand-name strong,
.kr-stand-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kr-stand-pos {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(116, 153, 255, 0.12);
}

.kr-tabs-wrap {
  flex-wrap: wrap;
  gap: 10px;
}

.kr-mobile-picker .picker-list,
.kr-present-list {
  max-height: min(56vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.kr-check-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.kr-check-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
}

@media (max-width: 1180px) {
  .kr-section-grid,
  .kr-wide-grid {
    grid-template-columns: 1fr;
  }

  .kr-scroll-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .kr-summary-card h2 {
    font-size: 1.3rem;
  }

  .kr-inline-tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .kr-standings-head {
    display: none;
  }

  .kr-stand-row {
    grid-template-columns: 40px minmax(0, 1fr) 48px 48px 48px 54px 54px;
    padding: 10px 8px;
    border-radius: 16px;
  }

  .kr-stand-name small {
    font-size: 11px;
  }

  .kr-mobile-picker .sticky-form-actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(4, 10, 24, 0), rgba(4, 10, 24, 0.94) 22%, rgba(4, 10, 24, 1) 100%);
    padding-top: 12px;
    margin-top: 10px;
  }

  .kr-mobile-picker .picker-add-btn,
  .kr-mobile-picker .disabled-chip {
    min-width: 92px;
  }

  .kr-shell-v50 .compact-card {
    border-radius: 24px;
  }
}


/* v51 phone + country + city helpers */
.phone-compose-wrap {
  display: grid;
  gap: 6px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.phone-compose-grid {
  display: grid;
  grid-template-columns: minmax(128px, 180px) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}
.phone-piece {
  display: grid;
  gap: 6px;
}
.phone-piece span {
  font-size: .78rem;
  opacity: .8;
}
.phone-piece select,
.phone-piece input {
  width: 100%;
}
#playerCountryInput,
#playerCityInput,
#phoneLocalInput,
#phonePrefixSelect {
  min-height: 42px;
}
@media (max-width: 760px) {
  .phone-compose-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}


/* v52 polish */
.home-title-muted{margin:0;color:var(--muted);font-size:.96rem;line-height:1.35;font-weight:600}
.hero-stat{cursor:pointer;text-align:left;color:var(--text)}
.hero-stat:hover{border-color:rgba(116,153,255,.34);transform:translateY(-1px)}
.kr-top-select{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin:12px 0 4px}
.kr-select-wrap{display:grid;gap:5px;min-width:min(300px,100%);font-size:.78rem;font-weight:700;color:var(--muted)}
.kr-select-wrap select{height:40px;border-radius:12px;border:1px solid var(--line-2);background:var(--bg-2);color:var(--text);padding:0 11px}
.kr-compact-row{grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start;padding:8px 10px !important;min-height:auto !important}
.kr-inline-remove{align-self:start}
.kr-inline-remove .icon-danger-btn,.kr-inline-remove .ghost-small{width:28px;height:28px;min-width:28px;padding:0;border-radius:9px;display:inline-flex;align-items:center;justify-content:center}
.kr-match-row{grid-template-columns:88px minmax(0,1fr) 88px;gap:10px;align-items:start;min-height:auto !important}
.kr-match-center{gap:6px}
.kr-team-block{white-space:normal !important;overflow:visible !important;text-overflow:unset !important;line-height:1.22;font-weight:800}
.kr-meta-inline{margin-top:0;font-size:.72rem}
.kr-score-box{align-self:center}
.kr-detail-head{display:grid;gap:4px;padding:4px 2px 8px}
.kr-detail-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.kr-inline-score{display:inline-flex;align-items:center;justify-content:center;padding:5px 10px;border-radius:999px;background:rgba(95,108,255,.14);font-weight:900}
.kr-detail-match{grid-template-columns:minmax(0,1fr) 72px;min-height:auto !important;padding:9px 10px}
.kr-detail-center{gap:4px}
.kr-stand-name .name-short{display:none}
.kr-stand-name strong,.kr-stand-name small{white-space:normal;overflow:visible;text-overflow:unset;line-height:1.18}
.kr-stand-row{min-height:auto}
@media (max-width: 720px){
  .kr-top-select{display:grid;grid-template-columns:1fr auto;align-items:end}
  .kr-match-row{grid-template-columns:72px minmax(0,1fr) 72px;gap:8px;padding:9px 8px}
  .kr-score-box strong{font-size:.86rem}
  .kr-score-box small{font-size:.66rem}
  .kr-team-block{font-size:.84rem}
  .kr-stand-row{grid-template-columns:34px minmax(0,1fr) 34px 34px 34px 42px 42px;gap:6px}
  .kr-stand-name .name-full{display:none}
  .kr-stand-name .name-short{display:block}
  .kr-stand-name small{display:none}
  .kr-inline-score{padding:4px 8px;font-size:.82rem}
}

.kr-picker-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:6px 0 2px}
.kr-picker-filters label{display:grid;gap:5px;font-size:.75rem;font-weight:700;color:var(--muted)}
.kr-picker-filters select{height:38px;border-radius:12px;border:1px solid var(--line-2);background:var(--bg-2);color:var(--text);padding:0 10px}
@media (max-width:720px){.kr-picker-filters{grid-template-columns:1fr}}

.kr-empty-launcher{margin-top:12px}


.tournament-shell-v54{display:grid;gap:14px}
.tournament-stage-card{display:grid;gap:14px;padding:18px;border-radius:28px}
.tournament-stage-copy h2{margin:6px 0 4px;font-size:1.35rem}
.tournament-stage-copy p{margin:0;color:var(--muted);max-width:720px;line-height:1.45}
.tournament-stage-actions{display:flex;gap:10px;flex-wrap:wrap}
.tournament-stage-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.tournament-mini-stat{padding:12px 14px;border-radius:18px;background:var(--bg-2);border:1px solid var(--line-2);display:grid;gap:4px}
.tournament-mini-stat span{font-size:.76rem;color:var(--muted);font-weight:700}
.tournament-mini-stat strong{font-size:1.25rem;line-height:1}
.tournament-link-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;border-radius:24px}
.tournament-link-copy{display:grid;gap:4px}
.tournament-link-copy small{color:var(--muted);line-height:1.4}
.tournament-link-actions{display:flex;gap:10px;flex-wrap:wrap}
.tournament-card-list{display:grid;gap:12px}
.tournament-card-row{display:grid;gap:12px;padding:16px 18px;border-radius:24px}
.tournament-card-row.is-finished{opacity:.92}
.tournament-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.tournament-card-status{padding:6px 10px;border-radius:999px;font-size:.76rem;font-weight:800;border:1px solid var(--line-2);background:var(--bg-2);white-space:nowrap}
.tournament-card-status.is-active{color:var(--ok)}
.tournament-card-status.is-finished{color:var(--muted)}
.tournament-card-chips{display:flex;gap:8px;flex-wrap:wrap}
.info-chip{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:var(--bg-2);border:1px solid var(--line-2);font-size:.76rem;font-weight:700;color:var(--muted-strong)}
.ok-chip{color:var(--ok);border-color:rgba(38,203,124,.28);background:rgba(38,203,124,.12)}
.tournament-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.tournament-card-cell{padding:12px 14px;border-radius:18px;background:var(--bg-2);border:1px solid var(--line-2);display:grid;gap:4px}
.tournament-card-cell span{font-size:.74rem;color:var(--muted);font-weight:700}
.tournament-card-cell strong{line-height:1.2}
.tournament-card-actions{display:flex;gap:8px;flex-wrap:wrap}
.tournament-empty-card{padding:20px 18px;border-radius:26px}
@media (max-width:720px){
  .tournament-stage-card,.tournament-link-card,.tournament-card-row{padding:14px}
  .tournament-stage-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tournament-link-card{display:grid}
  .tournament-card-grid{grid-template-columns:1fr}
  .tournament-card-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .tournament-card-actions .primary-action{grid-column:1/-1}
}


/* v55 standard tournament wizard */
.tournament-shell-v54{max-width:1280px;margin:0 auto}
.tournament-stage-card,.tournament-link-card,.tournament-card-row{max-width:1280px}
.tournament-wizard-block{display:grid;gap:16px}
.wizard-steps{display:flex;gap:8px;flex-wrap:wrap}
.wizard-step{padding:7px 12px;border-radius:999px;background:var(--bg-2);border:1px solid var(--line-2);font-size:.78rem;font-weight:800;color:var(--muted)}
.wizard-step.active{background:rgba(115,110,255,.18);border-color:rgba(115,110,255,.34);color:var(--text)}
.tour-section-head{display:grid;gap:4px}
.tour-section-head h3{margin:0;font-size:1rem}
.tour-section-head small{color:var(--muted);line-height:1.4}
.tour-choice-grid{display:grid;gap:10px}
.tour-choice-grid.event-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.tour-choice-grid.format-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.tour-choice-card{display:flex;align-items:flex-start;gap:12px;padding:14px 15px;border-radius:18px;border:1px solid var(--line-2);background:var(--bg-2);color:var(--text);text-align:left;cursor:pointer;transition:.18s ease;min-height:100%}
.tour-choice-card:hover{transform:translateY(-1px);border-color:rgba(115,110,255,.38)}
.tour-choice-card.active{border-color:rgba(115,110,255,.58);background:linear-gradient(180deg, rgba(88,102,255,.22), rgba(12,18,36,.86))}
.tour-choice-icon{width:40px;height:40px;border-radius:14px;display:grid;place-items:center;background:rgba(255,255,255,.06);font-size:1.1rem;flex:0 0 auto}
.tour-choice-copy{display:grid;gap:4px;min-width:0}
.tour-choice-copy strong{font-size:.95rem;line-height:1.2}
.tour-choice-copy small{color:var(--muted);line-height:1.45}
.tournament-overview-grid label{min-width:0}
@media (max-width: 980px){
  .tour-choice-grid.event-grid,.tour-choice-grid.format-grid{grid-template-columns:1fr}
}


.tournament-workspace-modal { display: grid; gap: 14px; }
.workspace-summary-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap:10px; }
.workspace-stat { border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:12px 14px; background:rgba(255,255,255,.03); display:grid; gap:4px; }
.workspace-stat span { font-size:12px; opacity:.7; }
.workspace-stat strong { font-size:15px; }
.workspace-block-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap:14px; align-items:start; }
.workspace-panel { display:grid; gap:12px; }
.workspace-panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.workspace-panel-head small { display:block; margin-top:2px; opacity:.7; }
.workspace-list { display:grid; gap:10px; }
.workspace-row { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; padding:12px; border:1px solid rgba(255,255,255,.08); border-radius:14px; background:rgba(255,255,255,.025); }
.workspace-main { display:grid; gap:3px; min-width:0; }
.workspace-main strong, .workspace-main small { word-break:break-word; }
.workspace-main small { opacity:.75; }
.workspace-side { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.workspace-empty { padding:16px; border:1px dashed rgba(255,255,255,.12); border-radius:14px; opacity:.75; }
.tournament-modal-block { display:grid; gap:14px; }
@media (max-width: 700px) {
  .workspace-row, .workspace-panel-head { flex-direction:column; }
  .workspace-side { justify-content:flex-start; }
}


/* ===== v61 presentation-safe cosmetic polish ===== */
:root{
  --brand-yellow:#ffd84d;
  --brand-orange:#ff9f43;
  --brand-blue:#58b7ff;
  --brand-lime:#c7ff59;
}
body{
  background:
    radial-gradient(circle at top left, rgba(88,183,255,.18), transparent 28%),
    radial-gradient(circle at top right, rgba(255,159,67,.16), transparent 24%),
    linear-gradient(180deg, #091524 0%, #0d1f35 45%, #0a1422 100%) !important;
}
body.light{
  background:
    radial-gradient(circle at top left, rgba(88,183,255,.13), transparent 30%),
    radial-gradient(circle at top right, rgba(255,159,67,.12), transparent 25%),
    linear-gradient(180deg, #f4f8ff 0%, #edf3ff 50%, #f8fbff 100%) !important;
}
.presentation-ribbon{
  display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:22px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(135deg, rgba(255,216,77,.16), rgba(88,183,255,.12));
  box-shadow:0 18px 36px rgba(0,0,0,.18);
}
.presentation-ribbon-copy{display:grid;gap:4px}
.presentation-ribbon-copy strong{font-size:1rem;letter-spacing:.01em}
.presentation-ribbon-copy small{color:var(--muted);line-height:1.35}
.presentation-badge{
  display:inline-flex;align-items:center;gap:8px;width:max-content;
  padding:6px 11px;border-radius:999px;background:linear-gradient(135deg,var(--brand-yellow),var(--brand-orange));
  color:#0d1420;font-size:.72rem;font-weight:900;letter-spacing:.08em;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
}
.mobile-header.slim,
.section-toolbar,
.compact-card,
.home-stage,
.home-list-card,
.player-row,
.participant-row,
.item-row,
.compact-match-row,
.modal,
.desktop-rail,
.bottom-nav{
  border:1px solid rgba(255,255,255,.10) !important;
  box-shadow:0 18px 40px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.03) !important;
}
body.light .mobile-header.slim,
body.light .section-toolbar,
body.light .compact-card,
body.light .home-stage,
body.light .home-list-card,
body.light .player-row,
body.light .participant-row,
body.light .item-row,
body.light .compact-match-row,
body.light .modal,
body.light .desktop-rail,
body.light .bottom-nav{
  box-shadow:0 14px 34px rgba(62,84,126,.12), inset 0 1px 0 rgba(255,255,255,.45) !important;
}
.home-stage{
  background:
    radial-gradient(circle at top right, rgba(255,216,77,.18), transparent 26%),
    linear-gradient(135deg, rgba(29,47,82,.94), rgba(18,31,55,.96)) !important;
}
body.light .home-stage{
  background:
    radial-gradient(circle at top right, rgba(255,216,77,.22), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(242,247,255,.97)) !important;
}
.hero-kicker,
.home-kicker{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  padding:7px 12px;
  width:max-content;
}
.home-primary,
.primary-action{
  background:linear-gradient(135deg,var(--brand-yellow),var(--brand-orange)) !important;
  color:#111722 !important;
  border:none !important;
  box-shadow:0 12px 26px rgba(255,159,67,.28) !important;
}
.primary-action.small{box-shadow:0 10px 20px rgba(255,159,67,.24) !important}
.ghost-small,
.icon-btn,
.lang-btn,
.setting-btn,
.desktop-side-btn{
  background:rgba(255,255,255,.07) !important;
  border:1px solid rgba(255,255,255,.12) !important;
}
.danger-small,
.icon-danger-btn{
  background:rgba(255,92,122,.12) !important;
  border:1px solid rgba(255,128,152,.26) !important;
}
.home-list-card:hover,
.player-row:hover,
.item-row:hover,
.participant-row:hover,
.compact-match-row:hover,
.tournament-card-row:hover{
  transform:translateY(-1px);
  border-color:rgba(255,216,77,.18) !important;
}
.tournament-stage-card,
.tournament-link-card{
  background:
    radial-gradient(circle at top right, rgba(88,183,255,.15), transparent 25%),
    linear-gradient(135deg, rgba(17,29,49,.96), rgba(13,22,37,.95)) !important;
}
body.light .tournament-stage-card,
body.light .tournament-link-card{
  background:
    radial-gradient(circle at top right, rgba(88,183,255,.18), transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(244,248,255,.97)) !important;
}
.tournament-card-row{
  background:linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.03)) !important;
  border-left:4px solid rgba(255,216,77,.5);
}
.open-tournament-profile{cursor:pointer}
.open-tournament-profile:focus-visible{outline:2px solid rgba(88,183,255,.75);outline-offset:2px}
.tournament-card-status.is-active,
.ok-chip,
.status-active{
  background:rgba(99,210,120,.16) !important;
  border-color:rgba(99,210,120,.28) !important;
  color:#9af5aa !important;
}
.tournament-card-status.is-finished,
.status-inactive{
  background:rgba(255,255,255,.09) !important;
}
.stand-table,
.round-block,
.workspace-panel{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)) !important;
  border:1px solid rgba(255,255,255,.10) !important;
}
.match-state.is-finished,
.round-count.done{
  background:rgba(99,210,120,.16) !important;
  color:#9af5aa !important;
  border:1px solid rgba(99,210,120,.26) !important;
}
.match-state.is-scheduled{
  background:rgba(88,183,255,.14) !important;
  color:#93d4ff !important;
  border:1px solid rgba(88,183,255,.24) !important;
}
.empty-clean-state{
  background:linear-gradient(135deg, rgba(88,183,255,.08), rgba(255,216,77,.06));
  border:1px dashed rgba(255,255,255,.16);
}
.main-search input,
.drawer-search input,
input,select,textarea{
  border:1px solid rgba(255,255,255,.12) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}
body.light .main-search input,
body.light .drawer-search input,
body.light input,
body.light select,
body.light textarea{
  border-color:rgba(86,117,170,.18) !important;
}
.desktop-nav-btn.active,
.bottom-btn.active,
.drawer-link.active{
  background:linear-gradient(135deg, rgba(255,216,77,.20), rgba(88,183,255,.14)) !important;
  border-color:rgba(255,216,77,.18) !important;
}
#kragujView .compact-card:first-child{
  background:
    radial-gradient(circle at top right, rgba(255,216,77,.18), transparent 28%),
    linear-gradient(135deg, rgba(18,32,52,.98), rgba(12,22,39,.96)) !important;
}
body.light #kragujView .compact-card:first-child{
  background:
    radial-gradient(circle at top right, rgba(255,216,77,.16), transparent 26%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(243,248,255,.98)) !important;
}
@media (max-width:760px){
  .presentation-ribbon{padding:12px 13px;border-radius:18px}
  .presentation-ribbon-copy strong{font-size:.92rem}
  .presentation-ribbon-copy small{font-size:.78rem}
  .home-stage{padding:13px !important}
  .tournament-stage-card,.tournament-link-card,.tournament-card-row{border-radius:20px !important}
}



/* v63 compact serious flow */
.kr-shell-v50,
.kraguj-shell-compact{
  gap:12px !important;
}
.top-summary-card,
.compact-card.slim-card{
  padding:12px 12px 10px !important;
  border-radius:18px !important;
}
.desktop-summary-wide{
  padding:12px !important;
}
.score-badge{
  font-size:.72rem !important;
  padding:5px 8px !important;
  border-radius:999px !important;
}
.top-summary-card h2{
  margin:2px 0 4px !important;
  font-size:1.18rem !important;
  line-height:1.1 !important;
}
.muted-inline{
  font-size:.74rem !important;
  line-height:1.25 !important;
}
.micro-info-row.micro-info-grid-tight{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:8px !important;
}
.micro-info-chip{
  min-height:0 !important;
  padding:8px 9px !important;
  border-radius:13px !important;
}
.micro-info-chip span{
  font-size:.62rem !important;
}
.micro-info-chip strong{
  font-size:.96rem !important;
}
.pill-tab{
  padding:9px 12px !important;
  border-radius:14px !important;
  font-size:.82rem !important;
}
.kraguj-tabs{
  gap:8px !important;
}
.participant-row,.item-row,.player-row,.match-row,.compact-match-row{
  min-height:60px !important;
}
.compact-player-row{
  padding:7px 8px !important;
}
.item-title{
  font-size:.92rem !important;
  line-height:1.15 !important;
}
.item-meta{
  font-size:.74rem !important;
  line-height:1.2 !important;
}
.primary-action.small,
.ghost-small,
.danger-small{
  min-height:34px !important;
  padding:8px 11px !important;
  border-radius:11px !important;
  font-size:.8rem !important;
}
.inline-head.tight-head{
  margin-bottom:4px !important;
}
.empty-clean-state{
  padding:12px !important;
}
.empty-clean-state strong{
  font-size:.95rem !important;
}
.empty-clean-state small{
  font-size:.76rem !important;
  line-height:1.25 !important;
}
.compact-list{
  gap:8px !important;
}
.desktop-schedule-list .compact-match-row,
.kr-scroll-list .compact-match-row{
  padding:9px 10px !important;
}
.player-chip{
  padding:5px 8px !important;
  font-size:.76rem !important;
  border-radius:999px !important;
}
.main-search input,
.kr-top-select select,
.kr-picker-filters select{
  min-height:40px !important;
  font-size:.92rem !important;
}
.kr-top-select{
  gap:8px !important;
}
.tournament-stage-card,
.tournament-link-card,
.tournament-empty-card{
  padding:12px !important;
}
.tournament-stage-copy h2{
  font-size:1.18rem !important;
  line-height:1.1 !important;
  margin:4px 0 8px !important;
}
.tournament-stage-copy p,
.tournament-link-copy small{
  font-size:.78rem !important;
  line-height:1.32 !important;
}
.tournament-stage-stats{
  gap:8px !important;
}
.tournament-mini-stat{
  min-height:72px !important;
  padding:10px !important;
}
.tournament-mini-stat strong{
  font-size:1rem !important;
}
@media (max-width: 820px){
  .micro-info-row.micro-info-grid-tight{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .kr-top-select{
    grid-template-columns:1fr auto !important;
  }
  .top-summary-card h2{
    font-size:1.08rem !important;
  }
  .participant-row,.item-row,.player-row,.match-row,.compact-match-row{
    min-height:54px !important;
  }
}


/* v67 command center */
.rmcc-shell{display:grid;gap:12px}
.rmcc-hero{padding:14px;display:grid;gap:12px;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);position:relative;overflow:hidden}
.rmcc-hero::before{content:"";position:absolute;inset:auto -120px -120px auto;width:240px;height:240px;background:radial-gradient(circle,rgba(95,108,255,.24),transparent 62%);pointer-events:none}
.rmcc-hero-main,.rmcc-hero-side{position:relative;z-index:1}
.rmcc-kicker-wrap{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px}
.rmcc-kicker{background:rgba(32,211,161,.14);color:#b7ffe8}
.rmcc-kicker-secondary{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;background:rgba(95,108,255,.16);color:#c9ceff;font-size:.74rem;font-weight:800}
.rmcc-title-row{display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px;align-items:start}
.rmcc-title-icon{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;font-size:1.6rem;background:linear-gradient(135deg,rgba(95,108,255,.24),rgba(32,211,161,.18));border:1px solid var(--line)}
.rmcc-title-row h1{margin:0;font-size:1.48rem;line-height:1.02}
.rmcc-title-row p{margin:6px 0 0;color:var(--muted);font-size:.88rem;line-height:1.4}
.rmcc-cta-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:2px}
.rmcc-main-cta,.rmcc-ghost-cta{min-height:42px}
.rmcc-hero-side{display:grid;gap:10px;align-content:start}
.rmcc-time-card,.rmcc-mini-pulse,.rmcc-side-card,.rmcc-stat-card,.rmcc-module-card,.rmcc-linked-card,.rmcc-event-card,.rmcc-chip{background:rgba(255,255,255,.04);border:1px solid var(--line);box-shadow:0 10px 28px rgba(0,0,0,.12)}
.rmcc-time-card{padding:12px 14px;border-radius:20px;display:grid;gap:4px;background:linear-gradient(180deg,rgba(95,108,255,.16),rgba(18,28,49,.92))}
.rmcc-time-card span{font-size:.72rem;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.rmcc-time-card strong{font-size:1.42rem;line-height:1;font-weight:900}
.rmcc-time-card small{font-size:.82rem;color:var(--muted)}
.rmcc-mini-pulse{display:grid;gap:8px;padding:11px 12px;border-radius:18px}
.rmcc-mini-pulse div{display:grid;gap:2px}
.rmcc-mini-pulse span{font-size:.7rem;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.rmcc-mini-pulse strong{font-size:.9rem;line-height:1.25}
.rmcc-stats-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.rmcc-stat-card{padding:12px 13px;border-radius:18px;display:grid;gap:6px}
.rmcc-stat-card span{font-size:.72rem;color:var(--muted);text-transform:uppercase;letter-spacing:.07em}
.rmcc-stat-card strong{font-size:1.34rem;line-height:1;font-weight:900}
.rmcc-stat-card.tone-cyan{background:linear-gradient(180deg,rgba(0,194,255,.16),rgba(255,255,255,.04))}
.rmcc-stat-card.tone-violet{background:linear-gradient(180deg,rgba(124,104,255,.18),rgba(255,255,255,.04))}
.rmcc-stat-card.tone-emerald{background:linear-gradient(180deg,rgba(32,211,161,.18),rgba(255,255,255,.04))}
.rmcc-stat-card.tone-orange{background:linear-gradient(180deg,rgba(255,153,51,.16),rgba(255,255,255,.04))}
.rmcc-stat-card.tone-pink{background:linear-gradient(180deg,rgba(239,92,121,.16),rgba(255,255,255,.04))}
.rmcc-stat-card.tone-amber{background:linear-gradient(180deg,rgba(244,201,93,.16),rgba(255,255,255,.04))}
.rmcc-main-grid{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(320px,.82fr);gap:12px;align-items:start}
.rmcc-board{padding:14px;display:grid;gap:12px}
.rmcc-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.rmcc-panel-head.compact{display:grid;gap:3px}
.rmcc-panel-head h2,.rmcc-panel-head h3{margin:0;font-size:1rem}
.rmcc-panel-head p{margin:4px 0 0;color:var(--muted);font-size:.8rem;line-height:1.35}
.rmcc-chip-row{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.rmcc-chip{padding:8px 10px;border-radius:999px;display:grid;gap:1px;background:rgba(255,255,255,.05)}
.rmcc-chip em{font-style:normal;color:var(--muted);font-size:.67rem;text-transform:uppercase;letter-spacing:.08em}
.rmcc-chip strong{font-size:.86rem}
.rmcc-module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.rmcc-module-card{padding:12px;border-radius:18px;display:grid;gap:5px;text-align:left;color:var(--text);cursor:pointer;transition:transform .14s ease,border-color .14s ease,background .14s ease}
.rmcc-module-card:hover{transform:translateY(-1px);border-color:var(--line-2);background:rgba(255,255,255,.06)}
.rmcc-module-card-static{cursor:pointer}
.rmcc-module-icon{width:38px;height:38px;border-radius:14px;display:grid;place-items:center;background:rgba(255,255,255,.06);font-size:1.05rem}
.rmcc-module-card strong{font-size:.92rem;line-height:1.2}
.rmcc-module-card small{color:var(--muted);font-size:.76rem;line-height:1.35}
.rmcc-linked-card{padding:12px;border-radius:18px;background:linear-gradient(135deg,rgba(95,108,255,.12),rgba(32,211,161,.08))}
.rmcc-linked-card strong{display:block;font-size:.94rem;line-height:1.3}
.rmcc-linked-card p{margin:5px 0 0;color:var(--muted);font-size:.8rem;line-height:1.4}
.rmcc-event-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.rmcc-event-card{padding:11px 12px;border-radius:16px;display:grid;gap:4px}
.rmcc-event-card strong{font-size:.88rem;line-height:1.25}
.rmcc-event-card small{font-size:.74rem;color:var(--muted);line-height:1.35}
.rmcc-activity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.rmcc-feed-card{padding:12px;border-radius:18px;background:rgba(255,255,255,.04);border:1px solid var(--line);box-shadow:0 10px 28px rgba(0,0,0,.12);display:grid;gap:10px}
.rmcc-feed-list{display:grid;gap:8px}
.rmcc-feed-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 11px;border-radius:15px;border:1px solid var(--line);background:rgba(255,255,255,.04);cursor:pointer;transition:transform .14s ease,border-color .14s ease,background .14s ease}
.rmcc-feed-row:hover{transform:translateY(-1px);border-color:var(--line-2);background:rgba(255,255,255,.06)}
.rmcc-feed-main{min-width:0;display:grid;gap:3px}
.rmcc-feed-main strong{font-size:.84rem;line-height:1.28}
.rmcc-feed-main small{font-size:.73rem;color:var(--muted);line-height:1.35}
.rmcc-feed-side{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.rmcc-side-grid{display:grid;gap:12px}
.rmcc-side-card{padding:13px;display:grid;gap:12px}
.rmcc-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.rmcc-quick-grid button,.rmcc-tool-grid span{border:1px solid var(--line);background:rgba(255,255,255,.05);color:var(--text);border-radius:15px;padding:10px 11px;text-align:left;font-weight:800;cursor:pointer}
.rmcc-quick-grid button:hover{background:rgba(255,255,255,.08)}
.rmcc-tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.rmcc-tool-grid span{font-size:.78rem;color:var(--muted);font-weight:700}
.rmcc-calc-wrap,.rmcc-note-wrap{display:grid;gap:6px}
.rmcc-calc-wrap label,.rmcc-note-wrap label{font-size:.76rem;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
#rmccCalcInput,#rmccNote{width:100%;border-radius:14px;border:1px solid var(--line-2);background:var(--bg-2);color:var(--text);padding:10px 12px;outline:none}
#rmccNote{resize:vertical;min-height:96px}
.rmcc-calc-result{min-height:42px;display:flex;align-items:center;padding:0 12px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.04);font-weight:800}
.rmcc-role-list{display:grid;gap:8px}
.rmcc-role-row{padding:10px 11px;border-radius:16px;border:1px solid var(--line);background:rgba(255,255,255,.04);display:grid;gap:4px}
.rmcc-role-row strong{font-size:.84rem;line-height:1.25}
.rmcc-role-row small{font-size:.74rem;color:var(--muted);line-height:1.35}
.rmcc-public-card{background:linear-gradient(135deg,rgba(95,108,255,.16),rgba(32,211,161,.10))}
.rmcc-public-card h3{margin:0;font-size:1rem}
.rmcc-public-card p{margin:0;color:var(--muted);font-size:.8rem;line-height:1.4}
.rmcc-public-kicker{width:max-content}
body.light .rmcc-time-card,body.light .rmcc-mini-pulse,body.light .rmcc-side-card,body.light .rmcc-stat-card,body.light .rmcc-module-card,body.light .rmcc-linked-card,body.light .rmcc-event-card,body.light .rmcc-chip,body.light .rmcc-quick-grid button,body.light .rmcc-tool-grid span,body.light .rmcc-role-row,body.light .rmcc-calc-result{background:rgba(255,255,255,.78)}
@media (max-width: 1180px){.rmcc-hero{grid-template-columns:1fr}.rmcc-main-grid{grid-template-columns:1fr}}
@media (max-width: 920px){.rmcc-stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.rmcc-event-strip,.rmcc-activity-grid{grid-template-columns:1fr}}
@media (max-width: 640px){.rmcc-shell{gap:10px}.rmcc-hero,.rmcc-board,.rmcc-side-card{padding:12px}.rmcc-title-row{grid-template-columns:46px minmax(0,1fr);gap:10px}.rmcc-title-icon{width:46px;height:46px;border-radius:15px;font-size:1.3rem}.rmcc-title-row h1{font-size:1.18rem}.rmcc-title-row p{font-size:.8rem}.rmcc-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.rmcc-module-grid,.rmcc-quick-grid,.rmcc-tool-grid{grid-template-columns:1fr}.rmcc-panel-head{display:grid}.rmcc-chip-row{justify-content:flex-start}.rmcc-cta-row{display:grid;grid-template-columns:1fr 1fr}.rmcc-main-cta{grid-column:1/-1}}


.bottom-nav.bottom-nav-6{grid-template-columns:repeat(6,1fr);}
@media (max-width:540px){
  .bottom-nav.bottom-nav-6{gap:3px;}
  .bottom-nav.bottom-nav-6 .bottom-btn em{font-size:.62rem;}
}
.registry-shell{display:grid;gap:10px;}
.registry-stage-card{display:grid;gap:12px;background:linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,.04));border:1px solid rgba(255,255,255,.12);}
.registry-stage-card.club-tone{background:linear-gradient(180deg,rgba(32,211,161,.14),rgba(255,255,255,.04));}
.registry-stage-card.referee-tone{background:linear-gradient(180deg,rgba(95,108,255,.16),rgba(255,255,255,.04));}
.registry-stage-copy h2{margin:4px 0 6px;font-size:1.08rem;line-height:1.15;}
.registry-stage-copy p{margin:0;color:var(--muted);font-size:.8rem;line-height:1.35;}
.registry-stage-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
.registry-mini-stat{padding:10px 11px;border-radius:16px;background:var(--chip);border:1px solid var(--line);display:grid;gap:4px;}
.registry-mini-stat span{font-size:.72rem;color:var(--muted);}
.registry-mini-stat strong{font-size:1rem;line-height:1;font-weight:900;}
.registry-list-grid{display:grid;gap:8px;}
.registry-row-card{display:grid;grid-template-columns:40px 1fr;gap:10px;align-items:start;padding:11px 12px;border-radius:16px;background:var(--chip);border:1px solid var(--line);}
.registry-row-card-compact{grid-template-columns:40px 1fr auto;}
.registry-row-card.open-player{cursor:pointer;transition:transform .16s ease,border-color .16s ease,background .16s ease;}
.registry-row-card.open-player:hover{transform:translateY(-1px);border-color:rgba(95,108,255,.35);}
.registry-row-index{width:32px;height:32px;border-radius:999px;display:grid;place-items:center;background:rgba(95,108,255,.14);border:1px solid rgba(95,108,255,.22);font-size:.78rem;font-weight:900;}
.registry-row-main{display:grid;gap:5px;min-width:0;}
.registry-row-head{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.registry-row-head strong{font-size:.92rem;line-height:1.2;}
.registry-row-meta{font-size:.74rem;color:var(--muted);line-height:1.25;}
.registry-row-meta.emphasis{color:var(--text);font-weight:700;}
.registry-chip-row{display:flex;gap:6px;flex-wrap:wrap;}
.registry-chip{display:inline-flex;align-items:center;gap:4px;padding:6px 9px;border-radius:999px;border:1px solid var(--line);font-size:.71rem;font-weight:800;background:var(--panel);}
.registry-chip.ok{background:rgba(32,211,161,.14);color:#9ff3db;border-color:rgba(32,211,161,.22);}
.registry-chip.violet{background:rgba(95,108,255,.14);color:#d4dcff;border-color:rgba(95,108,255,.22);}
.registry-chip.amber{background:rgba(244,201,93,.14);color:#ffe598;border-color:rgba(244,201,93,.22);}
.registry-chip.muted{color:var(--muted);}
.registry-open-text{font-size:.74rem;color:var(--muted);font-weight:800;white-space:nowrap;}
.registry-danger-wrap{display:flex;align-items:center;justify-content:flex-end;}
.registry-empty{padding:14px;border-radius:16px;background:var(--chip);border:1px dashed var(--line);color:var(--muted);font-size:.82rem;}
@media (max-width:760px){.registry-stage-stats{grid-template-columns:repeat(2,1fr);}}
@media (max-width:540px){.registry-row-card,.registry-row-card-compact{grid-template-columns:36px 1fr;}.registry-danger-wrap{grid-column:2;justify-content:flex-start;}.registry-stage-copy h2{font-size:1rem;}.registry-stage-copy p{font-size:.78rem;}}

.player-profile-head{display:grid;gap:10px;}
.player-profile-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.player-match-list .workspace-row{cursor:pointer;}
.player-match-list .workspace-row:hover{border-color:rgba(95,108,255,.32);transform:translateY(-1px);}
.open-club-player .workspace-row,.open-club-match .workspace-row{cursor:pointer;}

.club-profile-player-list .workspace-row,.club-profile-match-list .workspace-row{cursor:pointer;}
.club-profile-player-list .workspace-row:hover,.club-profile-match-list .workspace-row:hover{border-color:rgba(95,108,255,.32);transform:translateY(-1px);}


.mini-chip{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;background:var(--bg-2);border:1px solid var(--line-2);font-size:.74rem;font-weight:800;color:var(--muted-strong);white-space:nowrap}
.warn-chip{color:#ffb54a;border-color:rgba(255,181,74,.28);background:rgba(255,181,74,.12)}
.danger-chip{color:#ff6f7f;border-color:rgba(255,111,127,.28);background:rgba(255,111,127,.12)}
.rmcc-feed-side{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.rmcc-feed-main strong{display:block}
.rmcc-feed-main small{display:block;color:var(--muted);line-height:1.35}
.rmcc-activity-grid{grid-template-columns:repeat(3,minmax(0,1fr))}


.clean-home-fallback .hero-stats-strip{margin-bottom:0}

.rmcc-nav-row{width:100%;text-align:left;background:transparent;border:1px solid rgba(255,255,255,.08);border-radius:18px;cursor:pointer}.rmcc-nav-row:hover{border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.04)}


.build-pill{display:inline-flex;align-items:center;justify-content:center;width:max-content;margin-top:4px;padding:4px 9px;border-radius:999px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:var(--muted);font-size:.66rem;font-weight:900;letter-spacing:.04em}
.build-pill.desktop{margin-top:8px}
.build-pill.fallback{margin-left:auto}
.rmcc-version-chip{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.08);font-size:.69rem;font-weight:900;color:#d7ddff}
.rmcc-event-snapshot{display:grid;gap:10px;margin-top:12px}
.rmcc-event-strip.rich{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.rmcc-event-card.rich{padding:12px;border-radius:18px;border:1px solid var(--line);background:rgba(255,255,255,.05);display:grid;gap:8px;cursor:pointer;transition:transform .16s ease,border-color .16s ease,background .16s ease}
.rmcc-event-card.rich:hover{transform:translateY(-1px);border-color:rgba(95,108,255,.35);background:rgba(255,255,255,.07)}
.rmcc-event-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.rmcc-event-card.rich strong{font-size:.92rem;line-height:1.2}
.rmcc-event-card.rich small{display:block;color:var(--muted);line-height:1.35}
.rmcc-event-metrics{display:flex;flex-wrap:wrap;gap:6px}
.rmcc-event-metrics span{display:inline-flex;align-items:center;padding:6px 9px;border-radius:999px;background:var(--bg-2);border:1px solid var(--line-2);font-size:.68rem;font-weight:800;color:var(--muted-strong)}
.rmcc-event-open{font-size:.74rem;font-weight:900;color:#d7ddff}
.rmcc-build-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;border-radius:16px;border:1px solid var(--line);background:rgba(255,255,255,.04)}
.rmcc-build-row span{font-size:.72rem;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.rmcc-build-row strong{font-size:.78rem;line-height:1.25;color:var(--text)}
@media (max-width: 920px){.rmcc-event-strip.rich{grid-template-columns:1fr}}


.bottom-nav.bottom-nav-7{grid-template-columns:repeat(7,1fr);} 
@media (max-width:540px){.bottom-nav.bottom-nav-7{gap:3px;}.bottom-nav.bottom-nav-7 .bottom-btn em{font-size:.6rem;}}

.event-shell-v21{display:grid;gap:12px;}
.event-stage-card,.event-focus-card,.event-card-row{display:grid;gap:10px;}
.event-card-list{display:grid;gap:12px;}
.event-profile-card{display:grid;gap:10px;}
.event-tournament-list{max-height:38dvh;overflow:auto;padding-right:4px;}
@media (min-width:980px){.event-card-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;} .event-focus-card,.event-stage-card{max-width:1020px;margin:0 auto;} }


/* v2.1a home cleanup */
.home-simple-shell{display:grid;gap:12px;max-width:960px;margin:0 auto;}
.home-entry-card{padding:16px;display:grid;gap:14px;}
.home-entry-top{display:grid;grid-template-columns:minmax(0,1fr) 56px;gap:14px;align-items:start;}
.home-entry-top h1{margin:8px 0 4px;font-size:1.5rem;line-height:1.05;}
.home-entry-top p{margin:0;color:var(--muted);line-height:1.45;}
.home-current-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.home-current-box{padding:13px 14px;border-radius:18px;background:rgba(255,255,255,.04);border:1px solid var(--line);display:grid;gap:4px;}
.home-current-box span{font-size:.72rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;font-weight:800;}
.home-current-box strong{font-size:1rem;line-height:1.2;}
.home-current-box small{color:var(--muted);line-height:1.35;}
.home-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.home-stat-card{padding:14px 12px;border-radius:18px;background:rgba(255,255,255,.04);border:1px solid var(--line);text-align:left;color:var(--text);display:grid;gap:6px;cursor:pointer;}
.home-stat-card span{font-size:.74rem;color:var(--muted);font-weight:700;}
.home-stat-card strong{font-size:1.2rem;line-height:1;font-weight:900;}
.home-links-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:960px;margin:0 auto;}
.home-link-card{padding:14px 14px;border-radius:20px;background:rgba(255,255,255,.04);border:1px solid var(--line);display:grid;gap:6px;text-align:left;color:var(--text);cursor:pointer;}
.home-link-card strong{font-size:1rem;line-height:1.2;}
.home-link-card small{color:var(--muted);line-height:1.35;}
.home-link-card span{font-size:1.1rem;color:var(--muted);font-weight:900;}
.drawer-tools{display:grid;gap:8px;}
.drawer-group-title{color:var(--muted);font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;padding:0 2px;}
.drawer-utility-grid{display:grid;gap:8px;}
@media (max-width:760px){
  .home-entry-card{padding:14px;}
  .home-entry-top{grid-template-columns:minmax(0,1fr) 46px;gap:10px;}
  .home-entry-top h1{font-size:1.22rem;}
  .home-current-strip{grid-template-columns:1fr;}
  .home-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .home-links-grid{grid-template-columns:1fr;gap:8px;}
}


/* v2.1b ui fix */
.section-panel:not(.active){display:none !important;}
#section-home.active,
#section-events.active,
#section-kraguj.active,
#section-tournaments.active,
#section-players.active,
#section-clubs.active,
#section-referees.active{display:grid !important;}
.home-entry-top.simple{grid-template-columns:1fr;gap:0;}
.home-brand-row.simple{grid-template-columns:44px minmax(0,1fr);align-items:center;gap:12px;}
.home-brand-copy.simple h1{margin:0;font-size:1.42rem;line-height:1.05;}
.home-link-card{grid-template-columns:minmax(0,1fr) auto;align-items:center;}
.home-link-card small{display:none !important;}
.home-current-box small{display:none !important;}
.home-entry-top p,.home-title-muted{display:none !important;}
@media (max-width:760px){
  .mobile-header.slim{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:10px;align-items:center;}
  .mobile-header .build-pill{display:none !important;}
  .mobile-header .brand-subname{display:none !important;}
  .mobile-header .brand-inline.compact{max-width:none !important;min-width:0;}
  .mobile-header .brand-name{font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .mobile-header .header-actions{gap:6px;}
  .mobile-header .icon-btn,.mobile-header .lang-btn{width:40px;height:40px;min-width:40px;}
  .mobile-header .lang-btn{padding:0 8px;font-weight:800;}
  .home-simple-shell{gap:10px;}
  .home-entry-card{padding:14px !important;}
  .home-brand-row.simple{grid-template-columns:40px minmax(0,1fr);gap:10px;}
  .home-brand-copy.simple h1{font-size:1.18rem;}
}


/* v2.1c section stability + home polish */
.home-home-subtitle{color:var(--muted);font-size:.92rem;line-height:1.4;font-weight:600;}
.home-current-box small{display:block;margin-top:6px;color:var(--muted);font-size:.78rem;}
.home-simple-shell{max-width:1220px;margin:0 auto;display:grid;gap:18px;width:100%;}
.home-entry-card{padding:22px;display:grid;gap:18px;}
.home-current-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.home-current-box{padding:16px 18px;border-radius:22px;background:rgba(255,255,255,.04);border:1px solid var(--line);display:grid;gap:6px;}
.home-current-box span{font-size:.76rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;font-weight:800;}
.home-current-box strong{font-size:1.18rem;line-height:1.2;}
.home-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.home-stat-card{padding:16px 18px;border-radius:22px;background:rgba(255,255,255,.04);border:1px solid var(--line);display:grid;gap:8px;color:var(--text);text-align:left;cursor:pointer;}
.home-stat-card:hover,.home-link-card:hover{border-color:rgba(255,255,255,.18);transform:translateY(-1px);}
.home-stat-card span{font-size:.76rem;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.06em;}
.home-stat-card strong{font-size:1.4rem;line-height:1;font-weight:900;}
.home-links-grid{max-width:1220px;margin:0 auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:100%;}
.home-link-card{padding:18px 18px;border-radius:22px;background:rgba(255,255,255,.04);border:1px solid var(--line);display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;text-align:left;color:var(--text);cursor:pointer;}
.home-link-card strong{font-size:1rem;line-height:1.25;}
.home-link-card span{font-size:1.15rem;color:var(--muted);font-weight:900;}
@media (min-width:1100px){
  .mobile-header{display:none !important;}
  .app-main{padding:20px 24px 30px;}
  .content{max-width:none !important;width:100%;}
  #section-home.active{display:block !important;}
  .home-simple-shell{grid-template-columns:minmax(0,1.2fr) minmax(420px,.8fr);align-items:start;}
  .home-entry-card{min-height:100%;}
  .home-links-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;}
}
@media (max-width:1099px){
  .home-simple-shell{max-width:920px;}
  .home-links-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:760px){
  .home-entry-card{padding:16px;gap:14px;}
  .home-current-strip{grid-template-columns:1fr;}
  .home-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .home-links-grid{grid-template-columns:1fr;gap:10px;max-width:100%;}
  .home-current-box,.home-stat-card,.home-link-card{border-radius:18px;}
  .home-stat-card,.home-link-card{padding:14px;}
  .brand-subname{display:none !important;}
  .brand-inline.compact{max-width:calc(100% - 96px);}
  .header-actions{gap:6px;}
  .lang-btn,.icon-btn{min-width:38px;width:38px;height:38px;}
}


/* v2.1d sofascore compact desktop */
@media (min-width: 980px){
  :root{
    --desktop-rail-width: 228px;
  }
  body{font-size:14px;}
  .app-shell.desktop-ready{max-width:none !important;width:100%;padding:12px 14px 18px !important;grid-template-columns:228px minmax(0,1fr) !important;gap:14px !important;}
  .desktop-rail{width:228px;min-height:calc(100dvh - 24px);padding:12px 10px;border-radius:22px;top:12px;}
  .desktop-rail-brand{grid-template-columns:34px minmax(0,1fr);gap:8px;}
  .desktop-rail-brand strong{font-size:.92rem;}
  .desktop-rail-brand small{font-size:.72rem;line-height:1.2;}
  .desktop-rail-nav{gap:6px;}
  .desktop-nav-btn,.desktop-side-btn{min-height:40px;padding:8px 10px;border-radius:14px;font-size:.82rem;}
  .desktop-nav-btn span{font-size:.92rem;}
  .app-main{padding:0 !important;}
  .mobile-header{display:none !important;}
  .content{max-width:none !important;width:100% !important;gap:10px !important;}
  #mainToolbar, #section-home.active, #section-events.active, #section-kraguj.active, #section-tournaments.active, #section-players.active, #section-clubs.active, #section-referees.active{max-width:none !important;width:100% !important;margin:0 !important;}
  #playerList,#clubList,#refereeList,#tournamentList,#eventList,#kragujView{max-width:none !important;width:100% !important;margin:0 !important;}
  .section-toolbar{padding:8px 10px;border-radius:16px;position:sticky;top:8px;z-index:8;}
  .toolbar-row{gap:10px;}
  .main-search{min-height:38px;border-radius:13px;padding:0 12px;max-width:none !important;}
  .toolbar-add{min-width:102px;min-height:38px;padding:7px 10px;border-radius:12px;font-size:.76rem;}

  .home-simple-shell.sofascore-home-shell{max-width:none !important;grid-template-columns:minmax(0,1.2fr) 320px !important;gap:12px !important;align-items:start;}
  .sofascore-hero-card{padding:12px !important;gap:10px !important;border-radius:18px !important;}
  .home-brand-row.simple{grid-template-columns:40px minmax(0,1fr);gap:10px;}
  .home-brand-copy.simple h1{font-size:1.14rem !important;}
  .home-home-subtitle{font-size:.76rem !important;line-height:1.25 !important;}
  .sofascore-current-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px !important;}
  .home-current-box{padding:10px 11px !important;border-radius:14px !important;gap:3px !important;}
  .home-current-box span{font-size:.64rem !important;}
  .home-current-box strong{font-size:.9rem !important;}
  .home-current-box small{font-size:.7rem !important;margin-top:2px !important;}
  .sofascore-stat-grid{grid-template-columns:repeat(6,minmax(0,1fr)) !important;gap:8px !important;}
  .home-stat-card{padding:10px 10px !important;border-radius:14px !important;gap:4px !important;}
  .home-stat-card span{font-size:.64rem !important;}
  .home-stat-card strong{font-size:.92rem !important;}
  .sofascore-home-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important;max-width:none !important;}
  .home-link-card{padding:10px 11px !important;border-radius:14px !important;}
  .home-link-card strong{font-size:.84rem !important;}
  .home-link-card span{font-size:.92rem !important;}
  .sofascore-side-card{padding:12px !important;border-radius:18px !important;display:grid;gap:12px;}
  .home-side-block{display:grid;gap:8px;}
  .home-side-title{font-size:.72rem;color:var(--muted);font-weight:900;text-transform:uppercase;letter-spacing:.05em;}
  .home-side-list{display:grid;gap:6px;}
  .home-side-row{width:100%;padding:9px 10px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--text);text-align:left;display:grid;gap:3px;cursor:pointer;}
  .home-side-row strong{font-size:.82rem;line-height:1.2;}
  .home-side-row small{font-size:.68rem;color:var(--muted);line-height:1.2;}
  .home-side-empty{padding:9px 10px;border-radius:12px;border:1px dashed var(--line);font-size:.72rem;color:var(--muted);}

  .registry-shell,.tournament-shell-v54,.event-shell-v21,.kr-shell-v50,.kraguj-shell-compact{max-width:none !important;width:100% !important;margin:0 !important;gap:8px !important;}
  .registry-stage-card,.tournament-stage-card,.event-stage-card,.compact-card,.top-summary-card,.compact-card.slim-card{padding:10px 12px !important;border-radius:16px !important;gap:8px !important;}
  .registry-stage-copy h2,.tournament-stage-copy h2,.event-stage-copy h2,.top-summary-card h2,.compact-simple-head h3,.inline-head h2{font-size:.96rem !important;line-height:1.15 !important;margin:0 !important;}
  .registry-stage-copy p,.tournament-stage-copy p,.event-stage-copy p,.muted-inline,.home-title-muted{font-size:.72rem !important;line-height:1.25 !important;}
  .registry-stage-stats,.tournament-stage-stats,.micro-info-row.micro-info-grid-tight,.desktop-summary-grid{gap:6px !important;grid-template-columns:repeat(4,minmax(0,1fr)) !important;}
  .registry-mini-stat,.tournament-mini-stat,.micro-info-chip{padding:8px 9px !important;border-radius:12px !important;min-height:0 !important;}
  .registry-mini-stat span,.tournament-mini-stat span,.micro-info-chip span{font-size:.64rem !important;}
  .registry-mini-stat strong,.tournament-mini-stat strong,.micro-info-chip strong{font-size:.86rem !important;}

  .registry-list-grid,.event-card-list,.tournament-card-list,.compact-list,.workspace-list{gap:6px !important;}
  .registry-row-card,.registry-row-card-compact{grid-template-columns:26px minmax(0,1fr) auto !important;gap:8px !important;align-items:center !important;padding:8px 10px !important;border-radius:13px !important;min-height:0 !important;}
  .registry-row-index{width:22px !important;height:22px !important;font-size:.66rem !important;}
  .registry-row-head strong{font-size:.84rem !important;line-height:1.15 !important;}
  .registry-row-meta,.item-meta,.tiny-meta,.muted-inline,.workspace-main small{font-size:.7rem !important;line-height:1.18 !important;}
  .registry-chip-row,.item-actions,.mini-actions,.workspace-side{gap:5px !important;}
  .registry-chip,.status-chip,.icon-chip,.player-chip,.mini-chip,.tour-status-chip,.round-count,.match-state{padding:4px 7px !important;border-radius:999px !important;font-size:.64rem !important;min-height:0 !important;}
  .ghost-small,.danger-small,.primary-action.small,.icon-danger-btn{min-height:28px !important;padding:5px 9px !important;border-radius:10px !important;font-size:.7rem !important;}
  .primary-action{min-height:34px;padding:7px 11px;border-radius:12px;font-size:.76rem;}

  #playerList .registry-stage-card,#clubList .registry-stage-card,#refereeList .registry-stage-card,#tournamentList .tournament-stage-card,#eventList .event-stage-card{position:sticky;top:60px;z-index:5;}
  #playerList .player-row{grid-template-columns:24px minmax(0,1fr) auto !important;gap:8px !important;padding:8px 10px !important;border-radius:13px !important;min-height:0 !important;}
  .player-index{width:22px !important;height:22px !important;font-size:.66rem !important;}
  .player-main.compact-only .item-title,.item-title,.workspace-main strong,.tournament-card-row strong{font-size:.82rem !important;line-height:1.15 !important;}
  .player-main.compact-only .item-meta{font-size:.7rem !important;line-height:1.15 !important;}

  .tournament-card-row,.event-card-row,.workspace-row,.participant-row,.item-row,.match-row,.compact-match-row{padding:8px 10px !important;border-radius:13px !important;min-height:0 !important;gap:8px !important;}
  .tournament-card-grid{grid-template-columns:repeat(6,minmax(0,1fr)) !important;gap:6px !important;}
  .tournament-card-cell{padding:7px 8px !important;border-radius:12px !important;gap:2px !important;}
  .tournament-card-cell span{font-size:.62rem !important;}
  .tournament-card-cell strong{font-size:.76rem !important;line-height:1.15 !important;}
  .tournament-card-actions{gap:6px !important;}

  .kraguj-main-grid,.desktop-board-grid,.desktop-board-grid-day,.desktop-board-grid-table,.desktop-board-grid-history{grid-template-columns:minmax(0,1fr) 300px !important;gap:10px !important;align-items:start !important;}
  .participant-inline-list,.chip-list,.compact-chip-list{gap:4px !important;}
  .stand-head,.stand-line{padding:7px 8px !important;border-radius:12px !important;font-size:.72rem !important;}
  .match-team{font-size:.76rem !important;line-height:1.15 !important;}
}

@media (max-width: 979px){
  .home-side-rail{display:none !important;}
}

/* v2.2 event flow lock */
@media (max-width: 760px) {
  .mobile-header.slim {
    display:flex;
    align-items:center;
    justify-content:space-between;
  }
  .brand-inline.compact {
    flex:1 1 auto;
    max-width: calc(100% - 136px);
  }
  .brand-subname {
    display:none;
  }
  .header-actions {
    margin-left:auto;
    gap:6px;
  }
  .header-actions #menuBtn {
    order:3;
  }
}
.event-profile-card .item-actions {
  flex-wrap:wrap;
}
