* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --bg-card: #101010;
  --border: #2a2a2a;
  --border-soft: #1c1c1c;
  --text-primary: #fafafa;
  --text-secondary: #9b9b9b;
  --text-muted: #5f5f5f;
  --accent: #3b82f6;
  --accent-hover: #2f6fe0;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --danger: #e5484d;
  --danger-soft: rgba(229, 72, 77, 0.1);
  --warning: #f0a83a;
  --warning-soft: rgba(240, 168, 58, 0.12);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 16px 40px -20px rgba(0, 0, 0, 0.7);
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-glow {
  display: none;
}

.hidden {
  display: none !important;
}

.icon {
  width: 18px;
  height: 18px;
}

.spin {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 22px;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.header-titles {
  min-width: 0;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.refresh-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.refresh-btn .icon {
  width: 15px;
  height: 15px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.brand-mark {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.brand-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.brand-product {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-secondary);
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.page {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex: 1;
}

.today-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.today-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--border-soft);
}

.today-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13.5px;
}

.today-date {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.today-card-body {
  padding: 40px 26px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.answer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.tiles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.tile {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 22px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.tiles.small .tile {
  width: 34px;
  height: 34px;
  font-size: 14px;
  border-radius: 6px;
}

.status-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.status-badge.confirmed {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.3);
}

.status-badge.unconfirmed {
  color: var(--text-secondary);
}

.status-badge.corrected {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(240, 168, 58, 0.35);
}

.status-badge.small {
  padding: 5px 11px;
  font-size: 11.5px;
  white-space: nowrap;
}

.status-badge .icon {
  width: 14px;
  height: 14px;
}

.status-badge.small .icon {
  width: 12px;
  height: 12px;
}

.history-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.history-header .icon {
  width: 17px;
  height: 17px;
}

.history-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.history-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-list {
  list-style: none;
  width: 100%;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-soft);
}

.history-item:last-child {
  border-bottom: none;
}

.history-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  min-width: 0;
}

.history-date {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  width: 92px;
  flex-shrink: 0;
}

.state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.state-block .icon {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
}

.state-block.error .icon {
  color: var(--danger);
}

.retry-btn {
  margin-top: 4px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.retry-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.site-footer {
  text-align: center;
  padding: 26px 24px 34px;
  color: var(--text-muted);
  font-size: 12.5px;
  border-top: 1px solid var(--border-soft);
}

@media (max-width: 560px) {
  .page-title {
    font-size: 23px;
  }

  .today-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .today-card-body {
    padding: 32px 18px 36px;
  }

  .tile {
    width: 46px;
    height: 46px;
    font-size: 19px;
  }

  .tiles.small .tile {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .history-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 10px;
  }

  .history-left {
    gap: 10px;
  }

  .history-date {
    width: auto;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .tiles.small {
    gap: 6px;
  }

  .tiles.small .tile {
    width: 25px;
    height: 25px;
    font-size: 11px;
  }
}