@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&family=Spectral:wght@500;600;700&display=swap");

:root {
  --ink: #09111f;
  --paper: #f4f5f2;
  --panel: #fcfcfa;
  --line: #cfd4c6;
  --brand: #1f6a5f;
  --brand-2: #af3f2b;
  --accent: #dcae55;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Source Sans 3", Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 250, 220, 0.28) 0%, rgba(255, 250, 220, 0.08) 22%, rgba(255, 250, 220, 0) 42%),
    radial-gradient(circle at 14% 10%, rgba(132, 185, 255, 0.12) 0%, rgba(132, 185, 255, 0) 30%),
    radial-gradient(circle at 86% 12%, rgba(132, 185, 255, 0.1) 0%, rgba(132, 185, 255, 0) 28%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 70px,
      rgba(255, 255, 255, 0.01) 70px,
      rgba(255, 255, 255, 0.01) 140px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.032) 0,
      rgba(255, 255, 255, 0.032) 1px,
      transparent 1px,
      transparent 96px
    ),
    linear-gradient(180deg, rgba(7, 16, 36, 0.28) 0%, rgba(7, 16, 36, 0.08) 24%, rgba(7, 16, 36, 0) 100%),
    linear-gradient(165deg, #1c3f39 0%, #17352f 45%, #102722 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 280px 100%, 100% 96px, 100% 100%;
  background-position: center center;
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3,
.tab-btn,
.daily-grid-col-header,
.daily-grid-row-header,
.stat strong {
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(16px);
  opacity: 0.16;
  pointer-events: none;
}

.bg-a {
  width: 280px;
  height: 280px;
  background: #f3e4a1;
  top: -90px;
  right: -70px;
}

.bg-b {
  width: 260px;
  height: 260px;
  background: #5da38c;
  bottom: -100px;
  left: -80px;
}

.app {
  width: min(980px, 94vw);
  margin: 24px auto 40px;
  display: grid;
  gap: 16px;
}

.hero {
  padding: 14px 4px;
}

.hero-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(244, 247, 242, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

.language-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.language-flag {
  display: block;
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(9, 17, 31, 0.12);
}

.language-picker select {
  font: inherit;
  color: #f6f8f4;
  background: rgba(12, 26, 24, 0.58);
  border: 1px solid rgba(233, 238, 230, 0.26);
  border-radius: 8px;
  padding: 6px 8px;
  backdrop-filter: blur(8px);
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 247, 241, 0.88);
  margin: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.32);
}

h1 {
  margin: 8px 0 6px;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 0.95;
  background: linear-gradient(135deg, #f8f6ea, #dff2eb, #f2cf88);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

.subtitle {
  margin: 0;
  color: rgba(241, 245, 239, 0.9);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}

.info-panel {
  border: 1px solid #c7cfbf;
  border-left: 6px solid var(--accent);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8f7f1;
  color: #3e4540;
  box-shadow: 0 6px 16px rgba(9, 17, 31, 0.05);
}

.info-panel p {
  margin: 0;
  font-size: 0.95rem;
}

.panel {
  background: color-mix(in srgb, var(--panel) 92%, #fff);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(9, 17, 31, 0.06);
}

#game-play {
  display: flex;
  flex-direction: column;
}

#game-play #result-section {
  order: 1;
}

#game-play .duel-grid {
  order: 2;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.row {
  display: flex;
  gap: 10px;
}

input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 11px 12px;
  border: 1px solid #bfc6b7;
  border-radius: 10px;
  background: #fff;
}

.btn {
  font: inherit;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
}

.btn.primary:hover {
  background: #18574e;
}

.btn.secondary {
  background: var(--accent);
  color: var(--ink);
  margin-top: 10px;
}

.btn.secondary:hover {
  background: #c99a43;
}

.btn.details {
  width: 100%;
  background: #e8ede5;
  border: 1px solid #c9d0c2;
  font-size: 0.9em;
  padding: 6px 12px;
  margin-bottom: 6px;
}

.btn.details:hover {
  background: #dae3d7;
}

.btn.choice {
  width: 100%;
  background: #ecefe8;
  border: 1px solid #c9d0c2;
  transition: all 0.2s ease;
}

.btn.choice:hover {
  background: #e3e9de;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn.choice:active {
  transform: scale(0.98);
}

