/* ClockOutZone shared styles: "Retro Office". Time-card cream, ink black,
   signal orange, square corners and hard offset shadows. */
:root {
  --bg: #f3ecdc;
  --bg-2: #e8dfca;
  --card: #fbf7ee;
  --card-hi: #fffdf7;
  --ink: #1d1d1b;
  --line: #1d1d1b;
  --text: #1d1d1b;
  --muted: #5d574c;
  --accent: #ff5a1f;
  --accent-hi: #ff7a45;
  --accent-2: #1f8a7a;
  --mint: #1f8a7a;
  --sky: #2f6db5;
  --pink: #d94a7a;
  --radius: 4px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 7px 7px 0 var(--ink);
  --font-head: "Space Mono", "Courier New", ui-monospace, monospace;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  /* Faint graph-paper grid, like an old ledger */
  background:
    linear-gradient(rgba(29, 29, 27, .045) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(29, 29, 27, .045) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent-2); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
button { font: inherit; }
kbd { font-family: var(--font-head); font-size: .85em; border: 1.5px solid var(--ink); border-bottom-width: 3px; border-radius: 3px; padding: 0 5px; background: var(--card-hi); }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; max-width: 1100px; width: 100%; margin: 0 auto;
  border-bottom: 2px solid var(--ink);
}
.logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
}
.logo-mark {
  width: 34px; height: 34px; border-radius: 3px; background: var(--accent);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  display: grid; place-items: center;
}
.logo-mark svg { width: 20px; height: 20px; }
.logo span b { color: var(--accent); font-weight: 700; }
.header-actions { display: flex; gap: 8px; }

/* Buttons: square, outlined, hard shadow that "presses" in on click */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--ink); border-radius: var(--radius); padding: 9px 16px; cursor: pointer;
  background: var(--card-hi); color: var(--ink); text-decoration: none;
  font-family: var(--font-head); font-weight: 700; font-size: .92rem; text-transform: uppercase; letter-spacing: .02em;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.btn:hover { background: #fff; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn[hidden] { display: none; }
.btn[disabled] { opacity: .6; cursor: default; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-hi); }
.btn-small { padding: 6px 12px; font-size: .8rem; box-shadow: 2px 2px 0 var(--ink); }
.btn-small:hover { box-shadow: 3px 3px 0 var(--ink); }
.btn-small:active { transform: translate(2px, 2px); }

/* Form fields */
input, select, textarea { font: inherit; }

/* Layout */
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 8px 20px 48px; }
.page-title { text-align: center; margin: 26px 0 8px; font-size: clamp(1.6rem, 5vw, 2.3rem); text-transform: uppercase; }
.page-sub { text-align: center; color: var(--muted); margin: 0 auto 26px; max-width: 560px; }

.card {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Toy grid: each card is numbered like a filing tab */
.toy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; counter-reset: none; }
#toyGroups { counter-reset: toy; }
.toy {
  display: block; padding: 18px 20px 20px; text-decoration: none; color: var(--text); position: relative;
  transition: transform .1s ease, box-shadow .1s ease;
  counter-increment: toy;
}
.toy::after {
  content: "NO." counter(toy, decimal-leading-zero);
  position: absolute; top: 14px; right: 16px; font-family: var(--font-head); font-size: .75rem; color: var(--muted);
}
.toy:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.toy:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.toy-icon { font-size: 2rem; line-height: 1; margin-bottom: 12px; }
.toy h3 { font-size: 1.05rem; margin-bottom: 4px; text-transform: uppercase; }
.toy p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Footer */
.site-footer {
  text-align: center; color: var(--muted); font-size: .85rem; padding: 22px 20px 32px;
  font-family: var(--font-head); border-top: 2px solid var(--ink); max-width: 1100px; width: calc(100% - 40px); margin: 0 auto;
}
.site-footer a { color: var(--muted); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140px);
  background: var(--ink); color: var(--bg); border: 2px solid var(--ink);
  padding: 10px 18px; border-radius: var(--radius); box-shadow: 4px 4px 0 var(--accent);
  transition: transform .3s ease; z-index: 50; font-family: var(--font-head); font-size: .9rem;
}
.toast.show { transform: translate(-50%, 0); }

/* Focus mode: just the toy, nothing else */
.focus-exit { display: none; }
.focus-mode .site-header, .focus-mode .site-footer, .focus-mode .page-title, .focus-mode .page-sub, .focus-mode [data-focus-hide] { display: none !important; }
.focus-mode main { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; padding-top: 56px; }
.focus-mode .focus-exit { display: inline-flex; position: fixed; top: 12px; right: 12px; z-index: 60; opacity: .35; transition: opacity .3s ease; }
.focus-mode .focus-exit:hover, .focus-mode .focus-exit:focus-visible { opacity: 1; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 560px) {
  .site-header { padding: 12px 16px; }
  main { padding: 4px 16px 40px; }
  .logo { font-size: 1rem; }
  .header-actions .btn-label { display: none; }
  .site-footer { width: calc(100% - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
