/* Solo Cup Open — Organizer HQ */
:root {
  --pine: #0b2a1f;
  --pine-2: #103a2b;
  --fairway: #1f6b3a;
  --fairway-soft: #e8f3eb;
  --cup: #d7262e;
  --cup-deep: #a3121b;
  --cup-soft: #fdecec;
  --flag: #f5c518;
  --flag-soft: #fff6d6;
  --cream: #f6efe0;
  --bg: #f4f1ea;
  --card: #ffffff;
  --ink: #15211b;
  --muted: #66736b;
  --line: #e5e0d4;
  --line-2: #d6cfbf;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 42, 31, .05), 0 4px 14px rgba(11, 42, 31, .06);
  --shadow-lg: 0 10px 40px rgba(11, 42, 31, .2);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --side: 252px;
  --f-display: 'Anton', Impact, sans-serif;
  --f-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-body); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--fairway); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--flag); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Two-tone illustration icons (from /icons.js) */
.ic { display: inline-flex; width: 1.2em; height: 1.2em; flex: none; vertical-align: -.25em; color: var(--fairway); }
.ico { width: 100%; height: 100%; overflow: visible; }
.ico .s { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico .d { fill: var(--ico-fill, rgba(245, 197, 24, .5)); stroke: none; }
.ic.big { width: 56px; height: 56px; margin: 0 auto 10px; display: flex; --ico-fill: rgba(215, 38, 46, .18); }
.ic.banner-ic { width: 40px; height: 40px; }
.banner-danger .ic { color: var(--cup-deep); --ico-fill: rgba(215, 38, 46, .2); }
.with-ic { display: flex; align-items: center; gap: 10px; }
.with-ic .ic { width: 32px; height: 32px; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-spinner, .spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--fairway); animation: spin .8s linear infinite; }
.spin { width: 18px; height: 18px; border-width: 2.5px; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px; border: 0;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 14.5px; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--fairway); }
.btn-primary:hover { background: #185a30; }
.btn-cup { background: var(--cup); }
.btn-cup:hover { background: var(--cup-deep); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-danger { background: transparent; color: var(--cup); box-shadow: inset 0 0 0 1.5px #f2c2c4; }
.btn-danger:hover { background: var(--cup-soft); }
.btn-danger-solid { background: var(--cup); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--muted); transition: background .15s, color .15s; flex: none; }
.icon-btn:hover { background: #efebe1; color: var(--ink); }
.icon-btn.danger:hover { background: var(--cup-soft); color: var(--cup); }
.icon-btn:disabled { opacity: .3; pointer-events: none; }

/* ------------------------------------------------------------- Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 700; font-size: 14px; }
.help { color: var(--muted); font-size: 13px; line-height: 1.45; }
.input, .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2); background: #fff; font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--fairway); box-shadow: 0 0 0 4px rgba(31, 107, 58, .14); }
.field.changed input, .field.changed textarea, .field.changed select { border-color: var(--flag); background: #fffdf3; }
.img-field { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.img-prev { width: 120px; height: 120px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: #fbf9f4; display: grid; place-items: center; overflow: hidden; padding: 6px; }
.img-prev img { width: 100%; height: 100%; object-fit: contain; }
.img-prev .ic { width: 40px; height: 40px; color: var(--muted); }
.img-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.img-actions label.btn { cursor: pointer; }
.field.changed .img-prev { border-color: var(--flag); background: #fffdf3; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.form-grid .wide { grid-column: 1 / -1; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 50px; height: 30px; border-radius: 999px; background: #cfc8b8; position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.switch input:checked + .track { background: var(--fairway); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--flag); outline-offset: 2px; }

/* ------------------------------------------------------------- Login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: var(--pine); color: var(--cream); display: flex; flex-direction: column; justify-content: space-between; padding: 48px; position: relative; overflow: hidden; }
.auth-art::before { content: ''; position: absolute; inset: -20%; background: radial-gradient(50% 50% at 60% 40%, rgba(46, 139, 71, .5), transparent 70%), repeating-linear-gradient(112deg, #0f3527 0 80px, #0c2d21 80px 160px); z-index: 0; }
.auth-art > * { position: relative; }
.auth-art img { width: min(360px, 70%); margin: 0 auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .4)); }
.auth-art h1 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: 44px; line-height: 1; }
.auth-art p { opacity: .7; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-family: var(--f-display); font-weight: 400; font-size: 40px; text-transform: uppercase; line-height: 1; margin-bottom: 8px; }
.auth-box > p { color: var(--muted); margin-bottom: 28px; }
.auth-box form { display: grid; gap: 16px; }
.auth-back { display: inline-block; margin-top: 24px; color: var(--muted); font-size: 14px; }
.alert { padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500; }
.alert-error { background: var(--cup-soft); color: var(--cup-deep); }

/* ------------------------------------------------------------- Shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--side) 1fr; }
.side { position: sticky; top: 0; height: 100vh; background: var(--pine); color: var(--cream); display: flex; flex-direction: column; padding: 20px 14px; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; text-decoration: none; color: inherit; }
.side-brand img { width: 46px; height: 46px; }
.side-brand b { font-family: var(--f-display); font-weight: 400; font-size: 20px; text-transform: uppercase; display: block; line-height: 1.05; }
.side-brand small { font-size: 12px; opacity: .6; letter-spacing: .08em; text-transform: uppercase; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; border: 0; background: transparent; color: rgba(246, 239, 224, .75); font-weight: 500; font-size: 15px; text-align: left; text-decoration: none; transition: background .15s, color .15s; }
.nav-item:hover { background: rgba(246, 239, 224, .07); color: var(--cream); }
.nav-item.active { background: var(--cream); color: var(--pine); font-weight: 700; }
.nav-item .badge { margin-left: auto; background: var(--cup); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.side-foot { margin-top: auto; display: grid; gap: 6px; border-top: 1px solid rgba(246, 239, 224, .12); padding-top: 14px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--flag); color: var(--pine); display: grid; place-items: center; font-weight: 700; flex: none; }
.side-user .who { min-width: 0; font-size: 13.5px; line-height: 1.3; }
.side-user .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who span { opacity: .6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

.main { min-width: 0; padding: 32px clamp(16px, 3vw, 48px) 120px; width: 100%; max-width: 1560px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(32px, 4vw, 44px); text-transform: uppercase; line-height: 1; letter-spacing: .01em; }
.page-head p { color: var(--muted); margin-top: 6px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.topbar, .tabbar { display: none; }

/* ------------------------------------------------------------- Cards */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 24px; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.card-head h2 { font-size: 19px; }
.card-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > .card + .card { margin-top: 0; }

.banner { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--r); margin-bottom: 18px; flex-wrap: wrap; }
.banner .txt { flex: 1; min-width: 220px; }
.banner b { display: block; font-size: 15.5px; }
.banner span { font-size: 14px; }
.banner-warn { background: var(--flag-soft); box-shadow: inset 0 0 0 1.5px #f1dc8f; }
.banner-danger { background: var(--cup-soft); box-shadow: inset 0 0 0 1.5px #f2c2c4; color: var(--cup-deep); }


/* Overview */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat .k { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--f-display); font-size: 44px; line-height: 1.05; margin-top: 6px; }
.stat .v small { font-family: var(--f-body); font-size: 15px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.stat .s { font-size: 13px; color: var(--muted); }
.stat.hero { background: var(--pine); color: var(--cream); }
.stat.hero .k, .stat.hero .s { color: rgba(246, 239, 224, .65); }
.stat.hero .v { color: var(--flag); }
.bar { height: 6px; border-radius: 99px; background: #eee8da; margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--fairway); border-radius: inherit; }

.reg-status { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; }
.reg-status .dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; flex: none; margin-top: 5px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .6); }
.reg-status b { display: block; font-size: 15.5px; }
.reg-status p { font-size: 14px; color: var(--muted); margin-top: 2px; }
.reg-status .fix { margin-top: 10px; }
.reg-status.open { background: var(--fairway-soft); color: var(--fairway); }
.reg-status.closed { background: var(--cup-soft); color: var(--cup-deep); }
.reg-status b { color: inherit; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.open { background: var(--fairway-soft); color: var(--fairway); }
.status-pill.closed { background: var(--cup-soft); color: var(--cup-deep); }

.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick button, .quick a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; text-align: left; font-weight: 700; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .2s var(--ease); }
.quick button:hover, .quick a:hover { border-color: var(--fairway); transform: translateY(-1px); }
.quick .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--fairway-soft); color: var(--fairway); display: grid; place-items: center; flex: none; }
.quick small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list-plain li:first-child { border-top: 0; }
.list-plain .meta { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty .big { font-size: 40px; margin-bottom: 6px; }

/* Event form */
.group-nav { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.group-nav a { padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); font-weight: 500; font-size: 14px; white-space: nowrap; }
.savebar {
  position: fixed; left: calc(var(--side) + 24px); right: 24px; bottom: 20px; z-index: 30; max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
  transform: translateY(160%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s;
}
.savebar.show { transform: none; visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
.savebar .txt { flex: 1; font-weight: 500; }
.savebar .txt b { color: var(--flag); }
.savebar .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); }

/* Content lists */
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: #e9e4d8; gap: 2px; margin-bottom: 18px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg .count { font-weight: 500; opacity: .6; margin-left: 4px; }

.items { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); align-items: start; }
.item {
  display: grid; grid-template-columns: 28px 56px 1fr auto; gap: 12px; align-items: start;
  padding: 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line);
  transition: border-color .15s, box-shadow .2s, opacity .2s;
}
.item:focus-within { border-color: var(--fairway); box-shadow: 0 0 0 4px rgba(31, 107, 58, .08); }
.item.dragging { opacity: .4; }
.item.drop-above { box-shadow: 0 -3px 0 var(--fairway); }
.item.drop-below { box-shadow: 0 3px 0 var(--fairway); }
.handle { cursor: grab; color: #b9b1a0; display: grid; place-items: center; height: 46px; touch-action: none; }
.emoji-btn { width: 56px; height: 56px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: #fbf9f4; display: grid; place-items: center; padding: 11px; color: var(--muted); transition: border-color .15s, transform .2s var(--ease); }
.emoji-btn:hover { border-color: var(--fairway); transform: rotate(-6deg); }
.emoji-btn .ic { width: 100%; height: 100%; color: var(--pine); }
.emoji-btn > .i { width: 22px; height: 22px; }
.item-fields { display: grid; gap: 8px; min-width: 0; }
.item-fields .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.item-fields input, .item-fields textarea { width: 100%; border: 1.5px solid transparent; background: #f7f4ed; border-radius: 10px; padding: 9px 12px; font-size: 15px; transition: border-color .15s, background .15s; }
.item-fields input:hover, .item-fields textarea:hover { border-color: var(--line); }
.item-fields input:focus, .item-fields textarea:focus { outline: 0; border-color: var(--fairway); background: #fff; }
.item-fields .t { font-weight: 700; font-size: 16px; }
.item-fields textarea { min-height: 44px; resize: vertical; }
.item-side { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.save-dot { font-size: 12px; color: var(--muted); min-height: 18px; display: flex; align-items: center; gap: 4px; }
.save-dot.ok { color: var(--fairway); }
.add-row { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.preview-tip { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13.5px; margin-top: 14px; }

.emoji-pop { position: fixed; z-index: 80; width: 336px; max-width: calc(100vw - 24px); padding: 14px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); }
.pop-title { font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.emoji-grid button { aspect-ratio: 1; border: 0; background: #f7f4ed; border-radius: 12px; display: grid; place-items: center; padding: 9px; transition: background .15s, transform .15s var(--ease); }
.emoji-grid button .ic { width: 100%; height: 100%; color: var(--pine); }
.emoji-grid button:hover { background: var(--fairway-soft); transform: scale(1.08); }
.emoji-grid button:hover .ic { color: var(--fairway); }
.emoji-pop input { margin-top: 10px; }

/* Photos */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  padding: 36px 20px; border-radius: var(--r); border: 2px dashed var(--line-2); background: #fbf9f4; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over { border-color: var(--fairway); background: var(--fairway-soft); }
.drop .ic.big { margin-bottom: 2px; }
.drop b { font-size: 16px; }
.drop span { color: var(--muted); font-size: 13.5px; }
.uploads { display: grid; gap: 8px; margin-top: 12px; }
.upload { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.upload .bar { flex: 1; margin: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 20px; }
.photo { background: #fff; border-radius: 14px; border: 1.5px solid var(--line); overflow: hidden; transition: opacity .2s, box-shadow .2s; }
.photo.off img { opacity: .35; filter: grayscale(1); }
.photo.dragging { opacity: .4; }
.photo.drop-above { box-shadow: -4px 0 0 var(--fairway); }
.photo.drop-below { box-shadow: 4px 0 0 var(--fairway); }
.photo .img { position: relative; aspect-ratio: 4 / 3; background: #eee8da; cursor: grab; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .tag { position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.photo .tag-warn { left: auto; right: 8px; background: var(--flag); color: var(--ink); }

/* Photo sources */
.add-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-bottom: 18px; align-items: start; }
.add-grid > .card + .card { margin-top: 0; }
.add-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.add-head h2 { font-size: 19px; }
.add-head p { color: var(--muted); font-size: 14px; }
.ic.add-ic { width: 48px; height: 48px; padding: 9px; border-radius: 14px; background: var(--fairway-soft); }
.drive-form { display: flex; gap: 10px; }
.drive-form .input { flex: 1; min-width: 0; }
.howto { margin-top: 12px; font-size: 14px; color: var(--muted); }
.howto summary { cursor: pointer; font-weight: 700; color: var(--fairway); width: fit-content; }
.howto ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.howto b { color: var(--ink); }
#drivePick:not(:empty) { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.pick-wait { display: flex; align-items: center; gap: 10px; }
.pick-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 360px; overflow-y: auto; padding: 2px; }
.pick { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 0; padding: 0; background: #eee8da; box-shadow: inset 0 0 0 2px transparent; }
.pick img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s var(--ease), opacity .2s; opacity: .45; }
.pick.on img { opacity: 1; transform: scale(.9); border-radius: 8px; }
.pick.on { box-shadow: inset 0 0 0 3px var(--fairway); background: var(--fairway-soft); }
.pick .tick { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .85); color: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.pick.on .tick { background: var(--fairway); color: #fff; box-shadow: none; }
.pick .tick .i { width: 14px; height: 14px; stroke-width: 3; }
.pick-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.up-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; font-weight: 500; }
.uploads:not(:empty) { margin-bottom: 18px; background: #fff; border-radius: var(--r); padding: 14px 18px; box-shadow: var(--shadow); }
.photo .body { padding: 10px; display: grid; gap: 8px; }
.photo .body input { width: 100%; border: 1.5px solid transparent; background: #f7f4ed; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.photo .body input:focus { outline: 0; border-color: var(--fairway); background: #fff; }
.photo .tools { display: flex; align-items: center; gap: 2px; }
.photo .tools .switch { margin-right: auto; font-size: 13px; font-weight: 500; gap: 8px; }
.photo .tools .switch .track { width: 40px; height: 24px; }
.photo .tools .switch .track::after { width: 18px; height: 18px; }
.photo .tools .switch input:checked + .track::after { transform: translateX(16px); }

/* Players */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 200px; }
.search .i { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--muted); }
.search input { padding-left: 40px !important; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { border: 0; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.chip.active { background: var(--ink); color: #fff; box-shadow: none; }
.chip .n { font-weight: 500; opacity: .7; margin-left: 3px; }

.table-wrap { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 12px 16px; background: #faf8f3; border-bottom: 1px solid var(--line); }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: #fbf9f4; }
.p-name b { display: block; }
.p-name span { color: var(--muted); font-size: 13px; }
.hotel { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.hotel small { color: var(--muted); display: block; font-size: 12.5px; }
.paid-toggle { border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 13px; white-space: nowrap; transition: transform .15s; }
.paid-toggle:hover { transform: scale(1.04); }
.paid-toggle.yes { background: var(--fairway-soft); color: var(--fairway); }
.paid-toggle.no { background: #f3efe6; color: var(--muted); }
.note-flag { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--flag-soft); margin-left: 6px; vertical-align: -4px; padding: 3px; }
.note-flag .ic { width: 100%; height: 100%; color: #8a6d00; }
.hotel .hotel-ic, .pcard .hotel-ic { width: 22px; height: 22px; }
.chip .ic { width: 18px; height: 18px; margin-right: 5px; vertical-align: -4px; color: inherit; --ico-fill: transparent; }
.paid-toggle .i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.v.rooms { display: flex; gap: 14px; font-size: 34px; }
.v.rooms span { display: inline-flex; align-items: center; gap: 6px; }
.v.rooms .ic { width: 30px; height: 30px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; }
.auth-back .i { width: 16px; height: 16px; }
.cards-mobile { display: none; }

/* Drawer */
.drawer-bg { position: fixed; inset: 0; z-index: 70; background: rgba(11, 26, 19, .45); animation: fade .2s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(460px, 100%);
  background: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  animation: slideIn .3s var(--ease);
}
.drawer-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head h2 { font-size: 22px; line-height: 1.2; }
.drawer-head p { color: var(--muted); font-size: 13.5px; }
.drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; display: grid; gap: 18px; align-content: start; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; font-size: 14.5px; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.kv a { font-weight: 700; }
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } }

/* Modal */
.modal-bg { position: fixed; inset: 0; z-index: 75; background: rgba(11, 26, 19, .5); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { width: 100%; max-width: 460px; background: #fff; border-radius: 22px; padding: 26px; box-shadow: var(--shadow-lg); animation: pop .3s var(--ease); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal h2 { font-size: 22px; margin-bottom: 6px; }
.modal > p { color: var(--muted); margin-bottom: 18px; }
.modal form { display: grid; gap: 16px; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(8px); } }

/* Toasts */
.toasts { position: fixed; z-index: 99; left: 50%; bottom: 24px; translate: -50% 0; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 500; box-shadow: var(--shadow-lg); animation: toastIn .35s var(--ease); pointer-events: auto; }
.toast.err { background: var(--cup-deep); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

.admins .list-plain li { padding: 14px 0; }
.admins .who b { display: block; }
.admins .who span { color: var(--muted); font-size: 13.5px; }
.you { font-size: 12px; font-weight: 700; background: var(--fairway-soft); color: var(--fairway); padding: 2px 8px; border-radius: 99px; margin-left: 6px; }

/* ------------------------------------------------------------- Mobile */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40;
    padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top));
    background: rgba(11, 42, 31, .96); color: var(--cream); backdrop-filter: blur(10px);
  }
  .topbar img { width: 36px; height: 36px; }
  .topbar b { font-family: var(--f-display); font-weight: 400; font-size: 18px; text-transform: uppercase; flex: 1; }
  .topbar .icon-btn { color: var(--cream); }
  .topbar .icon-btn:hover { background: rgba(246, 239, 224, .1); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 20px rgba(11, 42, 31, .06);
  }
  .tabbar button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px; font-size: 11px; font-weight: 700; color: var(--muted); position: relative; }
  .tabbar button.active { color: var(--fairway); }
  .tabbar button.active::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 4px 4px; background: var(--fairway); }
  .tabbar .badge { position: absolute; top: 4px; left: 54%; background: var(--cup); color: #fff; font-size: 10px; border-radius: 99px; padding: 0 5px; }
  .main { padding: 20px 14px 140px; }
  .page-head { margin-bottom: 18px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .savebar { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); border-radius: 18px; flex-wrap: wrap; padding: 12px; }
  .savebar .txt { flex-basis: 100%; padding-left: 6px; }
  .savebar .btn { flex: 1; }
  .toasts { bottom: calc(90px + env(safe-area-inset-bottom)); width: calc(100% - 32px); }
  .grid-2, .add-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 24px; min-height: auto; }
  .auth-art img { width: 160px; }
  .auth-art h1, .auth-art p { display: none; }
  .drawer { top: auto; width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; animation: slideUp .32s var(--ease); }
  @keyframes slideUp { from { transform: translateY(100%); } }
}
@media (max-width: 640px) {
  .card { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat .v { font-size: 36px; }
  .quick { grid-template-columns: 1fr; }
  .item { grid-template-columns: 48px 1fr; grid-template-areas: 'emoji fields' 'side side'; gap: 10px; padding: 12px; }
  .item .handle { display: none; }
  .item .emoji-btn { grid-area: emoji; width: 48px; height: 48px; padding: 9px; }
  .drive-form { flex-direction: column; }
  .item .item-fields { grid-area: fields; }
  .item .item-side { grid-area: side; flex-direction: row; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 6px; }
  .item .item-side .save-dot { margin-right: auto; }
  .photos { grid-template-columns: 1fr 1fr; gap: 10px; }
  .photo .tools .switch span:not(.track) { display: none; }
  .table-wrap.desktop { display: none; }
  .cards-mobile { display: grid; gap: 10px; }
  .pcard { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; border: 0; text-align: left; width: 100%; }
  .pcard b { font-size: 16px; }
  .pcard .sub { color: var(--muted); font-size: 13.5px; grid-column: 1; }
  .pcard .paid-toggle { grid-row: span 2; grid-column: 2; grid-row-start: 1; }
  .kv { grid-template-columns: 96px 1fr; }
}
@media (max-width: 380px) {
  .photos { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
