:root {
  color-scheme: light;
  font-family: Arial, sans-serif;
  --bg: #f4f7f4;
  --panel: #ffffff;
  --line: #d6dfd6;
  --text: #16301d;
  --muted: #557161;
  --green: #2f8f4e;
  --green-soft: #e3f4e8;
  --amber: #a06a00;
  --amber-soft: #fff3d8;
  --red: #b33b2e;
  --red-soft: #fde9e5;
  --blue: #1f5fbf;
  --blue-soft: #e8f1ff;
  --buttonText: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef5ee 0%, var(--bg) 100%);
  color: var(--text);
}
.wrap {
  width: min(760px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 24px 0 40px;
}
.hero, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(16, 44, 25, 0.08);
}
.hero {
  padding: 28px 24px;
  text-align: center;
}
h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.05;
}
.lead {
  margin: 14px auto 0;
  max-width: 28rem;
  font-size: 22px;
  line-height: 1.4;
  color: var(--muted);
}
.panel {
  margin-top: 18px;
  padding: 22px;
}
.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.langBox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #f7faf7;
  border: 1px solid var(--line);
}
.langLabel {
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
}
select {
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-size: 18px;
}
.statusGrid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.statusCard {
  border-radius: 22px;
  padding: 18px;
  border: 2px solid transparent;
}
.statusLabel {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--muted);
}
.statusValue {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}
.good { background: var(--green-soft); border-color: #bee2c7; color: var(--green); }
.warn { background: var(--amber-soft); border-color: #f0d48e; color: var(--amber); }
.bad { background: var(--red-soft); border-color: #efc1b9; color: var(--red); }
.info { background: var(--blue-soft); border-color: #c9daf9; color: var(--blue); }
label {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 700;
}
input, button {
  width: 100%;
  border-radius: 18px;
  font: inherit;
}
input {
  padding: 18px 20px;
  font-size: 26px;
  border: 2px solid var(--line);
  color: var(--text);
  background: #fff;
}
button {
  padding: 20px 22px;
  font-size: 28px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  color: var(--buttonText);
  transition: transform 120ms ease, opacity 120ms ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); }
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}
.buttonGrid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 14px;
}
.primary { background: var(--green); }
.secondary { background: var(--blue); }
.danger { background: var(--red); }
.ghost {
  background: #eef4ff;
  color: var(--blue);
  border: 2px solid #c9daf9;
}
.roomBox {
  margin-top: 16px;
  padding: 18px;
  border-radius: 20px;
  background: #f7faf7;
  border: 2px solid var(--line);
}
.roomTitle {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--muted);
}
.roomLink {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  word-break: break-word;
}
.help {
  margin: 18px 0 0;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
}
.hidden { display: none; }
audio { display: none; }
@media (max-width: 640px) {
  .wrap { width: min(100vw - 16px, 760px); padding-top: 16px; }
  .hero, .panel { border-radius: 20px; }
  .panel { padding: 18px; }
  .lead, .help { font-size: 18px; }
  label { font-size: 20px; }
  input { font-size: 22px; }
  button { font-size: 24px; }
  .statusValue { font-size: 24px; }
}
