/* Website admin: white and calm, the club's blue for actions, a touch of yellow. */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-400-700.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #f4f5f8; --card: #fff; --ink: #0d1324; --text: #283044; --muted: #6a7389; --line: #e3e6ee; --line-2: #d3d8e3;
  --blue: #2f5bff; --blue-ink: #1d3fd1; --blue-soft: #eef2ff; --yellow: #ffd23f; --red: #d9364a; --red-soft: #fdeef0; --green: #12a150; --green-soft: #e7f6ee;
  --radius: 14px; --radius-sm: 10px; --shadow: 0 1px 2px rgb(13 19 36 / .04), 0 4px 16px -8px rgb(13 19 36 / .12);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; letter-spacing: -.015em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 700; }
a { color: var(--blue); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); margin: .35rem 0 0; }
.i { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; }
.i svg { width: 100%; height: 100%; }
@media (max-width: 599px) { .hide-sm { display: none; } }

/* ---- Top bar ---- */
.top { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .7rem max(16px, calc((100% - 960px) / 2)); background: rgb(255 255 255 / .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--blue) 0 70%, var(--yellow) 70%); }
.top__brand { display: flex; align-items: center; gap: .65rem; margin-right: auto; text-decoration: none; color: var(--ink); }
.top__brand img { width: 40px; height: auto; }
.top__brand span { display: grid; line-height: 1.15; }
.top__brand b { font-size: .98rem; }
.top__brand small { color: var(--muted); font-size: .76rem; }
.top__links { display: flex; gap: .25rem; }
.top__links a, .top__links button { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: 0 .75rem; border: 0; border-radius: 999px; background: none; color: var(--text); font-size: .9rem; font-weight: 500; text-decoration: none; cursor: pointer; }
.top__links a:hover, .top__links button:hover { background: var(--bg); }
.top__local { flex-basis: 100%; margin: 0; padding: .4rem .7rem; border-radius: 8px; background: #fff7d6; color: #6b5300; font-size: .82rem; }

/* ---- Pages ---- */
.page { width: min(100% - 32px, 960px); margin: 0 auto; padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem) 0 5rem; }
.page--form { width: min(100% - 32px, 760px); padding-bottom: 8rem; }
.back { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1rem; color: var(--muted); font-size: .9rem; font-weight: 500; text-decoration: none; }
.back:hover { color: var(--ink); }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.head > div { max-width: 60ch; }
.hello { margin-bottom: 1.25rem; }
.section-title { margin: 2.5rem 0 .9rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.loading { display: grid; place-items: center; align-content: center; gap: 1rem; min-height: 80vh; padding: 1rem; color: var(--muted); text-align: center; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: 0 1.15rem; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--ink); font-size: .95rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .1s; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn--primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.btn--primary:hover { border-color: var(--blue-ink); background: var(--blue-ink); }
.btn--quiet { border-color: transparent; background: none; color: var(--muted); }
.btn--quiet:hover { border-color: transparent; color: var(--ink); background: var(--bg); }
.btn--danger { margin-left: auto; border-color: transparent; background: none; color: var(--red); }
.btn--danger:hover { border-color: transparent; background: var(--red-soft); }
.btn--small { min-height: 36px; padding: 0 .85rem; font-size: .86rem; }
.btn--block { width: 100%; }
.btn--dashed { width: 100%; border-style: dashed; border-radius: var(--radius-sm); color: var(--blue); background: transparent; }
.btn--dashed:hover { border-color: var(--blue); background: var(--blue-soft); }

/* ---- Dashboard ---- */
.quick { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .95rem; border-radius: 999px; background: var(--blue-soft); color: var(--blue-ink); font-size: .9rem; font-weight: 600; text-decoration: none; transition: background .15s; }
.chip:hover { background: #dfe6ff; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: .75rem; }
.tiles--big { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.tile { position: relative; display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s, box-shadow .15s; }
.tile:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 1px 2px rgb(13 19 36 / .04), 0 12px 28px -14px rgb(13 19 36 / .25); }
.tile--big { align-items: flex-start; padding: 1.25rem; }
.tile__icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }
.tile__icon svg { width: 22px; height: 22px; }
.tile--big .tile__icon { width: 48px; height: 48px; }
.tile__text { display: grid; gap: .15rem; min-width: 0; flex: 1; }
.tile__text b { color: var(--ink); font-size: 1.02rem; }
.tile--big .tile__text b { font-size: 1.12rem; }
.tile__blurb { color: var(--text); font-size: .92rem; }
.tile__status { overflow: hidden; color: var(--muted); font-size: .86rem; white-space: nowrap; text-overflow: ellipsis; }
.tile--big .tile__status { margin-top: .4rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.tile__go { color: var(--line-2); align-self: center; transition: color .15s, transform .15s; }
.tile:hover .tile__go { color: var(--blue); transform: translateX(2px); }

/* ---- Lists ---- */
.group + .group { margin-top: 1.75rem; }
.group__title { margin: 0 0 .6rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rows { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; color: var(--text); text-decoration: none; transition: background .12s; }
.row + .row { border-top: 1px solid var(--line); }
.row:hover { background: #f9fafc; }
.row__thumb, .row__badge { width: 56px; height: 42px; flex: none; border-radius: 8px; object-fit: cover; background: var(--bg); }
.row__badge { display: grid; place-items: center; background: var(--ink); color: #fff; font-size: .82rem; font-weight: 700; letter-spacing: .02em; }
.row__badge--icon { background: var(--blue-soft); color: var(--blue); }
.row__text { display: grid; min-width: 0; flex: 1; }
.row__text b { overflow: hidden; color: var(--ink); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.row__text span { overflow: hidden; color: var(--muted); font-size: .88rem; white-space: nowrap; text-overflow: ellipsis; }
.row__go { color: var(--line-2); }
.row:hover .row__go { color: var(--blue); }
.flag { flex: none; padding: .2rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.flag--go { background: var(--green-soft); color: var(--green); }
.flag--off { background: var(--bg); color: var(--muted); }
.empty { padding: 2rem; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); text-align: center; }
@media (max-width: 520px) { .flag { display: none; } }

/* ---- Forms ---- */
.editor { padding: clamp(1.1rem, .8rem + 1.5vw, 1.75rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem 1rem; }
.field { grid-column: 1 / -1; display: grid; gap: .4rem; align-content: start; min-width: 0; }
.field--half { grid-column: span 1; }
@media (max-width: 560px) { .field--half { grid-column: 1 / -1; } }
.field--toggle { align-content: center; }
.field__label { color: var(--ink); font-size: .92rem; font-weight: 600; }
.field__label small { color: var(--muted); font-weight: 400; }
.field__hint { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.field__err { margin: 0; color: var(--red); font-size: .86rem; font-weight: 500; }
.field__err:empty { display: none; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-height: 46px; padding: .6rem .8rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 2.4rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a7389' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .75rem center / 18px; }
input:hover, select:hover, textarea:hover { border-color: #b9c0d0; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(47 91 255 / .15); }
input::placeholder, textarea::placeholder { color: #a3aabb; }
.has-error input, .has-error textarea, .has-error select, .has-error .drop, .has-error .photos { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgb(217 54 74 / .12); }
.affix { display: flex; align-items: stretch; }
.affix span { display: grid; place-items: center; padding: 0 .8rem; border: 1px solid var(--line-2); background: var(--bg); color: var(--muted); font-size: .92rem; }
.affix span:first-child { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.affix span:last-child { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.affix span:first-child + input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.affix input:has(+ span) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

.switch { display: inline-flex; align-items: center; gap: .7rem; min-height: 46px; cursor: pointer; color: var(--ink); font-size: .95rem; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 44px; height: 26px; flex: none; border-radius: 999px; background: var(--line-2); transition: background .15s; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .18s; }
.switch input:checked + .switch__track { background: var(--blue); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px rgb(47 91 255 / .25); }

.more { grid-column: 1 / -1; margin-top: 1.25rem; border-top: 1px solid var(--line); }
.more summary { display: flex; align-items: center; gap: .35rem; padding: 1rem 0 .25rem; color: var(--blue); font-weight: 600; font-size: .95rem; cursor: pointer; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: ""; width: 8px; height: 8px; margin-right: .35rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .15s; }
.more[open] summary::before { transform: rotate(45deg); }
.more summary small { color: var(--muted); font-weight: 400; }
.more > .fields { padding-top: 1rem; }

/* Photo */
.image { position: relative; display: grid; gap: .6rem; }
.image__img { width: 100%; max-height: 340px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg); }
.image__actions { display: flex; gap: .4rem; }
.drop { display: grid; place-items: center; gap: .3rem; width: 100%; min-height: 150px; padding: 1.25rem; border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm); background: #fafbfd; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.drop .i { width: 28px; height: 28px; color: var(--blue); }
.drop b { color: var(--ink); }
.drop span { font-size: .86rem; }
.drop:hover, .is-dropping .drop, .is-dropping.photos { border-color: var(--blue); background: var(--blue-soft); }
.busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .6rem; border-radius: var(--radius-sm); background: rgb(255 255 255 / .85); color: var(--ink); font-weight: 600; }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; padding: .6rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fafbfd; transition: border-color .15s, background .15s; }
.photo { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--line); cursor: grab; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.photo.is-over { outline: 3px solid var(--blue); outline-offset: 2px; }
.photo__cover { position: absolute; top: 6px; left: 6px; padding: .1rem .45rem; border-radius: 6px; background: var(--yellow); color: var(--ink); font-size: .72rem; font-weight: 700; }
.photo__tools { position: absolute; inset: auto 0 0; display: flex; justify-content: flex-end; gap: 2px; padding: 4px; background: linear-gradient(transparent, rgb(0 0 0 / .55)); opacity: 0; transition: opacity .15s; }
.photo:hover .photo__tools, .photo:focus-within .photo__tools { opacity: 1; }
@media (hover: none) { .photo__tools { opacity: 1; } }
.photo__tools button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 6px; background: rgb(255 255 255 / .92); color: var(--ink); cursor: pointer; }
.photo__tools button:disabled { opacity: .35; }
.photo__tools button:last-child { color: var(--red); }
.photo--busy { display: grid; place-items: center; cursor: default; }
.photo--add { display: grid; place-items: center; align-content: center; gap: .25rem; border: 1.5px dashed var(--line-2); background: #fff; color: var(--blue); font-size: .86rem; font-weight: 600; cursor: pointer; }
.photo--add .i { width: 24px; height: 24px; }
.photo--add:hover { border-color: var(--blue); background: var(--blue-soft); }

/* File */
.file { display: flex; gap: .4rem; }
.file input { flex: 1; min-width: 0; }
.file .btn { min-height: 46px; }
@media (max-width: 480px) { .file { flex-wrap: wrap; } .file input { flex-basis: 100%; } }

/* Lists */
.list { display: grid; gap: .6rem; }
.item { padding: .8rem 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fafbfd; }
.item__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.item__n { color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.item__tools { display: flex; gap: 2px; }
.item__tools button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.item__tools button:hover:not(:disabled) { background: var(--line); color: var(--ink); }
.item__tools button:last-child:hover { background: var(--red-soft); color: var(--red); }
.item__tools button:disabled { opacity: .3; cursor: default; }
.item .fields { gap: .8rem; }
.list--compact .item { padding: .6rem .8rem .8rem; }
@media (min-width: 640px) {
  .list--compact .item .fields { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .list--compact .item .field { grid-column: auto; }
  .list--compact .item .field__hint { display: none; }
}
.strings { display: grid; gap: .5rem; }
.strings__row { display: flex; align-items: flex-start; gap: .4rem; }
.strings__row .item__tools { padding-top: 6px; }

/* Story */
.md { border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.md:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(47 91 255 / .15); }
.md__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; padding: .4rem; border-bottom: 1px solid var(--line); background: #fafbfd; }
.md__bar { display: flex; flex-wrap: wrap; gap: 2px; }
.md__tool { min-width: 36px; height: 34px; padding: 0 .55rem; border: 0; border-radius: 7px; background: none; color: var(--text); font-size: .88rem; font-weight: 600; cursor: pointer; }
.md__tool:hover { background: var(--line); color: var(--ink); }
.md__tabs { display: flex; padding: 2px; border-radius: 9px; background: var(--line); }
.md__tabs button { height: 30px; padding: 0 .8rem; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: .86rem; font-weight: 600; cursor: pointer; }
.md__tabs button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.md .md__text { min-height: 320px; border: 0; border-radius: 0; box-shadow: none; padding: 1rem; font-size: 1rem; line-height: 1.65; }
.md__preview { min-height: 320px; padding: 1rem 1.25rem; }
.prose { color: var(--text); line-height: 1.65; }
.prose h2, .prose h3 { margin: 1.4em 0 .5em; }
.prose img { border-radius: 8px; }
.prose > :first-child { margin-top: 0; }

/* Save bar */
.savebar { position: sticky; bottom: 0; z-index: 5; margin: 1.5rem calc(-1 * clamp(1.1rem, .8rem + 1.5vw, 1.75rem)) calc(-1 * clamp(1.1rem, .8rem + 1.5vw, 1.75rem)); padding: .85rem clamp(1.1rem, .8rem + 1.5vw, 1.75rem); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: rgb(255 255 255 / .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.savebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* ---- Sign in ---- */
.login { display: grid; place-items: center; min-height: 100vh; min-height: 100svh; padding: 24px 16px; background: radial-gradient(80% 60% at 50% 0%, #e6ecff, var(--bg) 70%); }
.login__card { width: min(100%, 380px); padding: 2rem 1.75rem; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 30px 60px -30px rgb(13 19 36 / .35); text-align: center; }
.login__badge { width: 92px; height: auto; margin-bottom: .75rem; }
.login__form { display: grid; gap: 1rem; margin-top: 1.5rem; text-align: left; }
.login__err { margin: 0; color: var(--red); font-size: .9rem; font-weight: 500; }
.login__err:empty { display: none; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgb(13 19 36 / .45); }

/* ---- Toast, spinner ---- */
.toast { position: fixed; left: 50%; bottom: 1.25rem; z-index: 60; max-width: min(92vw, 480px); padding: .8rem 1.1rem; border-radius: 12px; background: var(--ink); color: #fff; font-size: .95rem; font-weight: 500; box-shadow: 0 16px 40px -16px rgb(0 0 0 / .5); transform: translate(-50%, 150%); opacity: 0; transition: transform .25s, opacity .25s; pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast--bad { background: var(--red); }
.page--form ~ .toast, body:has(.savebar) .toast { bottom: 5.5rem; }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line-2); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .spinner { animation-duration: 2s; } }
