/* Noir — near-black monochrome, system fonts only. English-primary clone
   of the zh blind-voting site. */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #101013;
  --lift: #1a1a1e;
  --text: #e8e6e1;
  --bright: #f2f0eb;
  --dim: #4a4a4d;
  --dimmer: #333336;
  --hairline: #232326;
  --idle: #55555a;
  --heard: #8a8a8e;
  --mid: #6a6a6e;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  overflow: hidden;
}
/* One fixed screen, no page scroll: the halves absorb the leftover height
   and compress before anything else does. */
main {
  width: 100%;
  max-width: 30rem;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 14px 24px calc(12px + env(safe-area-inset-bottom, 0px)) 24px;
}
header { display: flex; justify-content: space-between; align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 3px; }
.stack.right { align-items: flex-end; }
.zh-label { font-size: 0.75rem; letter-spacing: 0.4em; color: var(--dim); }
.stack.right .zh-label { letter-spacing: 0.15em; }
.en-label { font-size: 0.6rem; letter-spacing: 0.25em; color: var(--dimmer); text-transform: uppercase; }
#guidance {
  color: var(--mid);
  font-size: 0.78rem;
  line-height: 1.55;
  margin: 12px 0 0 0;
}
#pair { display: flex; flex-direction: column; flex-grow: 1; min-height: 0; }
.fixture {
  font-size: 1.9rem;
  font-weight: 300;
  text-align: center;
  color: var(--bright);
  margin: 14px 0 8px 0;
  line-height: 1.35;
}
.half {
  flex-grow: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 4px;
  padding: 10px 0;
  transition: background 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.half.picked { background: var(--lift); box-shadow: inset 0 0 0 1px var(--text); }
.glyph-stack { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.glyph { font-size: 2.4rem; line-height: 1; font-weight: 300; color: #3a3a3d; transition: color 0.18s ease; }
.glyph-sub { font-size: 0.7rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--dimmer); transition: color 0.18s ease; }
.half.picked .glyph { color: var(--bright); }
.half.picked .glyph-sub { color: var(--heard); }
.disc {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--idle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.disc.heard { color: var(--heard); }
.disc.playing { color: var(--bright); }
@keyframes ringspin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.disc.playing svg { animation: ringspin 3s linear infinite; }
.disc .icon-pause { display: none; }
.disc.playing .icon-play { display: none; }
.disc.playing .icon-pause { display: block; }
.mark {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--text);
  height: 16px;
  visibility: hidden;
}
.half.picked .mark { visibility: visible; }
.divider { height: 1px; background: var(--hairline); margin: 0 12px; }
footer { display: flex; gap: 10px; padding-top: 12px; }
footer button {
  font-family: inherit;
  border-radius: 2px;
  cursor: pointer;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 14px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.ghost {
  flex: 1;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  border: 1px solid #2a2a2d;
  background: transparent;
  color: var(--mid);
}
.ghost .en-label { color: var(--dim); }
.primary {
  flex: 2;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  border: 1px solid #2a2a2d;
  background: transparent;
  color: var(--dim);
}
.primary .en-label { color: var(--dimmer); }
.primary:enabled { background: var(--bright); color: #121214; border-color: var(--bright); }
.primary:enabled .en-label { color: var(--mid); }
.primary:disabled { cursor: default; }
#status { text-align: center; color: var(--mid); margin-top: 3rem; line-height: 1.7; }

/* Short screens: compress further rather than overflow. The guidance stays
   present (it is required content) but clamps to its opening lines. */
@media (max-height: 640px) {
  #guidance {
    font-size: 0.72rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .fixture { font-size: 1.9rem; margin: 8px 0 4px 0; }
  .glyph { font-size: 2.1rem; }
  .disc { width: 48px; height: 48px; }
}
