/* JoyBoxLabs design contract. Keep puzzle colors and chosen game themes intact. */
:root {
  --jb-paper: #f7f5f0; --jb-ink: #1a1b1f; --jb-muted: #565b66;
  --jb-accent: #6a4dff; --jb-line: #dcd9d2; --jb-radius: 18px;
  --jb-font: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html.joybox-brand, .joybox-brand body { font-family: var(--jb-font); }
.joybox-brand { --font: var(--jb-font); --radius: var(--jb-radius); --radius-sm: 12px; }
.joybox-brand :is(h1,h2,h3,.brand,.logo,.wordmark) { font-family: var(--jb-font); letter-spacing: -.035em; }
.joybox-brand :is(button,input,select,textarea) { font-family: var(--jb-font); }
.jb-bar { position: relative; z-index: 25; display: flex; align-items: center; gap: 16px; padding: 12px max(20px, calc((100% - 1120px)/2)); min-height: 54px; background: var(--jb-paper); color: var(--jb-ink); border-bottom: 1px solid var(--jb-line); font: 600 13px/1.4 var(--jb-font); }
.jb-bar a { color: inherit; text-decoration: none; white-space: nowrap; }
.jb-logo { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 800; letter-spacing: -.7px; }
.jb-logo span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--jb-accent); color: white; font-weight: 800; }
.jb-clock { flex: 1; text-align: right; color: var(--jb-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.jb-clock a { color: #4933c1; text-decoration: underline; }
.jb-edition-note { margin: 0; padding: 12px 20px; background: #eeebff; color: #32226c; text-align: center; font: 14px/1.5 var(--jb-font); }
.jb-share { box-sizing: border-box; position: fixed; inset: 0; margin: auto; width: min(500px, calc(100% - 28px)); max-height: calc(100dvh - 32px); padding: 28px; border: 1px solid var(--jb-line); border-radius: var(--jb-radius); background: var(--jb-paper); color: var(--jb-ink); font: 15px/1.5 var(--jb-font); box-shadow: 0 20px 70px #0003; overflow: auto; }
.jb-share::backdrop { background: #15152388; }
.jb-share h2 { font: 750 25px/1.2 var(--jb-font); margin: 0 0 12px; letter-spacing: -.8px; }
.jb-share p { margin: 10px 0 16px; color: var(--jb-muted); }
.jb-share label { display: block; font-size: 12px; font-weight: 700; }
.jb-share textarea { box-sizing: border-box; display: block; width: 100%; min-height: 160px; resize: vertical; margin: 8px 0 16px; padding: 14px; border: 1px solid var(--jb-line); border-radius: 12px; color: var(--jb-ink); background: white; font: 14px/1.6 var(--jb-font); }
.jb-share-actions,.jb-share nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.jb-share button,.jb-share nav a { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border: 1px solid var(--jb-line); border-radius: 10px; background: white; color: var(--jb-ink); text-decoration: none; font: 650 13px var(--jb-font); cursor: pointer; }
.jb-share-actions button:first-child { background: var(--jb-accent); color: white; border-color: var(--jb-accent); }
.jb-share .jb-close { width: 100%; }
.jb-share :focus-visible,.jb-bar :focus-visible { outline: 3px solid var(--jb-accent); outline-offset: 3px; }
@media(max-width: 480px) { .jb-bar { gap: 10px; padding: 10px 14px; flex-wrap: wrap; } .jb-clock { order: 3; flex-basis: 100%; text-align: left; } .jb-all { margin-left: auto; } .jb-share { padding: 20px; } }
@media(prefers-reduced-motion: reduce) { .joybox-brand *, .joybox-brand *::before, .joybox-brand *::after { scroll-behavior: auto !important; } }

.jb-invite { border: 1px solid var(--jb-line); border-radius: 9px; padding: 7px 10px; min-height: 36px; background: white; color: var(--jb-ink); cursor: pointer; font: 600 12px var(--jb-font); white-space: nowrap; }