.btn.choice:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.filters-toggle-btn {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  writing-mode: horizontal-tb;
  padding: 10px 8px;
  background: #f2cf88;
  color: #1d2c29;
  border: 1px solid #d4b06d;
  box-shadow: 0 8px 20px rgba(9, 17, 31, 0.16);
}

.filters-toggle-btn:hover {
  background: #e5bf74;
}

.filters-panel {
  position: fixed;
  top: 84px;
  right: 56px;
  z-index: 890;
  width: min(380px, calc(100vw - 90px));
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #d7ddd0;
  border-radius: 12px;
  background: color-mix(in srgb, #f6f8f3 90%, #ffffff);
  box-shadow: 0 16px 34px rgba(9, 17, 31, 0.2);
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.filters-panel.collapsed {
  transform: translateX(calc(100% + 18px));
  opacity: 0;
  pointer-events: none;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.filters-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #21433d;
}

.filters-summary {
  margin: 0;
  font-size: 0.85rem;
  color: #55645c;
}

.year-filters {
  margin-bottom: 12px;
}

.filter-label {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #3f4e46;
}

.year-slider-group {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.year-slider-group label {
  font-size: 0.85rem;
  color: #4d5a53;
}

.year-slider-group input[type="range"] {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.year-slider-group strong {
  min-width: 52px;
  text-align: right;
  color: #21433d;
}

.team-filters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.team-filter-actions {
  display: inline-flex;
  gap: 6px;
}

.team-filter-btn {
  padding: 6px 10px;
  border: 1px solid #c3ccbf;
  background: #eef2ea;
  color: #37453f;
  font-size: 0.8rem;
}

.team-filter-btn:hover {
  background: #e1e9dc;
}

.team-filters-grid {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c8d0c3;
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  color: #3a4741;
  cursor: pointer;
  user-select: none;
}

.team-chip input {
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid #9cac9f;
  border-radius: 50%;
  margin: 0;
  padding: 0;
  background: #ffffff;
}

.team-chip input:checked {
  border-color: #1f6a5f;
  background: radial-gradient(circle at 50% 50%, #1f6a5f 0 4px, transparent 5px);
}

.team-chip-name {
  font-size: 0.84rem;
}

.activity-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.activity-toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.activity-toggle-label {
  font-size: 0.88rem;
  color: #49534d;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #c9d0c2;
  transition: 0.2s ease;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background-color: #ffffff;
  transition: 0.2s ease;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: var(--brand);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

.stat {
  background: #f0f2ed;
  border-radius: 12px;
  border: 1px solid #d4d9ce;
  padding: 10px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat:hover {
  background: #e8ede5;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.stat span {
  display: block;
  font-size: 0.85rem;
  color: #4b554e;
}

.stat strong {
  font-size: 1.4rem;
  color: var(--brand);
}

.duel-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.card {
  background: #f7f8f5;
  border: 2px solid #d4dacd;
  border-radius: 14px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card:hover::before {
  opacity: 1;
}

.team-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 58px;
  height: 58px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.32;
  pointer-events: none;
}

.team {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555c55;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.card h3 {
  margin: 8px 0 4px;
  animation: slideIn 0.3s ease-out;
}

.activity-years {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: #4f5a52;
  font-style: italic;
}

.player-score {
  margin: 0 0 12px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.02em;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.versus {
  font-weight: 700;
  color: var(--brand-2);
}

.result {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed #c5cabd;
  border-radius: 10px;
  background: #fbfcf9;
}

#result-message {
  margin: 0 0 8px;
}

.final-stats p {
  margin: 8px 0;
}

.scores ol {
  margin: 0;
  padding-left: 1.15rem;
}

.scores li {
  margin: 6px 0;
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  .hero-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .row {
    flex-direction: column;
  }

  .duel-grid {
    grid-template-columns: 1fr;
  }

  .versus {
    text-align: center;
    padding: 2px 0;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .filters-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filters-toggle-btn {
    right: 10px;
    top: auto;
    bottom: 14px;
    transform: none;
    writing-mode: horizontal-tb;
    padding: 8px 12px;
  }

  .filters-panel {
    right: 10px;
    left: 10px;
    top: auto;
    bottom: 64px;
    width: auto;
    max-height: 62vh;
  }

  .filters-panel.collapsed {
    transform: translateY(14px);
  }

  .year-slider-group {
    grid-template-columns: 36px 1fr 46px;
  }

  .activity-toggle-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .activity-toggle-control {
    justify-content: flex-start;
  }
}

/* Player Details Modal */
.player-details-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 17, 31, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: white;
  border-radius: 18px;
  padding: 24px;
  max-width: 500px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(9, 17, 31, 0.3);
  animation: slideUp 0.3s ease-out;
}

.modal-content h3 {
  margin-top: 0;
  color: var(--brand);
}

.modal-content h4 {
  margin-top: 16px;
  color: var(--brand-2);
}

.modal-content ul {
  list-style: none;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
}

.modal-content li {
  padding: 8px;
  margin: 4px 0;
  background: #f7f8f5;
  border-radius: 6px;
  font-size: 0.9em;
}

.details-opponent-flags {
  margin-left: 6px;
  letter-spacing: 0.06em;
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}

.details-opponent-flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(9, 17, 31, 0.14);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Tab navigation ─────────────────────────────────────────────────────────── */

.tab-nav {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.18);
  padding: 4px;
  border-radius: 14px;
}

.tab-btn {
  flex: 1;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(244, 245, 242, 0.52);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.16s, color 0.16s;
}

.tab-btn.active,
.tab-btn[aria-selected="true"] {
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(9, 17, 31, 0.18);
}

.tab-btn:hover:not(.active):not([aria-selected="true"]) {
  color: rgba(244, 245, 242, 0.88);
  background: rgba(255, 255, 255, 0.08);
}

/* ── Daily game section ─────────────────────────────────────────────────────── */

.daily-section {
  max-width: 680px;
  margin: 0 auto;
}

.daily-header {
  text-align: center;
  margin-bottom: 20px;
}

.daily-header h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.daily-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #4d5a53;
}

/* Search */

.daily-search-area {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.daily-search-wrapper {
  position: relative;
  flex: 1;
}

.daily-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}

.daily-search-input:focus {
  border-color: var(--brand);
}

.daily-search-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.daily-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  box-shadow: 0 8px 24px rgba(9, 17, 31, 0.14);
}

.daily-suggestion-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  gap: 12px;
}

.daily-suggestion-item:hover,
.daily-suggestion-item.active {
  background: rgba(31, 106, 95, 0.1);
}

.suggestion-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-team {
  font-size: 0.8rem;
  color: #55645c;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Attempts label */

.daily-attempts-label {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: #55645c;
  min-height: 1.2em;
}

.daily-revealed-hints {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d8d5c4;
  background: #f8f1da;
}

.daily-revealed-hints-title {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #5a4b1d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.daily-revealed-hints-list {
  margin: 0;
  padding-left: 16px;
  color: #433913;
  font-size: 0.86rem;
}

.daily-revealed-hints-list li {
  margin: 2px 0;
}

.daily-hint-offer {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #c8d6e5;
  background: #edf4fb;
}

.daily-hint-offer-title {
  margin: 0 0 4px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1f3e63;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.daily-hint-offer-text {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: #24476f;
}

.daily-hint-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.daily-hint-option,
.daily-hint-skip {
  padding: 7px 10px;
  font-size: 0.82rem;
}

/* Guesses grid */

.daily-guesses-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}

.daily-guess-header,
.daily-guess-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) repeat(5, minmax(56px, 76px));
  gap: 5px;
  align-items: stretch;
}

.daily-guess-header {
  font-size: 0.72rem;
  color: #7e8e85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 2px 2px;
}

.guess-col-hint { text-align: center; }

.guess-name {
  padding: 8px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.87rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
}

.guess-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
  gap: 3px;
  min-height: 48px;
}

.hint-icon  { font-size: 1rem; line-height: 1; }
.hint-label { font-size: 0.7rem; opacity: 0.9; overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }

.hint-match   { background: #c4ece3; color: #0d4038; font-weight: 600; border: 1px solid #9dd9cc; }
.hint-up      { background: #c4ddf5; color: #0d2d4e; border: 1px solid #9dc2ea; }
.hint-down    { background: #f5d9c4; color: #4e2010; border: 1px solid #eabc9d; }
.hint-diff    { background: #e4e7e0; color: #3a423d; border: 1px solid #ccd0c8; }
.hint-unknown { background: #dde0da; color: #58615c; border: 1px solid #c6c9c3; }

.guess-correct .guess-name {
  background: #d4f0ea;
  border-color: #9dd9cc;
  font-weight: 600;
  color: #0a3a34;
}

/* Result */

.daily-result {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}

.daily-result p {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.5;
}

.daily-result .btn {
  margin: 0 4px 0;
}

/* Daily grid mode */

.daily-grid-section {
  max-width: 860px;
  margin: 0 auto;
}

.daily-grid-header {
  text-align: center;
  margin-bottom: 16px;
}

.daily-grid-subtitle,
.daily-grid-instructions {
  margin: 4px 0;
  color: #4d5a53;
}

.daily-grid-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.daily-grid-progress,
.daily-grid-selected-rule {
  margin: 0;
  font-size: 0.9rem;
  color: #41504a;
}

.daily-grid-board {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.daily-grid-corner,
.daily-grid-col-header,
.daily-grid-row-header {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #d6ddd3;
  background: #f2f4ef;
  font-size: 0.82rem;
  line-height: 1.25;
}

.daily-grid-col-header {
  text-align: center;
  font-weight: 700;
  color: #29433b;
}

.daily-grid-row-header {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: #29433b;
}

.daily-grid-cell {
  border: 1px solid #cfd7cc;
  border-radius: 10px;
  background: #ffffff;
  min-height: 70px;
  padding: 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  font-size: 0.88rem;
}

.daily-grid-cell.empty {
  color: #6b786f;
  border-style: dashed;
}

.daily-grid-cell.filled {
  color: #102722;
  background: #edf5f3;
  border-color: #9fc8bc;
}

.daily-grid-cell.revealed {
  color: #5c1a1a;
  background: #fdecea;
  border-color: #e5a5a0;
}

.daily-grid-cell.selected {
  outline: 2px solid #1f6a5f;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(31, 106, 95, 0.15);
}

.daily-grid-cell-team {
  font-size: 0.78rem;
  color: #4f5f57;
}

.daily-grid-search-area {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.daily-grid-search-area .btn {
  margin-top: 0;
  white-space: nowrap;
}

.btn.danger {
  background: #c0392b;
  color: #ffffff;
  border-color: #a93226;
}

.btn.danger:hover {
  background: #a93226;
}

.btn.danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.daily-grid-search-wrapper {
  position: relative;
  flex: 1;
}

.daily-grid-search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-family: inherit;
}

.daily-grid-search-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.daily-grid-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(9, 17, 31, 0.14);
  z-index: 200;
}

.daily-grid-suggestion-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.daily-grid-suggestion-item:hover,
.daily-grid-suggestion-item.active {
  background: rgba(31, 106, 95, 0.1);
}

.daily-grid-suggestion-team {
  font-size: 0.8rem;
  color: #55645c;
}

.daily-grid-message {
  margin: 0;
  min-height: 1.3em;
  font-size: 0.9rem;
}

.daily-grid-message.is-info {
  color: #1f3e63;
}

.daily-grid-message.is-error {
  color: #8a2d1f;
}

.daily-grid-message.is-success {
  color: #0f5a4f;
  font-weight: 600;
}

/* Responsive */

@media (max-width: 520px) {
  .daily-guess-header,
  .daily-guess-row {
    grid-template-columns: minmax(80px, 1fr) repeat(5, minmax(52px, 1fr));
    gap: 3px;
  }

  .daily-guess-header {
    font-size: 0.63rem;
  }

  .hint-icon {
    font-size: 0.92rem;
  }

  .hint-label {
    display: block;
    font-size: 0.58rem;
    line-height: 1.05;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
  }

  .guess-hint {
    min-height: 44px;
    padding: 5px 2px;
    gap: 2px;
  }

  .daily-grid-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .daily-grid-board {
    grid-template-columns: minmax(120px, 1.1fr) repeat(3, minmax(74px, 1fr));
    gap: 5px;
  }

  .daily-grid-col-header,
  .daily-grid-row-header {
    font-size: 0.72rem;
    padding: 8px;
  }

  .daily-grid-cell {
    min-height: 62px;
    font-size: 0.78rem;
    padding: 6px;
  }

  .daily-grid-cell-team {
    display: none;
  }

  .daily-grid-search-area {
    flex-direction: column;
  }
}
