/* Bob's Kingdom: same look as the videos (ink outlines, wooden boards, Lilita One, warm sky over voxel grass) */
@font-face { font-family: "Lilita One"; src: url("/fonts/LilitaOne.woff2") format("woff2"); font-display: swap; }
:root {
  --ink: #241726; --gold: #ffd21f; --cream: #fffaf0; --parch: #f6ecd2; --brown: #7a4a1c; --red: #d8342c; --blue: #2f7fd0;
  --wood: repeating-linear-gradient(0deg, #a8743e 0 15px, #9a6936 15px 17px, #b07c44 17px 31px, #90602f 31px 33px);
  --lift: 0 0 0 5px var(--ink), 0 9px 0 5px rgba(36, 23, 38, .45);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #5f9c41; }
body { margin: 0; color: var(--ink); font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
body.sky {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #86bdeb 0, #c8e0f0 150px, #ffe2b6 330px, #ffd79c 420px, rgba(255, 215, 156, 0) 421px) top / 100% 421px no-repeat,
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .055) 0 28px, transparent 28px 56px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 28px, transparent 28px 56px),
    #5f9c41;
}
a { color: var(--brown); }
main { max-width: 600px; margin: 0 auto; padding: 56px 16px 40px; }
main.narrow { max-width: 520px; }
.lilita, h1, h2, h3, .btn { font-family: "Lilita One", system-ui, sans-serif; font-weight: 400; }
.h-ink { color: var(--gold); -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; letter-spacing: 1px; line-height: 1.05; margin: 0; }
.h-ink.white { color: var(--cream); }
.h-ink.red { color: #ff5a3c; }
.center { text-align: center; }
.muted { color: #6d5a4a; font-size: 14px; }

/* hanging wooden logo board */
.logo-board { display: block; width: max-content; max-width: 100%; margin: 0 auto 26px; position: relative; text-decoration: none; transform: rotate(-1.5deg); }
.logo-board::before, .logo-board::after { content: ""; position: absolute; top: -54px; width: 7px; height: 58px; background: #c7ad7a; box-shadow: 0 0 0 3px var(--ink); }
.logo-board::before { left: 18%; } .logo-board::after { right: 18%; }
.logo-board span { display: block; padding: 10px 26px 8px; background: var(--wood); border-radius: 9px; box-shadow: var(--lift); font: 34px/1.1 "Lilita One", sans-serif; letter-spacing: 2px; color: var(--gold); -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; }

/* boards like DAYS LEFT / ARMY SIZE */
.board { display: inline-block; min-width: 190px; padding: 9px 18px 8px; text-align: center; background: var(--wood); border-radius: 9px; box-shadow: var(--lift); }
.board .label { font: 17px/1 "Lilita One", sans-serif; letter-spacing: 2px; color: #f7e7c4; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.board .value { font: 54px/1.05 "Lilita One", sans-serif; color: var(--gold); -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill; font-variant-numeric: tabular-nums; }

.parchment { background: var(--parch); border-radius: 14px; box-shadow: var(--lift); padding: 22px 20px; margin: 26px 0; }
.parchment h2 { font-size: 28px; margin: 0 0 8px; }
.parchment p { margin: 8px 0; }

/* hero */
.hero { position: relative; margin: 0 auto; }
.hero img { display: block; width: 100%; height: auto; aspect-ratio: 900 / 1067; object-fit: cover; border-radius: 18px; box-shadow: var(--lift); background: #b9d58d; }
.hero .title { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; }
.hero .title h1 { font-size: clamp(44px, 12vw, 70px); }
.lead { font-size: 19px; text-align: center; margin: 22px 4px 18px; color: var(--cream); text-shadow: 0 2px 0 rgba(36, 23, 38, .55); font-weight: 600; }
.lead.dark { color: var(--ink); text-shadow: none; }
.count-row { display: flex; justify-content: center; margin: 30px 0 10px; }

/* buttons */
.btn { display: inline-block; cursor: pointer; border: 4px solid var(--ink); border-radius: 14px; background: var(--gold); color: var(--ink); font-size: 22px; letter-spacing: .5px; padding: 12px 22px 10px; text-decoration: none; box-shadow: 0 7px 0 var(--ink); transition: transform .08s, box-shadow .08s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--ink); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.secondary { background: var(--cream); font-size: 19px; }
.btn.blue { background: #5aa7f0; }
.btn-oath { display: block; width: 100%; margin: 26px 0 10px; font-size: clamp(22px, 6vw, 28px); line-height: 1.15; padding: 18px 16px 15px; background: linear-gradient(#ffe066, #ffc21a); animation: nudge 2.6s ease-in-out infinite; }
.btn-oath small { display: block; font-size: 15px; letter-spacing: 1px; color: #6b3f12; }
@keyframes nudge { 0%, 86%, 100% { transform: none; } 90% { transform: rotate(-1.4deg) scale(1.02); } 94% { transform: rotate(1.4deg) scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .btn-oath { animation: none; } }
.under-btn { text-align: center; color: var(--cream); font-size: 15px; text-shadow: 0 1px 0 rgba(36, 23, 38, .5); margin: 4px 0 0; }

/* steps */
.steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 14px; align-items: center; }
.disc { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--blue); color: var(--cream); font: 26px/1 "Lilita One", sans-serif; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; box-shadow: 0 0 0 4px var(--ink); }
.steps b { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 20px; display: block; line-height: 1.1; }

/* recruits + hall plates */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
.chip { display: inline-flex; gap: 6px; align-items: baseline; background: var(--cream); border-radius: 10px; padding: 5px 11px; box-shadow: 0 0 0 3px var(--ink); text-decoration: none; color: var(--ink); font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip i { font-style: normal; font-family: "Lilita One", sans-serif; color: var(--brown); }
.plates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin: 20px 0; }
.plate { display: block; text-decoration: none; text-align: center; background: var(--wood); border-radius: 9px; box-shadow: 0 0 0 4px var(--ink), 0 7px 0 4px rgba(36, 23, 38, .45); padding: 8px 8px 7px; min-width: 0; }
.plate .n { font: 15px/1 "Lilita One", sans-serif; letter-spacing: 1px; color: #f7e7c4; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.plate .nick { font: 20px/1.2 "Lilita One", sans-serif; color: var(--gold); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plate.founder { background: repeating-linear-gradient(0deg, #e9b93a 0 15px, #d9a62c 15px 17px, #f0c445 17px 31px, #cf9b24 31px 33px); }
.search-row { display: flex; gap: 10px; }
.search-row input { flex: 1; min-width: 0; }

/* forms + dialog */
dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 0; padding: 0; border-radius: 16px; background: var(--parch); box-shadow: 0 0 0 5px var(--ink), 0 12px 0 5px rgba(36, 23, 38, .5); color: var(--ink); overflow: auto; }
dialog::backdrop { background: rgba(28, 14, 20, .62); }
.dlg { padding: 22px 20px 24px; position: relative; }
.dlg h2 { font-size: 30px; margin: 0 0 4px; padding-right: 46px; }
.close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); background: var(--cream); font: 22px/1 "Lilita One", sans-serif; cursor: pointer; color: var(--ink); }
label.field { display: block; margin: 16px 0 0; font-weight: 700; }
input[type=text], input[type=email], input[type=search] { width: 100%; font: 18px/1.3 system-ui, sans-serif; padding: 12px 13px; border: 3px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); margin-top: 6px; }
input:focus-visible, .btn:focus-visible, .close:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.hint { font-size: 14px; color: #6d5a4a; margin-top: 4px; }
.err { color: #b3261e; font-weight: 700; font-size: 15px; min-height: 0; margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: 15px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ts { margin: 16px 0 0; min-height: 0; }
.fine { font-size: 13px; color: #6d5a4a; margin: 14px 0 0; }
.done img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 0 0 4px var(--ink); display: block; margin: 12px 0 16px; }
.devbox { margin-top: 14px; padding: 12px; border: 3px dashed var(--brown); border-radius: 10px; background: #fff4d6; font-size: 14px; word-break: break-all; }

/* member page */
.number-board { margin: 6px auto 0; display: table; transform: rotate(1deg); }
.number-board .value { font-size: 76px; }
.cert { display: block; width: min(360px, 100%); margin: 22px auto; border-radius: 14px; box-shadow: var(--lift); background: #e9dbb6; aspect-ratio: 9 / 16; }
.actions { display: grid; gap: 14px; margin: 8px auto 0; max-width: 360px; }
.actions .btn { text-align: center; width: 100%; }
.welcome { text-align: center; margin: 0 0 10px; }
.welcome h1 { font-size: clamp(40px, 11vw, 60px); }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 12px; box-shadow: 0 0 0 2px var(--ink); animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

footer { text-align: center; color: var(--cream); font-size: 14px; padding: 20px 16px 34px; text-shadow: 0 1px 0 rgba(36, 23, 38, .55); }
footer a { color: var(--cream); font-weight: 700; }
footer .socials { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
footer .socials a { background: var(--ink); border-radius: 10px; padding: 7px 12px; text-decoration: none; text-shadow: none; }

/* privacy page */
.doc h2 { font-size: 24px; margin: 22px 0 6px; }
.doc ul { padding-left: 20px; }

/* admin */
body.admin { background: #f6ecd2; padding: 16px; font-size: 15px; }
body.admin h1 { font-size: 28px; margin: 0 0 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.stats div { background: #fff; border: 3px solid var(--ink); border-radius: 10px; padding: 8px 12px; min-width: 120px; }
.stats b { display: block; font: 30px/1 "Lilita One", sans-serif; }
.search { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.search input { max-width: 340px; margin: 0; }
body.admin table { border-collapse: collapse; width: 100%; background: #fff; display: block; overflow-x: auto; }
body.admin th, body.admin td { border: 1px solid #d8c8a0; padding: 6px 8px; text-align: left; white-space: nowrap; }
body.admin tr.dim td { opacity: .45; }
body.admin button { font: inherit; cursor: pointer; }

@media (min-width: 900px) {
  main { max-width: 640px; }
  .logo-board span { font-size: 42px; }
}
