* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #1a1d23;
  color: #e4e6eb;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}
a { color: #7dd3a0; }
.wrap {
  max-width: 520px;
  margin: 0 auto;
}
.brand {
  text-align: center;
  margin-bottom: 24px;
}
.brand h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.brand-icon {
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.brand p {
  margin: 8px 0 0;
  opacity: 0.75;
  font-size: 0.9rem;
}
.site-credit {
  margin: 28px 0 0;
  text-align: center;
  font-size: 0.7rem;
  opacity: 0.45;
}
.site-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.timer-page .site-credit {
  margin-top: 32px;
  width: 100%;
  max-width: 520px;
}
.card {
  background: #252830;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  opacity: 0.9;
}
input[type="text"],
input[type="number"],
select {
  background: #1a1d23;
  border: 1px solid #3d4452;
  border-radius: 8px;
  color: #e4e6eb;
  padding: 10px 12px;
  font-size: 1rem;
  width: 100%;
}
.row-inline {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
button {
  background: #3d4452;
  color: #e4e6eb;
  border: 2px solid #5c6370;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 1rem;
  cursor: pointer;
}
button:hover { background: #4b5263; border-color: #7dd3a0; }
button.primary { border-color: #7dd3a0; }
#btnPause {
  min-width: 6.5rem;
  box-sizing: border-box;
  text-align: center;
  font-size: 1rem;
  letter-spacing: 0;
}
button.resume-active {
  border-color: #f0c674;
  color: #f0c674;
}
button.resume-active:hover {
  border-color: #f0c674;
  background: #4b5263;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.danger { border-color: #c84c3c; }
.room-list { list-style: none; padding: 0; margin: 0; }
.room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #3d4452;
}
.room-item:last-child { border-bottom: none; }
.room-meta { flex: 1; min-width: 0; }
.room-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-sub {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 4px;
}
.empty {
  opacity: 0.7;
  font-size: 0.9rem;
  padding: 8px 0;
}
.lobby-rooms-note {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.75;
  line-height: 1.4;
}
.lobby-rooms-empty {
  margin: 0;
  padding: 8px 0 12px;
  font-size: 1rem;
  opacity: 0.7;
  line-height: 1.45;
}
.banner {
  background: #3d2a2a;
  border: 1px solid #c84c3c;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.banner a { color: #f0c674; }
.timer-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 40px);
}
.timer-page .wrap { width: 100%; }
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 520px;
  margin: 0 auto 16px;
  font-size: 0.9rem;
}
.badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: #3d4452;
}
.badge.owner { border: 1px solid #7dd3a0; color: #7dd3a0; }
.badge.viewer { border: 1px solid #f0c674; color: #f0c674; }
.phase {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.85;
  margin-bottom: 8px;
  text-align: center;
}
.phase.work { color: #7dd3a0; }
.phase.short { color: #f0c674; }
.phase.long { color: #f0c674; }
.time {
  font-size: 4rem;
  font-variant-numeric: tabular-nums;
  margin: 16px 0;
  text-align: center;
}
.controls {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  flex-wrap: wrap;
  justify-content: center;
}
.progress {
  width: 100%;
  max-width: 320px;
  height: 6px;
  background: #2c313a;
  border-radius: 3px;
  margin: 24px auto 0;
  overflow: hidden;
}
.progress-inner {
  height: 100%;
  background: #7dd3a0;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.progress-inner.break { background: #f0c674; }
.progress-inner.long { background: #f0c674; }
.settings {
  margin-top: 32px;
  padding: 20px;
  background: #252830;
  border-radius: 12px;
  max-width: 340px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.settings h3 { margin: 0 0 16px 0; font-size: 0.9rem; opacity: 0.9; }
.settings.readonly input,
.settings.readonly select { opacity: 0.65; pointer-events: none; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.section-head h3 { margin: 0; }
.settings .micro-desc { font-size: 0.8rem; opacity: 0.8; margin-bottom: 12px; }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.row label { font-size: 0.85rem; min-width: 90px; }
.row input[type="number"] {
  width: 52px;
  padding: 6px 4px;
  text-align: center;
}
.row input[type="range"] {
  flex: 1;
  min-width: 60px;
  accent-color: #7dd3a0;
}
.row .unit { font-size: 0.75rem; opacity: 0.7; }
.row--compact { flex-wrap: wrap; gap: 6px 8px; }
.row--compact .input--narrow { width: 42px; padding: 4px 2px; font-size: 0.9rem; }
.micro-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #3d4452;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
}
.checkbox-row input { width: 18px; height: 18px; accent-color: #7dd3a0; }
