:root {
  color-scheme:light;
  --ink:#151515;
  --muted:#666;
  --line:#dedede;
  --paper:#fafafa}
* {
  box-sizing:border-box}
body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font:16px 'DM Sans',Arial,sans-serif}
button,input,a {
  -webkit-tap-highlight-color:transparent}
button,input {
  font:inherit}
button,a {
  touch-action:manipulation}
button {
  cursor:pointer}
a {
  color:inherit}
button:focus-visible,a:focus-visible,input:focus-visible {
  outline:3px solid #777;
  outline-offset:4px}
button:disabled {
  cursor:default;
  opacity:.5}
.header {
  height:100px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 6vw}
.brand {
  text-decoration:none;
  font-family:'Space Grotesk',sans-serif;
  font-size:28px;
  font-weight:700;
  letter-spacing:-1.5px;
  display:flex;
  align-items:center;
  gap:12px}
.quiet {
  border:0;
  background:transparent;
  padding:10px;
  font-size:14px}
.quiet span {
  border:1px solid #888;
  border-radius:50%;
  padding:0 5px;
  margin-left:12px}
main {
  max-width:1280px;
  padding:0 48px;
  margin:auto}
.topline {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:30px}
.topline nav {
  background:#eaeaea;
  padding:4px;
  display:flex;
  gap:4px;
  border-radius:6px}
.tab {
  border:0;
  background:transparent;
  border-radius:3px;
  padding:10px 24px;
  text-decoration:none;
  font-size:14px}
.tab.active {
  background:#151515;
  color:white}
.eyebrow {
  font-size:12px;
  letter-spacing:1.6px;
  font-weight:600}
.topline>.eyebrow {
  color:var(--muted);
  font-size:11px}
.layout {
  display:grid;
  grid-template-columns:minmax(0,1.65fr) minmax(310px,1fr);
  gap:24px;
  align-items:start}
.game,.guess-panel {
  border:1px solid var(--line);
  border-radius:8px;
  background:white}
.game {
  padding:30px}
.panel-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px}
.panel-heading>span:last-child {
  font-size:12px;
  color:var(--muted)}
.song-title {
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin:32px 0 16px;
  font:600 27px 'Space Grotesk',sans-serif;
  min-height:36px;
  align-items:center}
.word {
  display:inline-block;
  white-space:pre}
.masked {
  background:#191919;
  border-radius:3px;
  color:transparent;
  height:1.05em;
  min-width:12px;
  vertical-align:middle;
  user-select:none}
.revealed {
  background:#efefef;
  border-radius:3px;
  padding:0 3px}
.artist {
  font-size:14px;
  color:var(--muted)}
.divider {
  border-bottom:1px solid var(--line);
  margin:26px 0}
.lyrics {
  font-size:17px;
  line-height:2.1;
  min-height:230px;
  overflow-x:auto;
  overflow-wrap:normal;
  padding:4px}
.lyric-line {
  height:2.1em;
  min-height:2.1em;
  display:flex;
  flex-wrap:nowrap;
  gap:0 6px;
  align-items:center;
  width:max-content;
  min-width:100%;
  white-space:pre}
.lyric-line .word {
  flex-shrink:0}
.lyric-line .revealed {
  line-height:1.4}
