@font-face { font-family: ETbb; src: url("fonts/ETbb-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: ETbb; src: url("fonts/ETbb-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: ETbb; src: url("fonts/ETbb-Italic.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }

:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #fffff8;
  --surface: #f5f2e8;
  --panel: rgba(255, 255, 248, .94);
  --card: #f7f5ec;
  --input: #fffef8;
  --line: rgba(30, 27, 22, .18);
  --control-line: #827d73;
  --muted: #68635b;
  --text: #171512;
  --label: #302c27;
  --accent: #8a1f7a;
  --secondary: #315f65;
  --button: #f0ede2;
  --button-hover: #e7e2d4;
  --shadow: rgba(60, 48, 30, .08);
  --tooltip-bg: #201e1a;
  --tooltip-text: #fffff8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #151410;
    --surface: #24221c;
    --panel: rgba(29, 28, 23, .94);
    --card: #24221c;
    --input: #191814;
    --line: rgba(255, 251, 235, .14);
    --control-line: #827d73;
    --muted: #aaa397;
    --text: #f5f0e4;
    --label: #ded7ca;
    --accent: #c6a6e8;
    --secondary: #80c8ce;
    --button: #29271f;
    --button-hover: #343127;
    --shadow: rgba(0, 0, 0, .28);
    --tooltip-bg: #f6f1e5;
    --tooltip-text: #171512;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151410;
  --surface: #24221c;
  --panel: rgba(29, 28, 23, .94);
  --card: #24221c;
  --input: #191814;
  --line: rgba(255, 251, 235, .14);
  --control-line: #827d73;
  --muted: #aaa397;
  --text: #f5f0e4;
  --label: #ded7ca;
  --accent: #c6a6e8;
  --secondary: #80c8ce;
  --button: #29271f;
  --button-hover: #343127;
  --shadow: rgba(0, 0, 0, .28);
  --tooltip-bg: #f6f1e5;
  --tooltip-text: #171512;
}

* { box-sizing: border-box; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-link {
  position: fixed; z-index: 100; top: .75rem; left: .75rem; padding: .6rem .8rem;
  color: var(--bg); background: var(--text); transform: translateY(calc(-100% - 1rem));
}
.skip-link:focus { transform: translateY(0); }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 1rem/1.5 ETbb, Georgia, serif;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures contextual;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: radial-gradient(rgba(90, 70, 40, .12) .45px, transparent .45px);
  background-size: 5px 5px;
}
