:root {
  --bg: #0a0e14;
  --surface: #141c28;
  --surface-2: #1a2436;
  --border: #2a3850;
  --text: #eef3fa;
  --muted: #8fa3be;
  --accent: #4d9fff;
  --accent-glow: rgba(77, 159, 255, 0.35);
  --accent-hover: #7ab8ff;
  --ok: #3ee6a0;
  --ok-glow: rgba(62, 230, 160, 0.25);
  --bad: #ff7b85;
  --die-face: linear-gradient(145deg, #ffffff 0%, #dce4ee 55%, #c5d0de 100%);
  --die-pip: #1a2233;
  --die-shadow: 0 6px 0 #9aabb8, 0 10px 28px rgba(0, 0, 0, 0.45);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(77, 159, 255, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(62, 230, 160, 0.06), transparent);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

.hero {
  position: relative;
  z-index: 1;
  background: linear-gradient(160deg, #162032 0%, #0a0e14 70%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.5rem 2rem;
}

.hero-inner {
  max-width: 56rem;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(77, 159, 255, 0.1);
  border: 1px solid rgba(77, 159, 255, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, #9ec5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.layout {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.panel.hidden {
  display: none;
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.12rem;
}

.hint {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.hint code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.entropy-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 1rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}

.entropy-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.entropy-stat .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.entropy-stat strong {
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.entropy-stat .unit {
  font-size: 0.78rem;
  color: var(--muted);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.word-count-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.word-count-select {
  font: inherit;
  font-size: 0.92rem;
  max-width: 22rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.word-count-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.word-count-hint {
  margin: 0;
  font-size: 0.82rem;
}

.demo-warning {
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 123, 133, 0.45);
  background: rgba(255, 123, 133, 0.1);
  font-size: 0.86rem;
}

.demo-warning strong {
  display: block;
  color: var(--bad);
  margin-bottom: 0.35rem;
}

.demo-warning p {
  margin: 0;
  color: var(--text);
}

.demo-warning-inline {
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
}

.demo-warning-inline p {
  display: inline;
}

.bip39-output {
  margin-top: 0.75rem;
}

.bip39-output.hidden {
  display: none;
}

.wallet-addresses {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.wallet-addresses.hidden {
  display: none;
}

.wallet-addresses-title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
}

.wallet-address-list {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.wallet-address-list dt {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.wallet-address-list dd {
  margin: 0.2rem 0 0;
}

.wallet-addr {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--ok);
}

.wallet-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.app-modal.hidden {
  display: none;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 14, 0.78);
  backdrop-filter: blur(4px);
}

.app-modal-card {
  position: relative;
  width: min(100%, 28rem);
  padding: 1.35rem 1.4rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.app-modal-badge {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bad);
  background: rgba(255, 123, 133, 0.12);
  border: 1px solid rgba(255, 123, 133, 0.35);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.app-modal-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
}

.app-modal-lead {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.app-modal-warning {
  margin-bottom: 1rem;
}

.app-modal-actions {
  margin: 0;
  justify-content: flex-end;
}

.btn {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.6rem 1.1rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.btn:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(135deg, #3d8bfd 0%, #2563c9 100%);
  border-color: #3d8bfd;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 18px var(--accent-glow);
}

.btn.primary:hover:not(:disabled) {
  box-shadow: 0 6px 24px var(--accent-glow);
  border-color: var(--accent-hover);
}

.btn-icon {
  font-size: 1.1em;
}

.status {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.status.bad {
  color: var(--bad);
}

/* ── Dice stage ── */

.dice-stage {
  background: linear-gradient(160deg, #182234 0%, #111822 100%);
  border-color: rgba(77, 159, 255, 0.25);
  box-shadow: 0 0 40px rgba(77, 159, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.stage-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stage-header h2 {
  margin: 0;
}

.stage-sub {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.roll-progress {
  min-width: 10rem;
  flex: 1;
  max-width: 16rem;
}

.progress-track {
  height: 6px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  border-radius: 999px;
  transition: width 0.35s ease;
  box-shadow: 0 0 10px var(--accent-glow);
}

.progress-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.dice-tray {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: 5.5rem;
  padding: 1.5rem 1rem;
  background: radial-gradient(ellipse at center, rgba(77, 159, 255, 0.06) 0%, transparent 70%);
  border-radius: 12px;
  border: 1px dashed rgba(77, 159, 255, 0.2);
  margin-bottom: 1rem;
}

.entropy-feed {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid rgba(77, 159, 255, 0.3);
  box-shadow: 0 0 24px rgba(77, 159, 255, 0.08);
}

.entropy-feed.hidden {
  display: none;
}

.entropy-feed-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.entropy-pulse {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: entropy-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes entropy-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.entropy-feed-title {
  display: block;
  font-size: 0.82rem;
}

.entropy-feed-status {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.entropy-byte-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
}

.entropy-feed-source {
  margin: 0 0 0.5rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.entropy-feed-log {
  max-height: 7rem;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.55;
  padding: 0.45rem 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}

.entropy-log-line {
  margin-bottom: 0.2rem;
}

.entropy-log-label {
  color: var(--muted);
  margin-right: 0.35rem;
}

.entropy-byte {
  display: inline-block;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
  margin: 0 0.1rem;
}

.entropy-byte.rejected {
  color: #ffc14d;
  background: rgba(255, 193, 77, 0.12);
  text-decoration: line-through;
}

.entropy-byte.accepted {
  color: var(--ok);
  background: rgba(62, 230, 160, 0.12);
  font-weight: 600;
}

.entropy-arrow {
  color: var(--muted);
  margin: 0 0.25rem;
}

/* ── 3D-style dice ── */

.die {
  width: 4rem;
  height: 4rem;
  background: var(--die-face);
  border-radius: 14px;
  box-shadow: var(--die-shadow);
  padding: 0.55rem;
  perspective: 200px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.die.mini {
  width: 2rem;
  height: 2rem;
  border-radius: 7px;
  padding: 0.28rem;
  box-shadow: 0 2px 0 #9aabb8, 0 3px 8px rgba(0, 0, 0, 0.3);
}

.die-face {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  gap: 0;
}

.pip {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.pip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 55%;
  height: 55%;
  border-radius: 50%;
  background: var(--die-pip);
  opacity: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.die.mini .pip::after {
  width: 65%;
  height: 65%;
}

.pip.on::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.die.rolling {
  animation: dice-tumble 0.12s linear infinite;
}

.die.landed {
  animation: dice-land 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dice-tumble {
  0%   { transform: rotate(0deg) scale(1); }
  25%  { transform: rotate(8deg) scale(1.06); }
  50%  { transform: rotate(-6deg) scale(0.97); }
  75%  { transform: rotate(5deg) scale(1.04); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes dice-land {
  0%   { transform: translateY(-18px) rotate(-12deg) scale(1.1); }
  60%  { transform: translateY(2px) rotate(3deg) scale(0.98); }
  100% { transform: translateY(0) rotate(0) scale(1); }
}

.dice-row {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

/* ── Word reveal ── */

.word-reveal {
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.word-reveal-label,
.phrase-preview-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.current-word {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ok);
  text-shadow: 0 0 20px var(--ok-glow);
  transition: color 0.2s;
}

.current-word.flash {
  animation: word-flash 0.5s ease;
}

@keyframes word-flash {
  0%   { transform: scale(0.9); opacity: 0.5; }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.current-code {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.15em;
}

.phrase-preview-wrap {
  margin-top: 0.5rem;
}

.phrase-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.word-chip {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(77, 159, 255, 0.12);
  border: 1px solid rgba(77, 159, 255, 0.28);
  color: var(--text);
}

.word-chip.pop-in {
  animation: chip-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes chip-pop {
  0%   { transform: scale(0.4) translateY(8px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ── Results ── */

.passphrase {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 1rem;
  line-height: 1.65;
  padding: 1.1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.passphrase .word-chip {
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  background: rgba(62, 230, 160, 0.1);
  border-color: rgba(62, 230, 160, 0.3);
}

.entropy-check {
  margin: 1rem 0;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  font-size: 0.92rem;
}

.entropy-check.pass {
  background: rgba(62, 230, 160, 0.1);
  border: 1px solid rgba(62, 230, 160, 0.35);
  color: var(--ok);
  box-shadow: 0 0 24px var(--ok-glow);
}

.entropy-check.fail {
  background: rgba(255, 123, 133, 0.1);
  border: 1px solid rgba(255, 123, 133, 0.35);
  color: var(--bad);
}

.cosmic-panel-wrap {
  border-color: rgba(62, 230, 160, 0.25);
  background: linear-gradient(160deg, #152035 0%, #121a28 100%);
}

.cosmic-panel-wrap h2 {
  margin-bottom: 0.35rem;
}

.cosmic-panel {
  margin: 1.25rem 0;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(160deg, #152035 0%, #121a28 100%);
  border: 1px solid rgba(62, 230, 160, 0.25);
  border-radius: 12px;
  box-shadow: 0 0 32px rgba(62, 230, 160, 0.06);
}

.cosmic-panel h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.cosmic-headline {
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--ok);
  margin-bottom: 0.65rem;
  text-shadow: 0 0 20px var(--ok-glow);
}

.cosmic-formula {
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
  color: var(--muted);
}

.cosmic-formula code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.cosmic-formula strong {
  color: var(--text);
}

.cosmic-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.cosmic-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.cosmic-badge.win {
  background: rgba(62, 230, 160, 0.12);
  border-color: rgba(62, 230, 160, 0.35);
  color: var(--ok);
}

.cosmic-badge.near {
  background: rgba(77, 159, 255, 0.12);
  border-color: rgba(77, 159, 255, 0.35);
  color: var(--accent);
}

.cosmic-badge.below {
  background: rgba(255, 123, 133, 0.12);
  border-color: rgba(255, 123, 133, 0.35);
  color: var(--bad);
}

.cosmic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.cosmic-table th,
.cosmic-table td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
}

.cosmic-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.cosmic-table tr.win td:last-child {
  color: var(--ok);
  font-weight: 600;
}

.cosmic-table tr.near td:last-child {
  color: var(--accent);
}

.cosmic-icon {
  width: 1.5rem;
  font-weight: 700;
}

.cosmic-brute {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.55;
}

.cosmic-ref-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.cosmic-ref-list li {
  margin-bottom: 0.4rem;
}

.randomness-panel {
  border-color: rgba(255, 193, 77, 0.25);
}

.randomness-warning {
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: rgba(255, 193, 77, 0.1);
  border: 1px solid rgba(255, 193, 77, 0.35);
  font-size: 0.88rem;
}

.randomness-warning strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #ffc14d;
}

.randomness-warning ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.randomness-warning li {
  margin-bottom: 0.35rem;
}

.randomness-run-note {
  font-size: 0.88rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: rgba(62, 230, 160, 0.1);
  border: 1px solid rgba(62, 230, 160, 0.3);
  color: var(--ok);
}

.randomness-run-note.physical {
  background: rgba(77, 159, 255, 0.1);
  border-color: rgba(77, 159, 255, 0.3);
  color: var(--accent);
}

.randomness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.randomness-card {
  padding: 1rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.randomness-card h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.randomness-dl {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
}

.randomness-dl dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.45rem;
}

.randomness-dl dt:first-child {
  margin-top: 0;
}

.randomness-dl dd {
  margin: 0.15rem 0 0;
}

.randomness-dl code {
  font-family: var(--mono);
  font-size: 0.82em;
}

.randomness-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.randomness-table th,
.randomness-table td {
  text-align: left;
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid var(--border);
}

.randomness-table th {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.randomness-table .fair-row td {
  color: var(--ok);
}

.randomness-table .loss {
  color: #ffc14d;
}

.randomness-verdict {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
}

.randomness-verdict.ok {
  color: var(--ok);
}

.randomness-verdict.warn {
  color: #ffc14d;
}

.randomness-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.randomness-list li {
  margin-bottom: 0.4rem;
}

.details-block {
  margin-top: 0.75rem;
}

.details-block summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.35rem 0;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.word-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.word-table th,
.word-table td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.word-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.word-table td:nth-child(3) {
  font-family: var(--mono);
  color: var(--muted);
  letter-spacing: 0.1em;
}

.word-table .ok-mark {
  color: var(--ok);
  font-size: 1.1em;
}

.details-copy {
  margin: 0.5rem 0 0.75rem;
}

.fingerprint {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  word-break: break-all;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 6px;
  margin-top: 0.5rem;
}

textarea {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.88rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  margin-bottom: 0.75rem;
}

textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

footer {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

footer p {
  margin: 0 0 0.35rem;
}

footer p:last-child {
  margin-bottom: 0;
}

.no-store-notice {
  color: var(--ok);
  font-size: 0.8rem;
  margin-bottom: 0.5rem !important;
}

@media (max-width: 480px) {
  .die {
    width: 3.2rem;
    height: 3.2rem;
  }

  .dice-tray {
    gap: 0.65rem;
  }

  .hero h1 {
    font-size: 1.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .die.rolling,
  .die.landed,
  .word-chip.pop-in,
  .current-word.flash {
    animation: none;
  }

  .progress-fill {
    transition: none;
  }
}
