@import url('variables.css');

#undercover61-screen {
  --uc61-accent: #6551a4;
  --uc61-accent-soft: #f0edfa;
  --uc61-primary: #5d498f;
  --uc61-primary-text: #fff;
  width: 100%;
  color: var(--ink);
  font-family: var(--base-font-family);
}
#undercover61-screen[hidden] { display: none !important; }
.uc61-shell {
  box-sizing: border-box;
  width: min(100%, 660px);
  margin: 0 auto 34px;
  padding: 12px 0 28px;
  color: var(--ink);
  font-family: var(--base-font-family);
}
.uc61-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 10px;
}
.uc61-brand {
  color: var(--uc61-accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.6px;
}
.uc61-link-button {
  min-width: 48px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  color: var(--uc61-accent);
  background: transparent;
  font: 800 13px/1.25 var(--base-font-family);
}
.uc61-title {
  margin: 8px 0 8px;
  font-size: clamp(32px, 8vw, 47px);
  letter-spacing: -1.7px;
  line-height: 1.05;
}
.uc61-count {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .35px;
}
.uc61-intro {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.uc61-card {
  box-sizing: border-box;
  margin: 14px 0;
  padding: clamp(16px, 4vw, 22px);
  border: 2px solid var(--ui22-edge, var(--ink));
  border-radius: 18px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 4px 5px 0 var(--ui22-shadow, var(--ink));
}
.uc61-section-title {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}
.uc61-help {
  margin: 3px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.uc61-counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.uc61-counter-row:first-of-type { margin-top: 8px; }
.uc61-counter-copy { display: grid; gap: 2px; min-width: 0; }
.uc61-counter-label { font-size: 14px; font-weight: 850; }
.uc61-counter-copy .uc61-help { margin: 0; font-size: 11px; }
.uc61-counter-controls,
.uc61-vote-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.uc61-round-button {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  border: 2px solid var(--ui22-edge, var(--ink));
  border-radius: 50%;
  color: var(--uc61-accent);
  background: var(--paper);
  box-shadow: 2px 3px 0 var(--ui22-shadow, var(--ink));
  font: 900 23px/1 var(--base-font-family);
}
.uc61-round-button:active:not(:disabled) { transform: translateY(1px); box-shadow: 1px 2px 0 var(--ui22-shadow, var(--ink)); }
.uc61-round-button:disabled { cursor: not-allowed; opacity: .4; box-shadow: none; }
.uc61-counter-value,
.uc61-vote-count {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  text-align: center;
}
.uc61-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--uc61-accent);
  background: var(--uc61-accent-soft);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}
.uc61-form-row {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}
.uc61-form-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}
#undercover61-screen input,
#undercover61-screen select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 49px;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--surface-hi, var(--paper));
  font: 600 14px/1.35 var(--base-font-family);
}
.uc61-name-list { display: grid; gap: 2px; }
.uc61-bank-info {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-low);
  font-size: 12px;
  line-height: 1.5;
}
.uc61-rules {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-low);
}
.uc61-rules summary {
  min-height: 32px;
  color: var(--uc61-accent);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.uc61-rules ul { margin: 9px 0 0; padding-left: 20px; }
.uc61-rules li { margin: 8px 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.uc61-button {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  margin: 11px 0 0;
  padding: 13px 16px;
  border: 2px solid var(--ui22-edge, var(--ink));
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 3px 4px 0 var(--ui22-shadow, var(--ink));
  font: 850 14px/1.3 var(--base-font-family);
  text-align: center;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.uc61-button:hover:not(:disabled) { transform: translateY(-1px); }
.uc61-button:active:not(:disabled) { transform: translateY(1px); box-shadow: 1px 2px 0 var(--ui22-shadow, var(--ink)); }
.uc61-button:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
.uc61-button-primary {
  border-color: var(--uc61-primary);
  color: var(--uc61-primary-text);
  background: var(--uc61-primary);
  box-shadow: 3px 4px 0 var(--ui22-shadow, var(--ink));
}
.uc61-reveal-button { min-height: 58px; margin-top: 20px; font-size: 16px; }
.uc61-status,
.uc61-error {
  margin: 12px 0;
  padding: 11px 13px;
  border-radius: 10px;
  color: #8b3125;
  background: #fff0ed;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}
.uc61-status[data-kind="info"] { color: var(--muted); background: var(--surface-low); }
.uc61-role-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 9px 0;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--uc61-accent) 40%, transparent);
  border-radius: 999px;
  color: var(--uc61-accent);
  background: var(--uc61-accent-soft);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .8px;
}
.uc61-secret-label { margin: 18px 0 2px; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.uc61-secret-word {
  margin: 5px 0 18px;
  padding: 20px 14px;
  border: 2px dashed var(--uc61-accent);
  border-radius: 15px;
  color: var(--uc61-accent);
  background: var(--uc61-accent-soft);
  font-size: clamp(24px, 8vw, 34px);
  font-weight: 950;
  letter-spacing: .015em;
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-align: center;
}
.uc61-white-hint { margin: 14px 0 18px; text-align: center; }
.uc61-progress {
  display: block;
  width: 100%;
  height: 8px;
  margin: 4px 0 16px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--uc61-accent);
}
.uc61-player-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 10px 0 0; padding: 0; list-style: none; }
.uc61-player-list li { min-width: 0; padding: 10px 11px; border-radius: 10px; background: var(--surface-low); color: var(--ink); font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
.uc61-vote-list { display: grid; gap: 5px; margin-top: 10px; }
.uc61-vote-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 7px 0; border-top: 1px solid var(--line); }
.uc61-vote-name { min-width: 0; color: var(--ink); font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.uc61-vote-total { margin: 14px 0 2px; color: var(--uc61-accent); font-size: 13px; font-weight: 900; text-align: center; }
.uc61-winner-title { margin: 12px 0; color: var(--uc61-accent); font-size: clamp(25px, 7vw, 34px); font-weight: 950; letter-spacing: -.6px; line-height: 1.16; text-align: center; }
.uc61-score-list { margin: 10px 0 0; padding-left: 20px; }
.uc61-score-list li { margin: 6px 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.uc61-scoreboard { display: grid; gap: 6px; margin-top: 10px; }
.uc61-score-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 46px; align-items: center; gap: 8px; min-height: 48px; padding: 7px 9px; border-radius: 10px; background: var(--surface-low); }
.uc61-score-rank { color: var(--muted); font-size: 11px; font-weight: 900; text-align: center; }
.uc61-score-name { min-width: 0; color: var(--ink); font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.uc61-score-earned { color: var(--muted); font-size: 11px; font-weight: 750; white-space: nowrap; }
.uc61-score-total { color: var(--uc61-accent); font-size: 16px; text-align: right; }

html[data-appearance="dark"] #undercover61-screen {
  --uc61-accent: #c2b3ff;
  --uc61-accent-soft: #29243b;
  --uc61-primary: #58458c;
  --uc61-primary-text: #fff;
}
html[data-appearance="glass"] #undercover61-screen {
  --uc61-accent: #c4ffe5;
  --uc61-accent-soft: rgba(196, 255, 229, .13);
  --uc61-primary: #c4ffe5;
  --uc61-primary-text: #07344c;
}
html[data-appearance="brutal"] #undercover61-screen {
  --uc61-accent: #181818;
  --uc61-accent-soft: #fff1a8;
  --uc61-primary: #ffd000;
  --uc61-primary-text: #111;
}
html[data-appearance="dark"] #undercover61-screen .uc61-status:not([data-kind="info"]),
html[data-appearance="dark"] #undercover61-screen .uc61-error {
  color: #ffd9d2;
  background: #4c2523;
}
html[data-appearance="glass"] #undercover61-screen .uc61-status:not([data-kind="info"]),
html[data-appearance="glass"] #undercover61-screen .uc61-error {
  color: #fff;
  background: rgba(124, 28, 56, .68);
}
@media (max-width: 600px) {
  .uc61-shell { padding-top: 4px; }
  .uc61-title { margin-top: 4px; }
  .uc61-counter-row { gap: 8px; }
  .uc61-round-button { width: 44px; height: 44px; min-width: 44px; }
}
@media (max-width: 360px) {
  .uc61-card { padding: 15px 13px; }
  .uc61-player-list { grid-template-columns: 1fr; }
  .uc61-score-row { grid-template-columns: 23px minmax(0, 1fr) auto 35px; gap: 5px; padding-inline: 6px; }
  .uc61-score-earned { font-size: 10px; }
  .uc61-vote-row { gap: 5px; }
  .uc61-vote-controls { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .uc61-button { transition: none; }
}
html[data-motion="reduce"] .uc61-button { transition: none; }
