/* Curlie's Corner shell. Paddock palette: dawn light at the stables,
   oak and saddle on warm cream. Mobile-first, base 18px, 44px targets. */

:root {
  --cream: #faf3e7;
  --cream-warm: #f2e8d3;
  --sky: #d7dfe1;
  --dawn: #efc8b0;
  --dawn-deep: #cf8a68;
  --oak: #4a5d3a;
  --oak-deep: #364527;
  --saddle: #5c3a24;
  --saddle-light: #8a5a3a;
  --ink: #1f1a15;
  --muted: #726456;
  --rule: rgba(31, 26, 21, 0.12);
  --panel: var(--cream);
  --shadow: 0 6px 18px rgba(31, 26, 21, 0.06);
  --shadow-soft: 0 2px 6px rgba(31, 26, 21, 0.05);
  --shadow-hi: 0 10px 22px rgba(31, 26, 21, 0.10);
  --radius: 16px;
  --serif: "Baskerville", "Baskerville Old Face", "Hoefler Text", "Big Caslon", "Times New Roman", serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
  font-family: var(--serif);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, var(--dawn) 0%, var(--cream) 30%, var(--cream) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
}

a { color: var(--oak-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  background: transparent;
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  flex-wrap: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--oak-deep);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  text-decoration: none;
  letter-spacing: 0.01em;
  min-width: 0;
  flex: 1 1 auto;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--cream);
  border: 1px solid var(--rule);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.brand-mark img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.brand-lines { display: inline-flex; flex-direction: column; line-height: 1.1; }

.brand-name { letter-spacing: 0.005em; }

.brand-tag {
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  font-family: var(--ui);
}

.sign-in-pill {
  background: var(--oak);
  color: var(--cream);
  font-family: var(--ui);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 999px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.sign-in-pill:hover { background: var(--oak-deep); color: var(--cream); text-decoration: none; }

.home-pill {
  color: var(--oak-deep);
  font-family: var(--ui);
  font-weight: 500;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  min-height: 36px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--rule);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
}

.home-pill:hover { background: var(--cream); color: var(--oak-deep); text-decoration: none; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--rule);
  color: var(--oak-deep);
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
}

.user-chip:hover { background: var(--cream); text-decoration: none; }

.user-chip .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dawn-deep);
  object-fit: cover;
  display: inline-block;
  flex: 0 0 auto;
}

.user-chip span:not(.avatar) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 20px 32px;
}

.hero { padding: 20px 4px 8px; text-align: left; }

.hero-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.15;
  color: var(--oak-deep);
}

.hero-lead {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-family: var(--ui);
  font-size: 15px;
}

.celebration-card {
  margin-top: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, var(--dawn) 0%, var(--cream) 120%);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
}

.celebration-card .badge {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--saddle);
}

.celebration-card .body { flex: 1; }

.celebration-card .headline {
  margin: 2px 0 4px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--oak-deep);
  letter-spacing: -0.005em;
}

.celebration-card .note {
  margin: 0;
  font-family: var(--ui);
  font-size: 14px;
  color: var(--muted);
}

.celebration-card .dismiss {
  background: transparent;
  border: 0;
  color: var(--saddle);
  font-family: var(--ui);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 44px;
}

.celebration-card .dismiss:hover { background: rgba(255, 255, 255, 0.5); }

.games {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 22px;
}

@media (min-width: 560px) {
  .games { grid-template-columns: 1fr 1fr; }
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  min-height: 180px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  border: 1px solid var(--rule);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.game-card::before {
  content: "";
  display: block;
  height: 6px;
  background:
    repeating-linear-gradient(90deg, var(--oak) 0 10px, transparent 10px 16px);
}

.game-card:hover {
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(31, 26, 21, 0.10);
}

.game-card.placeholder {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.game-card-body {
  flex: 1;
  padding: 14px 18px 16px;
  position: relative;
}

.game-card-title {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--oak-deep);
  letter-spacing: 0.005em;
}

.game-card-copy {
  margin: 0 0 12px;
  color: var(--ink);
  opacity: 0.78;
  font-family: var(--ui);
  font-size: 15px;
}

.game-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.game-card-meta {
  margin: 0;
  font-family: var(--ui);
  font-size: 14px;
  color: var(--saddle);
}

.game-card-meta .n { color: var(--oak); font-weight: 700; }

.game-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--oak);
  color: var(--cream);
  font-family: var(--ui);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--rule);
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 0;
  height: 6px;
  background:
    repeating-linear-gradient(90deg, var(--oak) 0 10px, transparent 10px 16px);
  border-radius: 0 0 4px 4px;
}

.panel-title {
  margin: 6px 0 6px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--oak-deep);
}

.panel-lead {
  margin: 0 0 14px;
  font-family: var(--ui);
  color: var(--muted);
  font-size: 15px;
}

.panel-subtitle {
  margin: 20px 0 8px;
  font-family: var(--serif);
  font-weight: 500;
  color: var(--oak-deep);
  font-size: 18px;
}

.panel-body p { margin: 6px 0; }

.muted { color: var(--muted); font-family: var(--ui); font-size: 14px; }

.swatch {
  margin-top: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--rule);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--ui);
}

.swatch .k {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.swatch .v {
  font-size: 17px;
  color: var(--oak-deep);
  font-weight: 600;
}

.swatch .v .n { color: var(--saddle); font-weight: 700; }

.swatch .sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.swatch .stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.hoofprints {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.5;
  margin: 20px 4px 6px;
  color: var(--saddle);
}

.hoofprints svg { width: 20px; height: 20px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--oak);
  color: var(--cream);
  border: 0;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
}

.button:hover { background: var(--oak-deep); text-decoration: none; color: var(--cream); }

.button-ghost {
  background: transparent;
  color: var(--oak-deep);
  border: 1.5px solid var(--oak-deep);
}

.button-ghost:hover { background: var(--oak-deep); color: var(--cream); }

.button-danger {
  background: transparent;
  color: var(--saddle);
  border: 1.5px solid var(--saddle);
}

.button-danger:hover { background: var(--saddle); color: var(--cream); }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}

.button-row form { display: inline; }

.site-footer {
  padding: 20px 20px 28px;
  text-align: center;
  color: var(--muted);
  font-family: var(--ui);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer .dot { margin: 0 6px; }

.site-footer .credit {
  display: block;
  margin-top: 8px;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 12px;
}

.site-footer .credit a { color: var(--saddle); text-decoration: underline; }

@media (max-width: 480px) {
  .site-header { padding: 12px 14px 10px; gap: 8px; }
  .brand { gap: 10px; }
  .brand-name { font-size: 19px; }
  .brand-tag { font-size: 10px; letter-spacing: 0.14em; }
  .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
  .brand-mark img { width: 36px; height: 36px; }
  .sign-in-pill { padding: 8px 14px; font-size: 12px; min-height: 36px; }
  .home-pill { padding: 6px 12px; font-size: 12px; min-height: 32px; }
  .user-chip { font-size: 12px; padding: 4px 10px 4px 4px; max-width: 120px; }
  .user-chip .avatar { width: 22px; height: 22px; }
  .hero-title { font-size: 30px; }
  .panel-title { font-size: 30px; }
}

@media (max-width: 380px) {
  .brand-name { font-size: 18px; }
  .user-chip { max-width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .game-card { transition: none; }
  .game-card:hover { transform: none; }
}
