:root {
  /* -- Warm ink & amber -- */
  --paper: #f3efe7;
  --surface: #fbf8f2;
  --line: rgba(31, 27, 22, 0.13);
  --line-soft: rgba(31, 27, 22, 0.08);
  --ink: #1f1b16;
  --ink-muted: #6b6255;
  --ink-faint: #9c9284;
  --gold: #c08a3e;
  --gold-line: rgba(192, 138, 62, 0.4);

  --radius: 10px;
  --max-w: 1040px;
  --font-display: 'Fraunces', 'Iowan Old Style', serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-label: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

:root[data-theme="dark"] {
  --paper: #1c1712;
  --surface: #241e17;
  --line: rgba(243, 239, 231, 0.14);
  --line-soft: rgba(243, 239, 231, 0.08);
  --ink: #f3efe7;
  --ink-muted: #c9bfae;
  --ink-faint: #8f8574;
  --gold: #d9a64e;
  --gold-line: rgba(217, 166, 78, 0.4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background 0.2s ease, color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Masthead */

.site-header {
  padding: 52px 0 30px;
  border-bottom: 1px solid var(--line);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.masthead-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.mark { color: var(--gold); flex-shrink: 0; }

.theme-toggle {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}

.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.logo {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

/* Date display */

.date-display {
  text-align: center;
  margin: 40px 0 26px;
}

#currentDateLabel {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
}

/* Sign picker */

.sign-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-label);
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 34px;
}

.sign-picker label {
  font-weight: 500;
  color: var(--ink);
}

.sign-picker select {
  appearance: none;
  background-color: var(--surface);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" fill="none" stroke="%23c08a3e" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 14px center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 9px 38px 9px 14px;
  font-family: var(--font-label);
  font-size: 0.88rem;
  cursor: pointer;
  min-width: 230px;
}

.sign-picker select:hover { border-color: var(--gold-line); }

.clear-sign-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-label);
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.clear-sign-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}

select:focus-visible, .clear-sign-btn:focus-visible, .context-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Context banner */

.context-banner {
  max-width: 680px;
  margin: 0 auto 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.context-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--font-label);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 14px 20px;
  cursor: pointer;
}

.context-toggle .chev {
  transition: transform 0.2s;
  color: var(--gold);
}

.context-toggle[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.context-list {
  margin: 0;
  padding: 0 22px 18px 22px;
  color: var(--ink-muted);
  font-size: 0.9rem;
  list-style: none;
  border-top: 1px solid var(--line-soft);
}

.context-list li {
  padding: 10px 0 0 16px;
  border-left: 2px solid var(--gold-line);
  margin-top: 10px;
}

/* Sign grid */

.sign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
  margin-bottom: 44px;
}

.sign-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sign-card:hover {
  border-top-color: var(--gold);
  box-shadow: 0 6px 18px rgba(31, 27, 22, 0.07);
}

.sign-card--picked {
  border-top-color: var(--gold);
  border-color: var(--gold-line);
  box-shadow: 0 6px 18px rgba(192, 138, 62, 0.14);
}

.picked-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.picked-marker::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.sign-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sign-symbol {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 1.3rem;
  color: var(--ink);
  font-variant-emoji: text;
  font-family: 'Noto Sans Symbols 2', 'Segoe UI Symbol', 'Noto Sans Symbols', serif;
}

.sign-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sign-name-tr {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
  line-height: 1.2;
}

.sign-name-en {
  font-family: var(--font-label);
  font-size: 0.68rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sign-prediction {
  color: var(--ink-muted);
  font-size: 0.97rem;
  margin: 0;
}

.status-msg {
  text-align: center;
  color: var(--ink-muted);
  padding: 60px 0;
  font-size: 1rem;
  font-family: var(--font-label);
}

.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-faint);
  font-family: var(--font-label);
  font-size: 0.8rem;
  padding: 20px 0 44px;
}

@media (max-width: 480px) {
  #currentDateLabel { font-size: 1.15rem; }
  .sign-picker select { min-width: 0; flex: 1; }
  .site-header { padding: 40px 0 24px; }
}