.empty-lyrics {
  min-height:230px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  border:1px dashed #ccc;
  border-radius:4px;
  padding:24px;
  background:#fafafa}
.empty-lyrics strong {
  font:500 24px 'Space Grotesk',sans-serif}
.empty-lyrics p {
  font-size:14px;
  color:#666;
  max-width:290px;
  line-height:1.6;
  margin-bottom:0}
.guess-panel {
  padding:26px}
.counter {
  display:flex;
  align-items:baseline;
  gap:12px;
  margin-bottom:28px}
.counter strong {
  font:500 54px/1 'Space Grotesk',sans-serif;
  letter-spacing:-3px}
.counter span {
  font-size:11px;
  letter-spacing:2px;
  color:#666}
label {
  display:block;
  font-weight:600;
  font-size:14px;
  margin-bottom:12px}
.input-row {
  display:flex;
  border:1px solid #aaa;
  border-radius:5px;
  padding:5px;
  gap:4px}
input {
  width:100%;
  min-width:0;
  border:0;
  padding:10px 7px;
  background:transparent;
  font-size:14px}
.input-row button,.primary {
  background:#151515;
  color:white;
  border:1px solid #151515;
  border-radius:3px;
  padding:11px 15px;
  font-size:14px}
.feedback {
  font-size:13px;
  color:#666;
  min-height:36px;
  line-height:1.5;
  margin:12px 0 24px}
.history-heading {
  border-top:1px solid var(--line);
  padding-top:20px;
  display:flex;
  justify-content:space-between;
  align-items:center}
.history-heading h2 {
  font-size:14px;
  margin:0}
.history-heading span {
  font-size:12px;
  background:#eee;
  border-radius:4px;
  padding:3px 7px}
.history {
  list-style:none;
  padding:0;
  max-height:300px;
  overflow:auto;
  margin:15px 0 0}
.history li {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
  border-bottom:1px solid #eee;
  font-size:14px}
.history li small {
  color:#666;
  text-align:right}
.history .empty {
  color:#777;
  justify-content:center;
  text-align:center;
  border:0;
  line-height:1.8;
  padding:26px 0}
.side-note {
  text-align:center;
  color:#777;
  font-size:13px;
  line-height:1.7;
  margin:20px 0}
footer {
  max-width:1184px;
  margin:54px auto 0;
  border-top:1px solid var(--line);
  padding:24px 0 30px;
  display:flex;
  justify-content:space-between;
  color:#777;
  font-size:12px}
footer > span:last-of-type {
  letter-spacing:1.5px;
  font-size:10px}
dialog {
  border:1px solid #ccc;
  border-radius:8px;
  padding:38px;
  max-width:500px;
  width:calc(100% - 32px)}
dialog::backdrop {
  background:#0009}
dialog h2 {
  font:500 32px 'Space Grotesk',sans-serif;
  letter-spacing:-1px}
dialog p {
  line-height:1.65;
  color:#555;
  font-size:15px}
.close {
  position:absolute;
  right:15px;
  top:10px;
  font-size:26px}
#victory {
  border-top:1px solid #ddd;
  padding:12px 0 22px}
#victory h2 {
  font-family:'Space Grotesk',sans-serif;
  font-size:24px}
#result {
  font-size:14px}
.platforms {
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  font-size:12px;
  margin-top:18px}
.share-output {
  width:100%;
  min-height:90px;
  font:14px monospace;
  margin-top:12px}
 @media(max-width:760px) {
  .header {
  padding:0 20px;
  height:78px}
.brand {
  font-size:23px}
main {
  padding:0 20px}
.topline>.eyebrow {
  max-width:140px;
  text-align:right;
  line-height:1.6;
  font-size:10px}
.layout {
  grid-template-columns:1fr;
  gap:20px}
.game {
  padding:22px}
.guess-panel {
  padding:22px}
.lyrics,.empty-lyrics {
  min-height:150px}
.song-title {
  font-size:24px}
.panel-heading .eyebrow {
  font-size:10px}
footer {
  margin:30px 20px 0;
  gap:20px;
  line-height:1.6}
.quiet {
  font-size:12px}
.quiet span {
  display:none}
}


/* Hidden words remain keyboard-accessible buttons in every puzzle area. */
button.masked {
  border:0;
  padding:0;
  font:inherit;
  line-height:1.05;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer}

