:root {
  color-scheme: light;
  --background: #eff0e8;
  --white: #354339;
  --muted: #626f60;
  --orange: #bd684c;
}
* { box-sizing: border-box; touch-action: manipulation; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3svh, 32px);
  padding: 0 clamp(16px, 3vw, 32px) clamp(16px, 3vw, 32px);
  background: radial-gradient(ellipse at 50% 44%, #fff9e9 0%, #f1f1e7 43%, #e3ebe3 100%);
  color: var(--white);
  font: 11px/1.5 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  -webkit-font-smoothing: antialiased;
}
/* A faint speckled texture over soft cream and sage. No external assets. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image: radial-gradient(#72846b66 .55px, transparent .55px);
  background-size: 19px 19px;
}
.profile-header {
  --portrait-width: 210px;
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: var(--portrait-width) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  width: min(880px, 100%);
  height: 200px;
  background: transparent;
  isolation: isolate;
}
.profile-header::before { content: ""; position: absolute; inset-block: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: linear-gradient(to top, #35433918, transparent 30px), #e9eee3; z-index: -1; pointer-events: none; }
.profile-header::after { content: ""; position: absolute; top: 100%; left: 50%; width: 100vw; transform: translateX(-50%); height: 14px; background: linear-gradient(to bottom, #3543392e, #35433912 40%, transparent); z-index: -1; pointer-events: none; }
.portrait-backdrop { position: absolute; top: 0; right: 100%; width: calc((100vw - 100%) / 2); height: 100%; z-index: -1; pointer-events: none; }
.profile-photo-frame { position: relative; min-width: 0; min-height: 0; height: 100%; }
.profile-photo { position: relative; height: 100%; overflow: hidden; clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%); }
.profile-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.profile-copy { align-self: center; min-width: 0; padding: 12px 32px; }
.profile-copy h1 {
  margin: 0;
  color: #405447;
  font: 700 clamp(28px, 3.5vw, 42px)/1.1 "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -1.2px;
  text-transform: uppercase;
}
.job-title { margin: 8px 0 2px; font-size: 14px; color: var(--muted); }
.contact-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--white); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.contact-link:hover { color: var(--orange); }
.contact-link:focus-visible, .site-footer a:focus-visible, .legal-header a:focus-visible, .legal-content a:focus-visible { outline: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.contact-note { margin: 8px 0 0; font-size: 10px; color: var(--muted); }
.game {
  position: relative;
  flex: none;
  width: min(420px, 100%, max(220px, calc(100svh - 470px)));
  margin: auto 0;
}
.scores {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 12px;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}
.best { color: var(--muted); font-size: 10px; }
.field { position: relative; aspect-ratio: 1; margin: 10px 0 4px; }
canvas { display: block; width: 100%; height: 100%; border-radius: 50%; }
button { font: inherit; cursor: pointer; border: 0; color: inherit; background: transparent; -webkit-tap-highlight-color: transparent; }
button:hover { color: var(--orange); }
button:focus-visible, canvas:focus-visible { outline: 1px dotted var(--white); outline-offset: 5px; }
[hidden] { display: none !important; }
.instructions { text-align: center; color: var(--muted); min-height: 65px; }
#start { min-height: 44px; padding: 8px 15px; letter-spacing: .2px; }
#start:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 4px; }
#playing-hint { display: block; padding: 14px 0 10px; }
.legend { display: block; font-size: 9px; letter-spacing: .2px; }
.legend i { font-style: normal; font-size: 12px; vertical-align: baseline; }
.star { color: #ad8425; }
.rock { vertical-align: -3px; }
.result { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; border-radius: 50%; background: #f6f5eaf5; text-align: center; }
.result p { margin: 15px 0 4px; font-size: 30px; letter-spacing: -1px; }
.result span { color: var(--muted); font-size: 10px; }
#result-tag { font-size: 8px; letter-spacing: .8px; }
.result h2 { margin: 10px 0; font-size: clamp(16px, 3.6vw, 23px); letter-spacing: -.7px; font-weight: 400; }
#result-message { max-width: 78%; font-size: 10px; line-height: 1.7; }
#restart { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 90px; min-height: 44px; margin-top: 13px; color: var(--orange); }
#restart:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
noscript { display: block; text-align: center; }
.site-footer { flex: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 0 24px; width: min(880px, 100%); text-align: center; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-underline-offset: 4px; }
.legal-header { position: relative; isolation: isolate; flex: none; width: min(880px, 100%); padding: 32px 20px; }
.legal-header::before { content: ""; position: absolute; inset-block: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: #e9eee3; z-index: -1; pointer-events: none; }
.legal-header a { display: inline-block; color: #405447; font: 700 clamp(28px, 3.5vw, 42px)/1.1 "Arial Narrow", "Helvetica Neue", Arial, sans-serif; letter-spacing: -1.2px; text-transform: uppercase; text-decoration: none; }
.legal-content { width: min(880px, 100%); padding: 0 20px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.legal-content h1 { margin: 0 0 28px; font: 700 32px/1.2 "Helvetica Neue", Arial, sans-serif; }
.legal-content h2 { margin: 36px 0 16px; font-size: 24px; }
.legal-content h3 { margin: 24px 0 8px; font-size: 16px; }
.legal-content p { margin: 0 0 12px; }
.legal-content a { color: var(--white); text-underline-offset: 4px; }
.legal-content + .site-footer { margin-top: auto; }
.site-footer a:hover, .legal-header a:hover, .legal-content a:hover { color: var(--orange); }
@media (max-width: 960px) {
  .profile-header { --portrait-width: 180px; height: 180px; }
  .profile-copy { padding-inline: 24px; }
  .game { width: min(420px, 100%, max(220px, calc(100svh - 540px))); }
}
@media (max-width: 600px) {
  body { padding: 0 16px 16px; gap: 20px; }
  .profile-header { --portrait-width: clamp(100px, 26vw, 140px); width: calc(100% + 32px); height: 160px; }
  .portrait-backdrop { display: none; }
  .profile-copy { padding: 10px 16px; }
  .profile-copy h1 { font-size: clamp(24px, 5.8vw, 32px); letter-spacing: -.7px; }
  .legal-header a { font-size: clamp(24px, 5.8vw, 32px); letter-spacing: -.7px; }
  .job-title { margin-top: 7px; font-size: 12px; }
}
@media (max-height: 480px) {
  .instructions { min-height: 48px; }
  .field { margin-top: 4px; }
  .legend { display: none; }
  .result h2 { margin: 5px 0; font-size: 13px; }
  #result-tag, #result-message { display: none; }
  .result p { margin-top: 4px; font-size: 23px; }
  #restart { margin-top: 2px; }
}
