:root {
  --green: #0f766e;
  --green-bg: #ecfdf5;
  --green-fg: #065f46;
  --red: #b91c1c;
  --red-bg: #fef2f2;
  --red-fg: #7f1d1d;
  --gray-bg: #f3f4f6;
  --gray-fg: #374151;
  --text: #1f2933;
  --muted: #6b7280;
  --card-bg: #ffffff;
  --page-bg: #f7f7f5;
  --border: #e5e7eb;
  --hero-sky-top: #d7ece8;
  --hero-sky-bottom: #eef6f2;
  --hero-sea-top: #9fd0c6;
  --hero-sea-bottom: #6fb3a7;
  --hero-wave: #ffffff;
  --hero-mark: #0f766e;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green-bg: #06281f;
    --green-fg: #6ee7b7;
    --red-bg: #2c0b0b;
    --red-fg: #fca5a5;
    --gray-bg: #1f2429;
    --gray-fg: #d1d5db;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --card-bg: #14181d;
    --page-bg: #0b0d10;
    --border: #262b31;
    --hero-sky-top: #10231f;
    --hero-sky-bottom: #16302a;
    --hero-sea-top: #1c4a41;
    --hero-sea-bottom: #133530;
    --hero-wave: #6ee7b7;
    --hero-mark: #6ee7b7;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  transition: background-color 0.4s ease;
}

.app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 2rem;
}

.app-header {
  text-align: center;
  margin: -1.25rem -1.25rem 1rem;
}

.hero {
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  line-height: 0;
}

.hero svg {
  display: block;
  width: 100%;
  height: 96px;
}

.app-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.6rem 0 0;
  padding: 0 1.25rem;
}

.app-subtitle {
  margin: 0.15rem 0 0;
  padding: 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.status-card {
  border-radius: 20px;
  padding: 2rem 1.25rem 1.75rem;
  text-align: center;
  background: var(--gray-bg);
  color: var(--gray-fg);
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.status-open .status-card {
  background: var(--green-bg);
  color: var(--green-fg);
}

body.status-closed .status-card {
  background: var(--red-bg);
  color: var(--red-fg);
}

body.status-open { background: var(--page-bg); }

.status-icon {
  font-size: 2.75rem;
  line-height: 1;
}

.status-text {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.6rem 0 0;
}

.countdown {
  font-variant-numeric: tabular-nums;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin: 0.85rem 0 0.15rem;
}

.countdown-label {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.details {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.25rem 1rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  font-size: 0.95rem;
}

.detail-row + .detail-row {
  border-top: 1px solid var(--border);
}

.detail-label {
  color: var(--muted);
}

.detail-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.today {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem 1rem 1.1rem;
}

.today h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.about {
  padding: 0.25rem 0.1rem 0;
}

.about h2 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.about p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

#todayList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#todayList li {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

#todayList li.current {
  font-weight: 700;
}

.app-footer {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.app-footer p {
  margin: 0 0 0.6rem;
}

.app-footer .warning {
  color: var(--red-fg);
}

.app-footer .contact {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.app-footer .contact a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.app-footer .contact a:hover,
.app-footer .contact a:focus-visible {
  text-decoration: underline;
}