button.masked:hover {
  background:#444}

button.masked.show-count {
  color:#fff}

.artist .word {
  margin:0 2px}


.track-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:32px;
  padding:46px 0 42px}

.track-identity {
  min-width:0;
  flex:1}

.track-header .song-title {
  font-size:clamp(30px,4vw,52px);
  line-height:1.2;
  letter-spacing:-1px;
  margin:0 0 20px;
  gap:10px}

.track-header .artist {
  font-size:18px;
  line-height:1.8}

.track-year {
  display:flex;
  flex-direction:column;
  gap:12px;
  flex-shrink:0;
  text-align:right}

.track-year #year {
  font-size:16px;
  color:var(--muted)}

@media(max-width:760px) {
  .track-header {
  align-items:flex-start;
  flex-direction:column;
  gap:24px;
  padding:34px 0}
.track-year {
  text-align:left}
.track-header .artist {
  font-size:16px}
}


.header > #help {
  margin-left:auto}


.track-metadata {
  display:flex;
  flex-direction:column;
  gap:24px;
  max-width:40%;
  text-align:right}

.track-album {
  display:flex;
  flex-direction:column;
  gap:12px;
  overflow-wrap:anywhere}

.track-album #album {
  font-size:16px;
  color:var(--muted)}

@media(max-width:760px) {
  .track-metadata {
  max-width:100%;
  text-align:left;
  flex-direction:row;
  flex-wrap:wrap;
  gap:24px 32px}
.track-metadata>div {
  flex:1;
  min-width:140px}
}


/* Signature SVG and hover effect from lorraine-ipsum.thomaspericoi.com. */
.signature {
  display:inline-flex;
  align-items:center;
  font-family:DynaPuff,system-ui;
  font-size:.75rem;
  font-optical-sizing:auto;
  font-style:normal;
  font-variation-settings:"wdth" 100;
  font-weight:700;
  text-decoration:none}
@media screen and (min-width:575px) {
  .signature {
  font-size:1rem}
}
.signature-logo {
  width:2rem;
  height:2rem;
  flex:0 0 auto;
  overflow:visible}
@media screen and (min-width:575px) {
  .signature-logo {
  width:3rem;
  height:3rem}
}
.signature-logo-pupil {
  transform-box:fill-box;
  transform-origin:center}
.signature:focus-visible .signature-logo-pupil,.signature:hover .signature-logo-pupil {
  transform:translateX(30px)}
.signature-tagline {
  transform:scaleY(1.75) skewX(5deg)}

footer {
  align-items:center;
  flex-wrap:wrap;
  gap:24px}

footer .signature {
  color:var(--ink)}


@media(max-width:760px) {
  
  .layout>aside {
  grid-row:1;
  min-width:0}

  .layout>.game {
  grid-row:2;
  min-width:0}

  .guess-panel .counter {
  margin-bottom:18px}

  .guess-panel .counter strong {
  font-size:40px}

  .guess-panel .history {
  max-height:140px}

  #guess {
  font-size:16px}

}


/* Large close target for mouse and touch input. */
dialog .close {
  top:8px;
  right:8px;
  width:48px;
  height:48px;
  padding:0;
  display:grid;
  place-items:center;
  line-height:1;
  border-radius:6px}

