:root {
  color-scheme: light;
  --bg: #fafaf8;
  --ink: #1f2320;
  --muted: #8a8f8a;
  --card: #ffffff;
  --border: #e4e4df;
  --red-dim: #4a2b2b;
  --red-lit: #e5484d;
  --yellow-dim: #4a3f24;
  --yellow-lit: #f5a524;
  --green-dim: #274a37;
  --green-lit: #2fbf71;
}

* { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 24px 16px 48px;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

main {
  max-width: 480px;
  margin: 0 auto;
  min-width: 0;
}

.lang-toggle {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  max-width: 480px;
  margin: 0 auto 16px;
}

.lang-btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.lang-btn.active {
  color: var(--ink);
  border-color: var(--ink);
  font-weight: 600;
}

section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.status-section {
  text-align: center;
}

.main-heading {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--ink);
}

.status-emoji {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 8px;
}

.status-text {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.status-text.red { color: var(--red-lit); }
.status-text.yellow { color: #b3790f; }
.status-text.green { color: #1f8a54; }

h2 {
  font-size: 16px;
  margin: 0 0 14px;
}

#guess-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#guess-form label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

#guess-form input {
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}

#guess-form button {
  margin-top: 16px;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

#guess-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

.form-message {
  margin: 10px 0 0;
  font-size: 13px;
}

.form-message.error { color: #c0392b; }
.form-message.success { color: #1f8a54; }

#guess-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#guess-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}

#guess-list li.expired {
  color: var(--muted);
  background: #f2f2ef;
}

#guess-list .guess-name {
  font-weight: 600;
}

#guess-list li.expired .guess-name {
  font-weight: 500;
}

#guess-list .guess-when {
  text-align: right;
}

#guess-list .guess-tag {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.empty-message {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