dialog .close:hover,dialog .close:focus-visible {
  background:#eee}

@media(max-width:760px) {
  dialog .close {
  width:56px;
  height:56px;
  font-size:30px}
dialog {
  padding-top:64px}
}


footer {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:24px}

footer .signature {
  justify-self:center}

footer .footer-credit {
  text-align:right;
  font-size:12px;
  letter-spacing:normal;
  line-height:1.6}

@media(max-width:760px) {
  footer {
  grid-template-columns:1fr;
  text-align:center}
footer .footer-credit {
  text-align:center}
}


/* Accessibility and stable puzzle geometry. */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; transform: translateY(-200%); z-index: 20; padding: 14px; background: #151515; color: white; }
.skip-link:focus { transform: none; }
.notice { padding: 16px; border: 1px solid var(--line); border-radius: 6px; line-height: 1.6; }
.quiet, .tab, .primary, .input-row button { min-height: 44px; }
.layout > aside { grid-column: 2; grid-row: 1; min-width: 0; }
.layout > .game { grid-column: 1; grid-row: 1; min-width: 0; }
.guess-panel { position: sticky; top: 16px; }
.word { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; box-sizing: border-box; text-align: center; }
button.masked { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; min-width: 24px; min-height: 24px; }
.revealed { min-width: 24px; }
.artist { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.artist .word { margin: 0; }
.lyrics { padding: 6px; scrollbar-gutter: stable; overscroll-behavior-x: contain; }
.lyric-line { height: 2.4em; min-height: 2.4em; }
.history li > span { min-width: 0; overflow-wrap: anywhere; }
.history li small { flex-shrink: 0; }
.feedback, .side-note, .history .empty { color: #595959; }
.panel-heading > span:last-child, .feedback, .side-note, .platforms { font-size: 14px; }
.platforms a { display: inline-flex; align-items: center; min-height: 44px; }
#victory-heading:focus { outline: 2px solid #555; outline-offset: 4px; }
.share-output { padding: 12px; font-size: 16px; }
dialog { max-height: calc(100dvh - 32px); overflow-y: auto; padding-top: 64px; }
footer .footer-credit, footer .footer-description { font-size: 14px; line-height: 1.6; }
footer .signature { min-height: 44px; }
@media (max-width: 760px) {
  .layout > aside { grid-column: 1; grid-row: 1; }
  .layout > .game { grid-column: 1; grid-row: 2; }
  .guess-panel { position: static; }
  .topline { gap: 12px; flex-wrap: wrap; }
  .tab { padding: 10px 20px; }
  .track-header { padding: 28px 0; }
  .track-header .song-title { font-size: clamp(24px, 6vw, 36px); letter-spacing: normal; }
  .track-header .word { max-width: 100%; }
  .panel-heading { flex-wrap: wrap; }
  .lyrics { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  button.masked { border: 1px solid ButtonText; background: ButtonFace; }
  button.masked.show-count { color: ButtonText; }
}

.punctuation { display: inline-block; flex-shrink: 0; white-space: pre; color: var(--ink); background: transparent; }

/* Catalogue editor shares the game's typography, panels and controls. */
.editor { max-width: 1000px; }
.editor-heading { padding: 46px 0 32px; }
.editor-heading h1 { margin: 14px 0; font: 600 clamp(30px, 4vw, 48px)/1.15 'Space Grotesk', sans-serif; letter-spacing: -1.5px; }
.editor-heading p, .editor-note { color: var(--muted); line-height: 1.6; }
.editor-panel { padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.editor-toolbar { display: flex; align-items: flex-end; gap: 20px; }
.editor-picker { flex: 1; min-width: 0; }
.editor .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; margin-bottom: 28px; }
.editor input, .editor select, .editor textarea { display: block; width: 100%; min-height: 48px; padding: 12px; border: 1px solid #aaa; border-radius: 5px; background: white; color: var(--ink); font: inherit; font-size: 16px; }
.editor select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23151515' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.editor textarea { min-height: 320px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.7; }
.editor input:focus-visible, .editor select:focus-visible, .editor textarea:focus-visible { outline: 3px solid #777; outline-offset: 3px; }
.editor-hint { color: var(--muted); font-size: 14px; line-height: 1.6; margin: -4px 0 12px; }
.editor-actions { display: flex; align-items: center; gap: 20px; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
.editor-actions .primary { flex-shrink: 0; }
.editor #status { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.editor-note { margin: 22px 0; font-size: 14px; }
.editor-back { display: inline-flex; align-items: center; text-decoration: none; }
@media (max-width: 760px) {
  .editor-heading { padding: 30px 0 24px; }
  .editor-panel { padding: 22px; }
  .editor .fields { grid-template-columns: 1fr; }
  .editor-toolbar, .editor-actions { flex-wrap: wrap; }
  .editor-picker { flex-basis: 100%; }
  .editor textarea { min-height: 260px; }
}
