:root {
  color-scheme: light;
  --ink:#173873;
  --blue:#05b9ee;
  --blue-dark:#087dbd;
  --yellow:#ffe974;
  --paper:#fcfdff;
  --line:#bad1e7;
  --muted:#607da4;
  font-family:
    "Hiragino Maru Gothic ProN",
    "Yu Gothic",
    sans-serif;
  color: var(--ink);
  font-synthesis: none;
  background: #8dd7fc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  background: url(/assets/sky-campus.png) center center/cover fixed no-repeat;
  -webkit-user-select: none;
  user-select: none;
}
input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}
button,
input,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
  color: inherit;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #e39200;
  outline-offset: 5px;
}
button {
  transition:
    transform .16s,
    filter .16s,
    box-shadow .16s;
}
button:not(:disabled):hover {
  filter: brightness(1.04);
  transform: translateY(-2px);
}
button:not(:disabled):active {
  transform: translateY(3px);
}
[hidden] {
  display: none !important;
}
svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.topbar {
  height: 110px;
  max-width: 1600px;
  margin: auto;
  padding: 30px 3.4% 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  gap: 24px;
}
.brand {
  position: relative;
  display: block;
  color: #0c2e65;
  text-decoration: none;
  font-family:
    "Arial Black",
    "Helvetica Neue",
    sans-serif;
  font-weight: 950;
  font-style: italic;
  font-size: clamp(26px, 3.2vw, 48px);
  letter-spacing: -2px;
  line-height: 1.25;
  transform: rotate(-5deg);
  text-shadow: 0 2px 0 #ffffff65;
  white-space: nowrap;
}
.brand small {
  display: block;
  text-align: right;
  font-family: "Hiragino Maru Gothic ProN", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.8px;
  margin-top: 5px;
}
.brand-orbit {
  position: absolute;
  border: 2px solid var(--ink);
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  width: 66%;
  height: 90%;
  left: 11%;
  top: -9%;
  transform: rotate(-12deg);
  z-index: -1;
}
.brand-orbit:after {
  content: "\2726";
  position: absolute;
  right: 5px;
  top: -9px;
  font-size: 31px;
  font-style: normal;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 17px;
  padding-top: 3px;
}
.connection {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.connection:before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffc843;
  border: 2px solid #fff;
  margin-right: 7px;
  box-shadow: 0 0 0 1px #355e8a22;
}
.connection.connected:before {
  background: #28d586;
}
.settings-button {
  display: grid;
  place-items: center;
  background: #ffffff9c;
  border: 1px solid #fff;
  border-radius: 13px;
  width: 43px;
  height: 43px;
}
.settings-button svg {
  width: 24px;
  height: 24px;
}
.lineup {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 26px;
  position: absolute;
  left: 50%;
  top: 27px;
  transform: translateX(-50%);
}
.lineup li {
  position: relative;
  width: 35px;
  height: 35px;
  background: #ecf8ffdd;
  border: 2px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 18px "Arial", sans-serif;
  color: #4f89ba;
  box-shadow: 0 3px 7px #16649513;
}
.lineup li:not(:last-child):after {
  content: "";
  position: absolute;
  left: calc(100% + 5px);
  width: 20px;
  border-top: 2px dashed #e5f8ff;
  top: 50%;
}
.lineup li.current {
  background: #08c3e9;
  color: white;
  transform: scale(1.15);
  box-shadow: 0 0 0 3px #ffffff58, 0 4px 10px #058dd35e;
}
.lineup li.done {
  background: #fff8bc;
  color: #7b6b24;
}
.lineup li.done:before {
  content: "\2713";
  position: absolute;
  right: -5px;
  top: -7px;
  font-size: 12px;
  background: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 0 40px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(175px, 1fr) minmax(420px, 640px) minmax(175px, 1fr);
  align-items: start;
  gap: 42px;
}
.brief {
  padding-top: 97px;
  min-width: 0;
}
.character-ticket {
  position: relative;
  background:
    linear-gradient(
      115deg,
      #fff 30%,
      #eef9ff);
  padding: 27px 22px 25px;
  border: 6px solid #f7fdff;
  outline: 1.5px solid #48b6ed;
  box-shadow: 0 8px 0 #2f92c023, 0 10px 20px #23619235;
  transform: rotate(-8deg);
  min-height: 244px;
}
.character-ticket:before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed #9acfea;
  pointer-events: none;
}
.ticket-tab {
  display: inline-block;
  background: #09b1ed;
  color: white;
  padding: 7px 21px 8px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
  transform: rotate(-2deg);
  margin: -25px 0 17px -20px;
  box-shadow: 4px 3px 0 #2f87bf15;
  clip-path: polygon(0 4%, 100% 0, 98% 93%, 2% 100%);
}
.ticket-tab i {
  font: 900 24px Arial;
  color: var(--yellow);
  margin-left: 10px;
}
.paperclip {
  position: absolute;
  left: 9px;
  top: -26px;
  border: 3px solid #3877a9;
  width: 14px;
  height: 44px;
  border-radius: 10px;
  transform: rotate(-10deg);
  box-shadow: inset 0 0 0 2px #b5e6ff, 1px 1px 1px white;
  z-index: 1;
}
.character-ticket h1 {
  font-size: clamp(22px, 2.45vw, 36px);
  font-weight: 900;
  line-height: 1.45;
  margin: 0 0 4px;
  letter-spacing: -1px;
  overflow-wrap: anywhere;
}
.school {
  font-size: 14px;
  margin: 0;
  display: inline-block;
  border-bottom: 1px solid #6eaacd;
  padding: 0 1px 4px;
  color: #4b83af;
}
.ticket-halo {
  display: block;
  width: 105px;
  height: 30px;
  border: 4px solid #57d1ef;
  border-radius: 50%;
  transform: rotate(-10deg);
  margin: 30px 0 16px;
  position: relative;
}
.ticket-halo:after {
  content: "";
  position: absolute;
  left: 28px;
  top: 7px;
  width: 42px;
  border-top: 4px solid #57d1ef;
  transform: rotate(-8deg);
}
.ticket-note {
  font-size: 11px;
  letter-spacing: 1.5px;
  margin: 0;
  text-align: right;
  color: #6d96bf;
}
.ticket-code {
  position: absolute;
  right: 13px;
  bottom: 46px;
  writing-mode: vertical-rl;
  font: italic 10px Arial;
  color: #9bbad4;
  letter-spacing: 1.5px;
}
.clear-ticket {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  max-width: 220px;
  margin: 23px auto 0;
  padding: 10px 12px;
  background:
    linear-gradient(
      110deg,
      #ffec8a,
      #ffe363);
  transform: rotate(-8deg);
  box-shadow: 0 4px 0 #bf9d3940, 0 8px 14px #506e8330;
  border-left: 5px dashed #fff5c3;
  border-right: 5px dashed #fff5c3;
  white-space: nowrap;
}
.clear-ticket strong {
  font: bold italic 40px "Arial Black", sans-serif;
  letter-spacing: -3px;
}
.clear-ticket span {
  font-size: 17px;
  font-weight: 900;
}
.clear-ticket svg {
  width: 18px;
  height: 18px;
  align-self: center;
  margin-left: 4px;
  color: #198bc1;
}
.studio {
  min-width: 0;
}
.sketch-caption {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  height: 34px;
  margin-bottom: 15px;
  transform: rotate(-3deg);
  text-shadow: 0 1px #fff8;
}
.sketch-caption span {
  border-bottom: 1px solid #31688a;
  padding-bottom: 5px;
}
.sketch-caption svg {
  color: #fff098;
  width: 20px;
  height: 20px;
}
.sketchbook {
  position: relative;
  --paper-top: 27px;
  background:
    linear-gradient(
      120deg,
      #fff,
      #eef1f6 80%,
      #fefefe);
  border: 5px solid #d7f1ff;
  border-radius: 17px;
  padding: var(--paper-top) 16px 16px 29px;
  box-shadow:
    0 0 0 2px #008fda,
    0 0 0 5px #55d0ff,
    0 9px 0 4px #2095cc55,
    0 15px 28px #2a638b3b;
}
.binding {
  position: absolute;
  top: -15px;
  left: 8%;
  right: 8%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}
.binding i {
  width: 9px;
  height: 30px;
  border: 1px solid #5384a5;
  background:
    linear-gradient(
      90deg,
      #799ab0,
      #f6fcff 44%,
      #668297);
  border-radius: 7px;
  box-shadow: 1px 2px 2px #082e5555;
}
.binding i:nth-child(3n+1) {
  background:
    linear-gradient(
      90deg,
      #6abaef,
      #e5faff 50%,
      #7fbdff);
  border-color: #48a5e1;
}
.binding i:after {
  content: "";
  position: absolute;
  bottom: -2px;
  width: 11px;
  height: 8px;
  border-radius: 50%;
  background: #4f6e97;
  z-index: -1;
  margin-left: -2px;
}
.paper-wrap {
  position: relative;
  box-shadow: 0 2px 7px #3e4c6825;
  outline: 1px solid #cfd6e1;
  background: white;
}
.canvas-viewport {
  overflow: hidden;
  background: #e7edf4;
}
.canvas-viewport canvas { transform-origin: 0 0; }
.canvas-viewport.can-pan, .canvas-viewport.can-pan canvas { cursor: grab; }
.canvas-viewport.is-panning, .canvas-viewport.is-panning canvas { cursor: grabbing; }
.sketch-caption.has-canvas-navigation {
  height: 44px;
  transform: none;
  justify-content: space-between;
  letter-spacing: 0;
}
.canvas-navigation {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(#fff, #f0f7fc);
  box-shadow: inset 0 0 0 1px #fff, 0 3px 0 #508fbc30, 0 4px 8px #17387312;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: none;
}
.canvas-navigation button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #c7cfdd;
  border-radius: 8px;
  background: linear-gradient(#fff, #f3f5f9);
  box-shadow: 0 2px 2px #152f6120;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.canvas-navigation button svg { width: 18px; height: 18px; color: currentColor; stroke-width: 2; }
.canvas-navigation button[data-zoom="fit"] {
  width: auto;
  padding: 0 9px;
  margin-left: 3px;
  border-color: #9cd8ee;
  background: linear-gradient(#f7fdff, #dcf4ff);
  box-shadow: inset 0 0 0 1px #fff, 0 2px 2px #1273a526;
}
.canvas-navigation button:not(:disabled):hover { border-color: var(--blue); background: #e8f8ff; }
.canvas-navigation button:not(:disabled):active { transform: translateY(1px); box-shadow: inset 0 1px 3px #17387320; }
.canvas-navigation button:focus-visible { outline-offset: 2px; }
.canvas-navigation button:disabled { opacity: .45; cursor: default; box-shadow: none; }
.canvas-navigation output {
  min-width: 55px;
  padding: 5px 4px;
  border-radius: 6px;
  background: #eaf4fc;
  box-shadow: inset 0 1px 2px #1738730d;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  touch-action: none;
  cursor: crosshair;
  background: #fff;
}
.toolbar {
  position: absolute;
  left: -28px;
  top: 88px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 13px;
  background: #f9fcff;
  padding: 9px 6px;
  border-radius: 10px;
  border: 1px solid #c0c9d9;
  box-shadow: 0 2px 5px #0c336526;
}
.tool {
  height: 47px;
  width: 47px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(#fff, #f3f5f9);
  border: 1px solid #c7cfdd;
  box-shadow: 0 3px 2px #152f6120;
}
.tool svg {
  width: 26px;
  height: 26px;
}
.tool.active {
  color: #fff;
  background: linear-gradient(#2ed6f9, #00a6ed);
  border-color: #058bd1;
  box-shadow: inset 0 0 0 2px #83e6ff, 0 3px 2px #1273a54a;
}
.tool:disabled:not(.active) {
  color: #607496;
}
.tool:disabled {
  opacity: .58;
}
.palette-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 14px -3px -2px -11px;
  padding: 9px 12px 5px;
  background: #ffffffdd;
  border-radius: 12px;
}
.control-caption {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.color-options {
  display: flex;
  align-items: center;
  gap: 8px;
}
.palette {
  display: flex;
  align-items: center;
  gap: 8px;
}
.swatch {
  height: 28px;
  width: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--swatch);
  border: 2px solid white;
  box-shadow:
    0 0 0 1px #66768f40,
    inset 0 3px 3px #ffffff88,
    inset 0 -2px 3px #22385124;
  transition: transform .16s;
}
.swatch[aria-pressed=true] {
  outline: 2px solid #279df0;
  outline-offset: 2px;
}
.swatch:disabled {
  opacity: .65;
}
.custom-color {
  position: relative;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: white;
  border: 1px solid #adc8e2;
  overflow: hidden;
}
.custom-color input {
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.custom-color span {
  pointer-events: none;
  font-size: 19px;
  color: #638caf;
}
.width-label {
  display: block;
  border-left: 1px dashed #b5c8df;
  padding-left: 16px;
  flex: 1;
  min-width: 105px;
  max-width: 153px;
}
.width-control {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  font-size: 8px;
}
.width-control input {
  min-width: 40px;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 20px;
  background: transparent;
  opacity: 1;
  --width-progress: 10%;
}
/* Keep the same colors when a tool temporarily disables width adjustment. */
.width-control input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right,#00bde9 var(--width-progress),#d6e3ef var(--width-progress));
}
.width-control input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: #00bde9;
}
.width-control input::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right,#00bde9 var(--width-progress),#d6e3ef var(--width-progress));
}
.width-control input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #00bde9;
}
.width-control output {
  font-size: 10px;
  width: 18px;
}
.submit-row {
  text-align: center;
  margin: 23px auto 0;
  position: relative;
}
.primary {
  color: white;
  background:
    linear-gradient(
      130deg,
      #17d0ee,
      #02b8ee);
  border: 2px solid #dbfbff;
  border-radius: 11px;
  padding: 13px 20px;
  box-shadow: 0 0 0 2px #007eb7, 0 5px 0 2px #0a649b;
  font-weight: 900;
  font-size: 16px;
  min-height: 45px;
}
.start-button {
  font-size: clamp(25px, 3vw, 39px);
  font-style: italic;
  letter-spacing: 3px;
  min-width: 68%;
  max-width: 100%;
  min-height: 72px;
  border-radius: 25px;
  box-shadow:
    inset 0 0 0 3px #6eebff,
    0 0 0 2px #096eab,
    0 7px 0 3px #0579b5,
    0 12px 0 3px #163f77,
    0 17px 0 3px #d3ecfabb;
  text-shadow: 1px 3px 1px #2e83af;
  position: relative;
}
.start-button:after {
  content: "\2727";
  font-size: 49px;
  color: #fff19a;
  position: absolute;
  right: -46px;
  top: -17px;
  text-shadow: 0 0 0 white;
  font-style: normal;
}
.primary:disabled {
  background: #9bbacd;
  box-shadow: 0 0 0 2px #7b9bab, 0 4px 0 2px #6c8b9e;
  text-shadow: none;
  border-color: #dae7ee;
}
.start-button:disabled:after {
  display: none;
}
.submit-row p {
  font-size: 11px;
  letter-spacing: 1px;
  color: #2a5281;
  margin: 26px 0 0;
  text-shadow: 0 1px 3px #fff, 0 0 8px #fff;
}
.side {
  padding-top: 77px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}
.stopwatch {
  position: relative;
  width: min(205px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(
      120deg,
      #fff,
      #e4f3fd);
  border: 2px solid #418abf;
  padding: 12px;
  box-shadow: 0 5px 0 #397faf2b, 0 9px 16px #346aa246;
  transform: rotate(5deg);
}
.stopwatch:before {
  content: "";
  position: absolute;
  width: 39px;
  height: 16px;
  top: -20px;
  left: calc(50% - 19px);
  border: 2px solid #3e89bd;
  background: #f6fdff;
  border-radius: 5px 5px 2px 2px;
  box-shadow: 0 3px #70b6dc;
}
.stopwatch:after {
  content: "";
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: #ffe878;
  border-right-color: #ffe878;
  transform: rotate(17deg);
}
.clock-face {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 6px solid #02bdec;
  border-radius: 50%;
  background: radial-gradient(#fff, #edf7ff);
  box-shadow: inset 0 0 0 2px white;
  transform: rotate(-5deg);
}
.clock-face:before,
.clock-face:after {
  content: "";
  position: absolute;
  width: 4px;
  height: 9px;
  border-radius: 2px;
  background: #4d79a9;
  left: calc(50% - 2px);
  top: 8px;
}
.clock-face:after {
  top: auto;
  bottom: 8px;
}
.timer {
  font:
    950 italic 75px/1 "Arial Black",
    "Helvetica Neue",
    sans-serif;
  letter-spacing: -5px;
  margin-top: 5px;
}
.timer.urgent {
  color: #cf5272;
}
.clock-unit {
  font-size: 16px;
  font-weight: 900;
  margin-top: 3px;
}
.result {
  position: relative;
  width: 100%;
  background: #fcfdff;
  padding: 25px 16px 22px 23px;
  transform: rotate(-5deg);
  box-shadow: 0 7px 15px #255b9433;
  border: 1px solid #afd7ed;
  outline: 4px solid #f9fdff;
}
.result:before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 14px;
  width: 5px;
  background:
    radial-gradient(
      circle,
      #83c7e8 2px,
      transparent 3px) center top/5px 21px repeat-y;
}
.result:after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed #ccdae9;
  pointer-events: none;
}
.tape {
  width: 59px;
  height: 20px;
  position: absolute;
  right: -15px;
  top: -7px;
  transform: rotate(37deg);
  background:
    repeating-linear-gradient(
      45deg,
      #ffe885ba 0 2px,
      #fff4b7b3 2px 5px);
  z-index: 1;
}
.result-body {
  position: relative;
  z-index: 1;
  text-align: center;
}
.result-body h2 {
  font-size: 16px;
  line-height: 1.5;
  margin: 3px 0 10px;
}
.result-body .ready-title {
  font: 950 italic clamp(25px, 3vw, 39px)/1.2 "Arial Black", sans-serif;
  letter-spacing: -1px;
  display: inline-block;
  position: relative;
  margin: 0 0 12px;
}
.ready-title:after {
  content: "";
  height: 7px;
  background: #fff188;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  z-index: -1;
  transform: rotate(1deg);
}
.result-body p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
  color: #5378a4;
}
.grading-diagnostic { font-size:12px; overflow-wrap:anywhere; }
.grading-diagnostic summary { cursor:pointer; }
.note-star {
  position: absolute;
  font-size: 28px;
  right: -8px;
  top: -12px;
  color: #f899a3;
}
.score-number {
  font: 900 italic 63px/1.2 "Arial Black", sans-serif;
  color: var(--blue-dark);
  letter-spacing: -3px;
}
.score-number small {
  font: 700 13px sans-serif;
  letter-spacing: 0;
  margin-left: 4px;
}
.score-value {
  display: inline-block;
  position: relative;
  isolation: isolate;
}
.score-crown {
  position: absolute;
  z-index: 1;
  width: .65em;
  height: .65em;
  top: -.1em;
  left: calc(100% + 8px);
  background: center / contain no-repeat;
  transform: rotate(15deg);
  transform-origin: center center;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .score-crown {
    animation: crown-pop 420ms ease-out 120ms backwards;
  }
}
@keyframes crown-pop {
  0% {
    opacity: 0;
    transform: translateY(-4px) rotate(-8deg) scale(.45);
  }
  60% {
    opacity: 1;
    transform: translateY(-3px) rotate(15deg) scale(1.08);
  }
  80% {
    transform: rotate(15deg) scale(.97);
  }
  100% {
    opacity: 1;
    transform: rotate(15deg) scale(1);
  }
}
.score-number:has(.score-crown),
.total:has(.score-crown) {
  margin-top: 22px;
}
.gallery figcaption strong:has(.score-crown) {
  margin-top: 4px;
}
.gallery .score-crown {
  position: relative;
  top: -2px;
  left: auto;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  width: 18px;
  height: 18px;
}
.result-actions {
  display: grid;
  gap: 11px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}
.score-breakdown {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #b7cde3;
  text-align: left;
  color: var(--blue-dark);
}
.score-breakdown h3 {
  margin: 0 0 4px;
  font-size: 13px;
}
.score-breakdown .breakdown-note {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.6;
  color: #5378a4;
}
.score-breakdown dl {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}
.score-breakdown dl > div {
  position: relative;
  padding: 6px 0;
}
.score-breakdown dd {
  margin: 0;
  font-weight: 700;
}
.breakdown-track {
  display: block;
  height: 7px;
  margin: 8px 6px 4px;
  border-radius: 999px;
  background: #dcecf5;
  box-shadow: inset 0 1px 2px #17387312;
}
.breakdown-fill {
  display: block;
  position: relative;
  width: var(--score-position);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #087dbd, #05b9ee);
}
.breakdown-thumb {
  position: absolute;
  top: 50%;
  right: -6px;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  border: 2px solid #fff;
  border-radius: 50%;
  background: #05b9ee;
  box-shadow: 0 0 0 1px #7ec8e7, 0 2px 3px #17387320;
}
@media (prefers-reduced-motion: no-preference) {
  .breakdown-fill {
    animation: breakdown-reveal 850ms cubic-bezier(.22, 1, .36, 1) var(--score-delay) backwards;
  }
}
@keyframes breakdown-reveal {
  from { width: 0; }
  to { width: var(--score-position); }
}
.score-breakdown .breakdown-unavailable {
  font-size: 10px;
  font-weight: 400;
  color: #5378a4;
}
.result-actions .primary {
  font-size: 13px;
  padding: 10px 7px;
  min-width: 0;
}
.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid #a6c6df;
  border-radius: 8px;
  padding: 13px 17px;
  font-size: 13px;
  font-weight: 800;
  min-height: 44px;
  box-shadow: 0 3px 0 #92b2cf55;
}
.secondary:disabled {
  opacity: .55;
}
.text-button {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 9px 0;
  font-size: 11px;
  color: #607c9c;
}
.error-tag {
  display: none;
}
.result-body .error-title {
  font-size: 19px;
}
.result-body .pending-label {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 9px;
}
.result-orbit {
  display: grid;
  place-items: center;
  font-size: 46px;
  color: #22b9e6;
  height: 80px;
}
.loading-orbit {
  animation: orbit 1.8s linear infinite;
}
@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}
body[data-phase=review] .result {
  animation: result-in .35s ease-out;
}
body[data-phase=review] .stopwatch {
  opacity: .65;
}
@keyframes result-in {
  from {
    opacity: 0;
    translate: 0 15px;
    scale: .9;
  }
  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}
footer {
  max-width: 1440px;
  margin: 24px auto 0;
  padding: 0 35px 17px;
  font: italic 10px "Arial", sans-serif;
  color: #234f82;
  display: flex;
  justify-content: space-between;
  text-shadow: 0 1px 4px #fff, 0 0 8px #fff;
}
.summary {
  position: relative;
  background: #ffffffee;
  border: 6px solid #e4f6ff;
  border-radius: 15px;
  box-shadow:
    0 0 0 2px #188fcf,
    0 10px 0 #2584b329,
    0 15px 25px #16538c33;
  padding: 28px;
  text-align: center;
  max-width: 1160px;
  margin: 8px auto 0;
}
.finish-label {
  display: inline-block;
  margin: 0;
  background: #ffeb87;
  padding: 7px 23px;
  transform: rotate(-3deg);
  font: 900 italic 17px Arial;
  letter-spacing: 2px;
}
.summary h2 {
  font-size: 27px;
  margin: 23px 0 9px;
}
.total {
  font: 900 italic 64px/1.2 "Arial Black", sans-serif;
  color: #048ec1;
}
.total small {
  font: 700 18px sans-serif;
  margin-left: 9px;
}
.summary-note {
  display: block;
  font: bold 17px sans-serif;
  color: var(--ink);
  margin-top: 12px;
}
#summary-condition {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0;
}
.gallery figure {
  margin: 0;
  padding: 8px 8px 13px;
  background: #fff;
  border: 1px solid #d9e3ef;
  box-shadow: 0 4px 8px #20385713;
  transform: rotate(-2deg);
}
.gallery figure:nth-child(even) {
  transform: rotate(2deg);
}
.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid #edf1f7;
}
.gallery figcaption {
  font-size: 11px;
  margin-top: 9px;
  line-height: 1.9;
}
.gallery figcaption strong {
  display: block;
  font-size: 14px;
}
.individual-downloads {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.individual-downloads button {
  width: 100%;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 11px;
  letter-spacing: 0;
}
.individual-save-status {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.individual-save-status:not(:empty) {
  margin-top: 8px;
}
.summary-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  align-items: center;
  margin: 24px 0 18px;
}
.summary-buttons .primary {
  font-size: 14px;
}
.share {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  border: 1px solid #a6c6df;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
}
.share-fallback {
  margin: 12px auto;
  max-width: 560px;
  font-size: 12px;
  color: var(--muted);
}
#ranking-dialog #ranking-form { display: flex; flex-direction: column; align-items: stretch; }
#ranking-dialog #nickname,#ranking-dialog #x-username { width: 100%; }
#ranking-dialog #x-username-help { font-size:11px; line-height:1.6; margin:0 0 4px; color:var(--muted); }
.share-note {
  font-size: 11px;
  color: var(--muted);
}
.leaderboard {
  margin: 25px auto 0;
  text-align: left;
  border-top: 1px dashed #aac5df;
  max-width: 650px;
  padding-top: 16px;
}
.leaderboard summary {
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.leaderboard p {
  font-size: 11px;
  color: var(--muted);
}
#ranking-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
}
#nickname,#x-username {
  padding: 10px;
  border: 1px solid #b3cadf;
  border-radius: 6px;
  min-width: 0;
  width: 160px;
}
#ranking-list {
  padding-left: 25px;
}
#ranking-list li {
  font-size: 13px;
  border-bottom: 1px solid #e1eaf3;
  padding: 11px 0;
}
#ranking-list li:has(.ranking-name) { display:list-item; position:relative; padding-right:76px; }
#ranking-list .ranking-name { min-width:0; overflow-wrap:anywhere; }
#ranking-list .ranking-name + span { position:absolute; right:0; top:11px; white-space:nowrap; }
.ranking-identity { display:flex; align-items:baseline; gap:6px; min-width:0; }
.ranking-nickname { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ranking-x-profile { display:block; min-width:0; padding:3px 0; font-size:11px; font-weight:400; line-height:1.5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--blue-dark); text-decoration:underline; text-underline-offset:2px; }
#ranking-list li > span {
  float: right;
  font-weight: 700;
}
dialog {
  border: 3px solid #c5eaff;
  border-radius: 16px;
  box-shadow: 0 0 0 2px #178dc4, 0 20px 70px #133b6266;
  max-width: 430px;
  width: calc(100% - 36px);
  padding: 23px;
  color: var(--ink);
  background: #fafdff;
}
dialog::backdrop {
  background: #163b665c;
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.dialog-head h2 {
  font-size: 22px;
  margin: 0;
}
.close-button {
  font: 28px Arial;
  background: #eaf5fc;
  border-radius: 50%;
  height: 40px;
  width: 40px;
}
.duration-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
}
.duration-setting input {
  width: 70px;
  background: white;
  padding: 9px;
  border: 1px solid #b7ccdf;
  border-radius: 6px;
  color: inherit;
}
.duration-setting input:disabled {
  opacity: .55;
}
dialog p {
  font-size: 13px;
  line-height: 1.9;
}
dialog > p {
  margin: 20px 0;
}
.about-game {
  font-size: 12px;
  border-top: 1px dashed #c1d5e9;
  padding-top: 16px;
}
.about-game summary {
  cursor: pointer;
}
.about-game p {
  font-size: 11px;
  color: #597498;
}
@media (min-width: 1100px) and (min-height: 780px) {
  .workspace {
    grid-template-columns: minmax(175px, 1fr) minmax(420px, min(640px, calc(100svh - 405px))) minmax(175px, 1fr);
  }
}
@media (min-width: 1100px) and (max-height: 850px) {
  .topbar {
    height: 100px;
  }
  .workspace {
    grid-template-columns: minmax(175px, 1fr) minmax(360px, min(510px, calc(100svh - 380px))) minmax(175px, 1fr);
  }
  .sketchbook {
    --paper-top: 20px;
  }
  .brief {
    padding-top: 86px;
  }
  .side {
    padding-top: 67px;
  }
  .start-button {
    min-height: 61px;
    font-size: 30px;
  }
  .submit-row {
    margin-top: 18px;
  }
  .submit-row p {
    margin-top: 22px;
  }
  .sketch-caption {
    margin-bottom: 13px;
  }
  .palette {
    gap: 6px;
  }
  .swatch {
    width: 23px;
    height: 23px;
    min-width: 23px;
  }
  .width-label {
    min-width: 88px;
    padding-left: 11px;
  }
  .palette-row {
    gap: 10px;
  }
  .color-options {
    gap: 6px;
  }
  .control-caption {
    font-size: 9px;
  }
  .stopwatch {
    width: 175px;
  }
  .timer {
    font-size: 65px;
  }
}
@media (max-width: 1099px) {
  .topbar {
    height: 105px;
    padding: 25px 28px 0;
  }
  .brand {
    font-size: 31px;
  }
  .lineup {
    top: 31px;
    gap: 19px;
  }
  .lineup li {
    width: 29px;
    height: 29px;
    font-size: 15px;
  }
  .lineup li:not(:last-child):after {
    width: 13px;
  }
  .connection {
    font-size: 10px;
  }
  .top-actions {
    gap: 8px;
  }
  .workspace {
    grid-template-columns: 165px minmax(350px, 1fr) 165px;
    gap: 27px;
  }
  main {
    padding: 0 25px;
  }
  .brief {
    padding-top: 90px;
  }
  .character-ticket {
    padding: 23px 12px 20px;
    min-height: 210px;
  }
  .character-ticket h1 {
    font-size: 24px;
  }
  .ticket-tab {
    font-size: 20px;
    padding: 7px 14px;
    margin-left: -12px;
  }
  .ticket-note {
    font-size: 9px;
  }
  .ticket-code {
    display: none;
  }
  .ticket-halo {
    width: 92px;
    margin: 24px 0 13px;
  }
  .clear-ticket {
    padding: 9px 6px;
  }
  .clear-ticket strong {
    font-size: 33px;
  }
  .clear-ticket span {
    font-size: 13px;
  }
  .clear-ticket svg {
    width: 14px;
  }
  .side {
    padding-top: 79px;
    gap: 30px;
  }
  .stopwatch {
    width: 150px;
    padding: 9px;
  }
  .timer {
    font-size: 53px;
    letter-spacing: -3px;
  }
  .clock-unit {
    font-size: 12px;
  }
  .clock-face {
    border-width: 5px;
  }
  .stopwatch:after {
    inset: 13px;
  }
  .result {
    padding: 21px 9px 17px 13px;
  }
  .result-body .ready-title {
    font-size: 27px;
  }
  .result-body p {
    font-size: 11px;
  }
  .score-number {
    font-size: 44px;
  }
  .sketchbook {
    --paper-top: 23px;
    padding: var(--paper-top) 12px 12px 24px;
  }
  .toolbar {
    left: -22px;
    padding: 6px 4px;
    gap: 10px;
    top: 63px;
  }
  .tool {
    width: 38px;
    height: 40px;
  }
  .tool svg {
    width: 23px;
    height: 23px;
  }
  .palette-row {
    padding: 9px 6px 5px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .palette {
    gap: 7px;
  }
  .swatch {
    width: 25px;
    height: 25px;
    min-width: 25px;
  }
  .width-label {
    max-width: none;
    width: 100%;
    padding: 8px 0 0;
    border-left: 0;
    border-top: 1px dashed #d6e3ef;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .width-label .control-caption {
    margin: 0;
    white-space: nowrap;
  }
  .width-control {
    width: 100%;
    height: 17px;
  }
  .start-button {
    font-size: 28px;
    min-height: 63px;
    min-width: 80%;
  }
  .start-button:after {
    right: -31px;
    font-size: 38px;
  }
  .sketch-caption {
    font-size: 15px;
  }
}
@media (max-width: 820px) {
  body {
    background-position: center center;
    background-attachment: fixed;
  }
  .topbar {
    padding: 19px 18px 0;
    height: 106px;
    gap: 10px;
    align-items: flex-start;
  }
  .brand {
    font-size: 28px;
    letter-spacing: -1.3px;
  }
  .brand small {
    font-size: 8px;
    letter-spacing: 2px;
  }
  .brand-orbit:after {
    font-size: 22px;
    top: -12px;
  }
  .settings-button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .settings-button svg {
    width: 20px;
    height: 20px;
  }
  .top-actions {
    gap: 6px;
    align-items: flex-start;
  }
  .connection {
    font-size: 9px;
    padding-top: 11px;
  }
  .connection:before {
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border-width: 1px;
  }
  .lineup {
    top: 77px;
    gap: 22px;
  }
  .lineup li {
    width: 25px;
    height: 25px;
    font-size: 13px;
    border-width: 1.5px;
  }
  .lineup li:not(:last-child):after {
    width: 15px;
  }
  main {
    padding: 0 20px;
  }
  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 15px 13px;
    padding-top: 23px;
  }
  .brief {
    padding: 0;
    grid-column: 1;
    grid-row: 1;
    position: relative;
    align-self: center;
  }
  .character-ticket {
    transform: rotate(-3deg);
    min-height: 0;
    padding: 12px 13px 9px;
    border-width: 4px;
    box-shadow: 0 4px 9px #23619228;
  }
  .character-ticket h1 {
    font-size: 23px;
    line-height: 1.35;
    margin: 0;
    letter-spacing: -.8px;
    padding-right: 10px;
  }
  .ticket-tab {
    position: absolute;
    left: 11px;
    top: -10px;
    font-size: 11px;
    padding: 4px 12px;
    margin: 0;
  }
  .ticket-tab i {
    font-size: 13px;
    margin-left: 5px;
  }
  .school {
    font-size: 10px;
    padding: 2px 0 0;
    border: 0;
    margin-top: 2px;
  }
  .paperclip,
  .ticket-halo,
  .ticket-note,
  .ticket-code {
    display: none;
  }
  .clear-ticket {
    position: absolute;
    right: 7px;
    bottom: -14px;
    margin: 0;
    padding: 2px 6px;
    border-width: 3px;
    gap: 1px;
    transform: rotate(-3deg);
    box-shadow: 0 3px 4px #6b94ab30;
  }
  .clear-ticket strong {
    font-size: 19px;
    letter-spacing: -1px;
  }
  .clear-ticket span {
    font-size: 10px;
  }
  .clear-ticket svg {
    display: none;
  }
  .side {
    display: contents;
  }
  .stopwatch {
    grid-column: 2;
    grid-row: 1;
    width: 82px;
    align-self: center;
    padding: 5px;
    transform: rotate(4deg);
  }
  .stopwatch:before {
    width: 19px;
    height: 8px;
    top: -11px;
    left: calc(50% - 9px);
    border-width: 1px;
  }
  .stopwatch:after {
    inset: 7px;
    border-width: 2px;
  }
  .clock-face {
    border-width: 3px;
  }
  .clock-face:before,
  .clock-face:after {
    width: 2px;
    height: 4px;
    left: calc(50% - 1px);
    top: 3px;
  }
  .clock-face:after {
    top: auto;
    bottom: 3px;
  }
  .timer {
    font-size: 32px;
    letter-spacing: -1px;
    margin-top: 2px;
  }
  .clock-unit {
    font-size: 9px;
    margin-top: 0;
  }
  .studio {
    grid-column: 1/-1;
    grid-row: 2;
    margin-top: 8px;
  }
  .sketch-caption {
    height: 19px;
    margin-bottom: 14px;
    font-size: 11px;
    letter-spacing: 1.3px;
  }
  .sketch-caption svg {
    width: 14px;
    height: 14px;
  }
  .sketchbook {
    --paper-top: 18px;
    padding: var(--paper-top) 9px 9px 20px;
    border-width: 3px;
    border-radius: 12px;
    box-shadow:
      0 0 0 1.5px #008fda,
      0 0 0 3px #70d8ff,
      0 6px 0 3px #2095cc55,
      0 10px 20px #2a638b3b;
  }
  .binding {
    top: -10px;
    left: 12%;
    right: 7%;
  }
  .binding i {
    width: 6px;
    height: 20px;
  }
  .binding i:after {
    width: 8px;
    height: 5px;
    margin-left: -2px;
    bottom: -1px;
  }
  .toolbar {
    left: -15px;
    top: 44px;
    padding: 5px 3px;
    gap: 8px;
    border-radius: 7px;
  }
  .tool {
    width: 32px;
    height: 34px;
    border-radius: 6px;
  }
  .tool svg {
    width: 20px;
    height: 20px;
  }
  .palette-row {
    padding: 8px 3px 3px;
    margin: 10px -3px -2px -12px;
    gap: 10px;
  }
  .color-tools {
    width: 100%;
  }
  .color-options {
    justify-content: space-between;
    gap: 7px;
  }
  .palette {
    justify-content: space-between;
    flex: 1;
    gap: 5px;
  }
  .swatch {
    width: 25px;
    height: 25px;
    min-width: 25px;
  }
  .custom-color {
    width: 26px;
    height: 26px;
  }
  .control-caption {
    font-size: 9px;
    margin-bottom: 7px;
  }
  .width-label {
    padding-top: 7px;
    gap: 10px;
  }
  .width-control {
    height: 18px;
  }
  .submit-row {
    margin-top: 17px;
  }
  .start-button {
    font-size: 27px;
    min-height: 55px;
    min-width: 73%;
    border-radius: 17px;
    letter-spacing: 2px;
    box-shadow:
      inset 0 0 0 2px #6eebff,
      0 0 0 2px #096eab,
      0 5px 0 2px #0579b5,
      0 8px 0 2px #163f77,
      0 11px 0 2px #d3ecfabb;
  }
  .start-button:after {
    font-size: 35px;
    right: -29px;
    top: -8px;
  }
  .submit-row p {
    margin: 18px 0 0;
    font-size: 10px;
  }
  .result {
    grid-column: 1/-1;
    grid-row: 3;
    max-width: min(360px, calc(100% - 16px));
    justify-self: center;
    transform: rotate(-2deg);
    padding: 22px 25px;
    margin: 7px 0 6px;
  }
  .result-body .ready-title {
    font-size: 35px;
  }
  .result-body h2 {
    font-size: 16px;
  }
  .score-number {
    font-size: 63px;
  }
  .result-body p {
    font-size: 12px;
  }
  .result-actions .primary {
    font-size: 16px;
    min-height: 47px;
  }
  .result-actions {
    gap: 14px;
  }
  .result-body .pending-label {
    font-size: 13px;
  }
  body[data-phase=welcome] .result,
  body[data-phase=ready] .result,
  body[data-phase=drawing] .result {
    display: none;
  }
  body[data-phase=review] .submit-row,
  body[data-phase=error] .submit-row {
    display: none;
  }
  footer {
    padding: 0 18px 12px;
    font-size: 9px;
    margin-top: 24px;
  }
  .summary {
    padding: 23px 13px;
    margin-top: 20px;
    border-width: 4px;
  }
  .finish-label {
    font-size: 12px;
    letter-spacing: 1.5px;
    padding: 7px 10px;
  }
  .summary h2 {
    font-size: 22px;
    margin-top: 20px;
  }
  .total {
    font-size: 48px;
  }
  .total small {
    font-size: 15px;
  }
  .summary-note {
    font-size: 14px;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    margin: 24px 0;
  }
  .gallery figure {
    padding: 6px;
  }
  .gallery figure:last-child {
    grid-column: 1/-1;
    width: calc(50% - 6px);
    justify-self: center;
  }
  .gallery figcaption {
    font-size: 10px;
  }
  .gallery figcaption strong {
    font-size: 12px;
  }
  .summary-buttons {
    gap: 12px;
  }
  .summary-buttons > * {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    justify-content: center;
  }
  .summary-buttons #same-five, .summary-buttons #new-five { flex-basis: 100%; }
  .summary-buttons .primary {
    margin: 0 2px 6px;
  }
  .share-note {
    font-size: 10px;
  }
  .leaderboard {
    margin-top: 20px;
  }
  #ranking-form {
    flex-direction: column;
    align-items: stretch;
  }
  #nickname {
    width: 100%;
  }
}
@media (max-width: 360px) {
  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }
  .brand {
    font-size: 24px;
  }
  .connection {
    max-width: 82px;
    font-size: 8px;
  }
  .settings-button {
    width: 30px;
    height: 30px;
  }
  .swatch {
    width: 21px;
    height: 21px;
    min-width: 21px;
  }
  .character-ticket h1 {
    font-size: 20px;
  }
  .ticket-tab {
    font-size: 10px;
  }
  .start-button {
    font-size: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.start-button {
  font-family:
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    sans-serif;
  font-weight: 900;
}
@media (min-width: 1100px) and (max-height: 850px) {
  .palette-row {
    flex-wrap: wrap;
  }
  .color-tools {
    width: 100%;
  }
  .color-options {
    justify-content: space-between;
  }
  .palette {
    flex: 1;
    justify-content: space-between;
  }
  .width-label {
    max-width: none;
    width: 100%;
    border: 0;
    padding: 3px 0 0;
    display: flex;
    gap: 12px;
    align-items: center;
  }
  .width-label .control-caption {
    margin: 0;
    white-space: nowrap;
  }
  .width-control {
    width: 100%;
    height: 16px;
  }
}
@media (max-width: 820px) {
  .tool {
    height: 40px;
    width: 34px;
  }
  .toolbar {
    gap: 6px;
    left: -17px;
  }
}
@media (min-width: 1100px) {
  .workspace {
    grid-template-columns: minmax(175px, 280px) minmax(420px, min(640px, calc(100svh - 405px))) minmax(175px, 260px);
    justify-content: center;
  }
  .brief {
    padding-top: 97px;
  }
  .side {
    padding-top: 77px;
  }
}
@media (min-width: 1100px) and (max-height: 850px) {
  .workspace {
    grid-template-columns: minmax(175px, 260px) minmax(360px, min(510px, calc(100svh - 380px))) minmax(175px, 240px);
    gap: 35px;
  }
  .brief {
    padding-top: 80px;
  }
  .side {
    padding-top: 63px;
  }
}
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: none;
  margin: 0;
  padding: 10px 3%;
  pointer-events: none;
}
@media (max-width: 820px) {
  footer {
    display: none;
  }
}
@media (min-width: 821px) and (max-width: 1099px) {
  .workspace {
    grid-template-columns: 165px minmax(330px, min(560px, calc(100svh - 390px))) 165px;
    justify-content: center;
  }
}
@media (min-width: 521px) and (max-width: 820px) {
  main {
    max-width: 620px;
  }
  .workspace {
    max-width: 560px;
    margin: auto;
  }
}
.sketchbook {
  isolation: isolate;
  perspective: 2000px;
  perspective-origin: 50% 0;
}
@media (max-width:820px) {
  .sketchbook { perspective:6000px; }
}
.book-cover {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #f5fcff;
  text-align: center;
  transform-origin: 50% 0;
  backface-visibility: hidden;
  background:
    linear-gradient(
      90deg,
      #126baf 0 15px,
      transparent 15px),
    repeating-linear-gradient(
      135deg,
      #ffffff05 0 1px,
      transparent 1px 5px),
    radial-gradient(
      ellipse at 90% 0%,
      #60d7f5,
      transparent 55%),
    linear-gradient(
      150deg,
      #20b8e8,
      #147bd0 70%,
      #1557a7);
  border: 2px solid #8ddff9;
  box-shadow: inset 4px 0 10px #103e6840, inset -3px -5px 0 #05467740;
}
.book-cover:before {
  content: "";
  position: absolute;
  inset: 16px 17px 18px 28px;
  border: 1px solid #c4f5ff78;
  border-radius: 3px;
  pointer-events: none;
}
.book-cover:after {
  content: "";
  position: absolute;
  width: 190%;
  height: 45px;
  background: #ffffff10;
  transform: rotate(-40deg);
  top: 15%;
  pointer-events: none;
}
.cover-edition {
  font: 800 12px Arial, sans-serif;
  letter-spacing: 5px;
  margin: 10px 0 20px;
}
.cover-emblem {
  width: 110px;
  height: 64px;
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.cover-emblem span {
  width: 96px;
  height: 29px;
  border: 4px solid #fff2a6;
  border-radius: 50%;
  transform: rotate(-20deg);
}
.cover-emblem svg {
  position: absolute;
  right: 0;
  top: 0;
  width: 22px;
  height: 22px;
  color: #fff2a6;
}
.cover-title {
  font:
    950 italic clamp(45px, 5.3vw, 76px)/.98 "Arial Black",
    "Helvetica Neue",
    sans-serif;
  letter-spacing: -4px;
  text-shadow: 3px 5px 0 #1263a955;
  transform: rotate(-5deg);
}
.cover-label {
  position: relative;
  background: #f4fbff;
  color: #214571;
  transform: rotate(-4deg);
  padding: 14px 24px;
  min-width: 65%;
  max-width: 86%;
  margin-top: 38px;
  box-shadow: 0 5px 0 #0e5c9845;
}
.cover-label:before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #cfdfef;
}
.cover-label span {
  display: block;
  font: 700 9px Arial, sans-serif;
  letter-spacing: 1.8px;
}
.cover-label strong {
  display: block;
  font-size: 18px;
  margin-top: 9px;
}
.cover-corner {
  position: absolute;
  right: 26px;
  bottom: 23px;
  font: 900 italic 31px Arial;
  color: #b3eaffc7;
}
.binding {
  z-index: 8;
}
body:not([data-phase=welcome]):not([data-phase=ready]):not([data-phase=opening]):not([data-phase=start-error]) .book-cover {
  visibility: hidden;
}
body:is([data-phase=welcome], [data-phase=ready], [data-phase=start-error]) .paper-wrap {
  visibility: hidden;
}
body:is([data-phase=welcome], [data-phase=ready], [data-phase=opening], [data-phase=start-error]) :is(.toolbar, .palette-row) {
  visibility: hidden;
  pointer-events: none;
}
body:not([data-phase=drawing]) #canvas {
  cursor: default;
  pointer-events: none;
}
body[data-phase=opening] .result {
  visibility: hidden;
}
body[data-phase=opening] .submit-row {
  visibility: hidden;
}
body[data-phase=start-error] .result {
  display: block;
}
body[data-phase=start-error] .result-actions {
  display: none;
}
#show-onboarding {
  width: 100%;
  margin-bottom: 17px;
}
body:has(#onboarding[open]) {
  overflow: hidden;
}
.onboarding {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  inset: 0;
  padding: 24px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(#bce9ff70, #def3ff45), url(/assets/sky-campus.png) center/cover;
  color: var(--ink);
}
.onboarding::backdrop {
  background: #86ccec;
  backdrop-filter: none;
}
.onboarding[open] {
  display: grid;
  place-items: center;
}
.onboarding-shell {
  width: min(680px, 100%);
  border: 5px solid #dcf3ff;
  border-radius: 22px;
  background: #fbfdfff5;
  padding: 25px 40px 32px;
  box-shadow:
    0 0 0 2px #159bda,
    0 13px 0 #186c9b24,
    0 20px 65px #2265904a;
}
.onboarding-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.onboarding-top > span {
  font: 900 italic 20px "Arial Black", sans-serif;
  letter-spacing: -.6px;
}
.tour-skip {
  background: transparent;
  font-size: 12px;
  padding: 12px;
  color: #607e9d;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.onboarding-stage {
  min-height: 445px;
  padding: 24px 0 0;
  text-align: center;
}
.onboarding-page h2 {
  margin: 16px 0 12px;
  font-size: 29px;
  letter-spacing: -.5px;
}
.onboarding-page > p:not(.tour-kicker) {
  margin: 0;
  font-size: 14px;
  color: #557296;
  line-height: 1.9;
}
.onboarding-page .tour-kicker {
  display: inline-block;
  color: #32668d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  background: #e5f5ff;
  border-radius: 4px;
  padding: 6px 12px;
  margin: 16px 0 0;
}
.tour-illustration {
  height: 245px;
  max-width: 340px;
  margin: 0 auto;
  position: relative;
  display: grid;
  place-items: center;
}
.tour-illustration:before {
  content: "";
  position: absolute;
  border-radius: 50%;
  width: 223px;
  height: 223px;
  background: #e5f5fe;
}
.tour-character-card {
  width: 200px;
  height: 206px;
  padding: 25px;
  text-align: left;
  background: #fff;
  border: 1px solid #acd9ef;
  outline: 6px solid white;
  box-shadow: 0 13px 28px #376d9725;
  transform: rotate(-8deg);
}
.tour-character-card > span {
  display: block;
  width: max-content;
  background: #05b2e9;
  color: white;
  padding: 6px 15px;
  font-size: 15px;
  margin: -24px 0 20px -22px;
  font-weight: 800;
}
.tour-character-card strong {
  display: block;
  font-size: 32px;
}
.tour-halo {
  display: block;
  width: 95px;
  height: 27px;
  border: 4px solid #51c9ee;
  border-radius: 50%;
  transform: rotate(-10deg);
  margin: 19px 0;
}
.tour-character-card small {
  font: 8px Arial;
  letter-spacing: 2px;
  color: #83a2bf;
}
.tour-spark {
  position: absolute;
  right: 36px;
  top: 28px;
  color: #edc742;
  font-size: 47px;
  transform: rotate(10deg);
}
.tour-mini-book {
  width: 197px;
  height: 210px;
  background: #fff;
  border: 9px solid #d8f1ff;
  outline: 2px solid #6bbbe5;
  border-radius: 8px;
  transform: rotate(-7deg);
  box-shadow: 0 12px 15px #2652791a;
  padding: 20px 10px 10px;
  position: relative;
}
.tour-mini-book:before {
  content: "";
  position: absolute;
  top: -16px;
  left: 18px;
  right: 18px;
  height: 23px;
  background:
    repeating-linear-gradient(
      90deg,
      #77a8c8 0 5px,
      transparent 5px 25px);
  border-radius: 3px;
}
.tour-mini-book svg {
  width: 100%;
  height: 100%;
  color: #638ac0;
  stroke-width: 3;
}
.tour-time {
  position: absolute;
  top: 20px;
  right: 19px;
  background: var(--yellow);
  border: 4px solid white;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 900 italic 36px Arial;
  box-shadow: 0 4px 10px #445d841c;
}
.tour-time small {
  font: 700 11px sans-serif;
  align-self: center;
  margin: 13px 0 0 2px;
}
.tour-pencil {
  position: absolute;
  bottom: 37px;
  right: 25px;
  transform: rotate(-15deg);
  color: #1484c4;
}
.tour-pencil svg {
  width: 77px;
  height: 77px;
  fill: #b9f2ff;
  stroke-width: 1.2;
}
.tour-score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
  border: 1px solid #c2dbeb;
  box-shadow: 0 12px 25px #24588225;
  width: 235px;
  padding: 25px 20px 22px;
  transform: rotate(-6deg);
}
.tour-score-card > span {
  font: 900 italic 15px Arial;
  border-bottom: 5px solid #ffe775;
}
.tour-score-card strong {
  font: 900 italic 73px Arial;
  color: #079bcf;
  margin: 10px 0;
  letter-spacing: -4px;
}
.tour-score-card small {
  font: 700 12px Arial;
  letter-spacing: 0;
  margin-left: 6px;
}
.tour-score-card b {
  background: #fff2a3;
  padding: 5px 25px;
  font-size: 18px;
}
.tour-score-star {
  color: #edc438;
  font-size: 52px;
  position: absolute;
  left: 9px;
  top: 15px;
  transform: rotate(-10deg);
  z-index: 1;
}
.tour-score-star.small {
  font-size: 48px;
  left: auto;
  top: auto;
  right: 0;
  bottom: 25px;
}
.tour-practice-note {
  display: block;
  font-size: 10px;
  color: #7d91a8;
  margin-top: 10px;
}
.onboarding-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
}
.onboarding-navigation .primary {
  min-width: 160px;
  font-size: 17px;
  min-height: 51px;
}
.tour-back {
  display: grid;
  place-items: center;
  border: 1px solid #d4e2ef;
  border-radius: 50%;
  background: white;
  font-size: 23px;
  width: 44px;
  height: 44px;
}
.tour-back:disabled {
  opacity: .25;
}
.tour-progress {
  display: flex;
  gap: 9px;
  margin-left: auto;
  margin-right: auto;
}
.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7dfef;
}
.onboarding-dot.current {
  width: 25px;
  border-radius: 5px;
  background: #0ab5e6;
}
.start-cue {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #dff8ff3b;
  pointer-events: auto;
}
.start-cue-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
  padding: 32px;
  transform: rotate(-5deg);
}
.start-cue-content:before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: 18%;
  bottom: 16%;
  background:
    linear-gradient(
      90deg,
      #effcff00,
      #f2fcffed 25% 75%,
      #effcff00);
  border-top: 3px solid #fff9;
  border-bottom: 3px solid #fff9;
  z-index: -1;
}
.start-cue-title {
  font:
    950 italic clamp(80px, 12vw, 170px)/1.2 "Arial Black",
    "Helvetica Neue",
    sans-serif;
  color: #0b528c;
  letter-spacing: -7px;
  text-shadow: 4px 5px white, 7px 8px #00bce854;
  min-height: 1.2em;
}
.start-cue-round {
  background: #ffeb79;
  color: #29577d;
  font: 800 14px Arial;
  letter-spacing: 3px;
  padding: 8px 22px;
}
.cue-speedlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      -7deg,
      transparent 0 90px,
      #fff5 91px 92px,
      transparent 93px 150px);
  animation: cue-lines .6s linear infinite;
}
@keyframes cue-lines {
  from {
    translate: 10% 0;
  }
  to {
    translate: -10% 0;
  }
}
@media (max-height: 850px) and (min-width: 1100px) {
  .cover-edition {
    font-size: 9px;
    margin-bottom: 8px;
  }
  .cover-title {
    font-size: 49px;
  }
  .cover-emblem {
    height: 50px;
    margin-bottom: 8px;
  }
  .cover-label {
    margin-top: 24px;
    padding: 10px 17px;
  }
  .cover-label strong {
    font-size: 15px;
  }
  .cover-corner {
    font-size: 25px;
  }
}
@media (max-width: 820px) {
  body[data-phase=opening] .result {
    display: none;
  }
  .cover-edition {
    font-size: 9px;
    letter-spacing: 3px;
    margin-bottom: 14px;
  }
  .cover-title {
    font-size: 54px;
    letter-spacing: -3px;
  }
  .cover-emblem {
    height: 50px;
    margin-bottom: 12px;
  }
  .cover-emblem span {
    width: 85px;
    height: 25px;
    border-width: 3px;
  }
  .cover-label {
    margin-top: 28px;
    padding: 12px 18px;
  }
  .cover-label strong {
    font-size: 16px;
  }
  .cover-label span {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  .cover-corner {
    font-size: 24px;
    bottom: 20px;
    right: 21px;
  }
  .onboarding {
    padding: 20px 16px;
  }
  .onboarding-shell {
    padding: 17px 18px 24px;
    border-radius: 17px;
    border-width: 4px;
  }
  .onboarding-top > span {
    font-size: 17px;
  }
  .onboarding-stage {
    min-height: 390px;
    padding-top: 16px;
  }
  .tour-illustration {
    height: 216px;
    max-width: 290px;
  }
  .tour-illustration:before {
    width: 194px;
    height: 194px;
  }
  .tour-character-card {
    scale: .9;
  }
  .tour-mini-book {
    scale: .88;
  }
  .tour-time {
    right: 4px;
    top: 10px;
    width: 70px;
    height: 70px;
    font-size: 31px;
  }
  .tour-pencil {
    right: 5px;
    bottom: 22px;
  }
  .tour-score-card {
    scale: .9;
  }
  .tour-score-star {
    left: 0;
    font-size: 42px;
    top: 20px;
  }
  .tour-score-star.small {
    right: -3px;
    font-size: 38px;
  }
  .onboarding-page h2 {
    font-size: 22px;
    letter-spacing: -.6px;
    margin-top: 15px;
  }
  .onboarding-page > p:not(.tour-kicker) {
    font-size: 12px;
  }
  .onboarding-navigation {
    gap: 12px;
    margin-top: 21px;
  }
  .onboarding-navigation .primary {
    min-width: 134px;
    font-size: 15px;
  }
  .start-cue-title {
    font-size: 76px;
    letter-spacing: -5px;
  }
  .start-cue-round {
    font-size: 11px;
    padding: 7px 17px;
  }
}
@media (max-width: 360px) {
  .cover-title {
    font-size: 43px;
  }
  .cover-emblem {
    margin: 0;
    height: 40px;
  }
  .cover-label {
    padding: 10px 14px;
    margin-top: 22px;
  }
  .cover-label strong {
    font-size: 13px;
  }
  .cover-label span {
    font-size: 7px;
  }
  .onboarding-shell {
    padding-inline: 13px;
  }
  .onboarding-top > span {
    font-size: 15px;
  }
  .onboarding-page h2 {
    font-size: 20px;
  }
  .onboarding-navigation {
    gap: 9px;
  }
  .onboarding-navigation .primary {
    min-width: 117px;
  }
  .tour-progress {
    gap: 6px;
  }
}
@media (max-height: 650px) {
  .onboarding {
    place-items: start center;
    padding-block: 14px;
    overflow: auto;
  }
  .onboarding-shell {
    padding-top: 10px;
    padding-bottom: 18px;
  }
  .onboarding-stage {
    min-height: 0;
    padding-top: 0;
  }
  .tour-illustration {
    height: 175px;
    scale: .8;
    margin-block: -8px;
  }
  .onboarding-navigation {
    margin-top: 19px;
  }
  .onboarding-page h2 {
    margin-top: 10px;
  }
  .onboarding-page .tour-kicker {
    margin-top: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cue-speedlines {
    animation: none;
  }
  .book-cover {
    transform: none !important;
  }
}
@media (max-height: 650px) and (min-width: 600px) {
  .onboarding[open] {
    place-items: center;
  }
  .onboarding-shell {
    padding: 12px 28px 20px;
  }
  .onboarding-stage {
    padding-top: 0;
    min-height: 0;
  }
  .onboarding-page:not([hidden]) {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    column-gap: 20px;
    align-content: center;
    min-height: 210px;
    text-align: left;
  }
  .onboarding-page .tour-illustration {
    grid-column: 1;
    grid-row: 1 / 5;
    height: 200px;
    width: 210px;
    margin: 0;
    scale: .8;
  }
  .onboarding-page .tour-kicker {
    grid-column: 2;
    justify-self: start;
    align-self: end;
    margin: 10px 0 0;
  }
  .onboarding-page h2 {
    font-size: 22px;
    margin: 12px 0 8px;
    align-self: end;
  }
  .onboarding-page > p:not(.tour-kicker) {
    font-size: 12px;
  }
  .onboarding-page .tour-practice-note {
    grid-column: 2;
    margin-top: 7px;
  }
  .onboarding-navigation {
    margin-top: 10px;
  }
}
.mode-selector {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: #f0faffed;
  border: 1px solid #9cdaef;
  border-radius: 22px;
  box-shadow: 0 3px 0 #25649625;
  transform: rotate(3deg);
}
.mode-selector button {
  background: transparent;
  color: #397098;
  border-radius: 18px;
  padding: 7px 17px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.mode-selector button[aria-pressed=true] {
  color: #fff;
  background: #069ac9;
  box-shadow: 0 2px 0 #086b97;
}
body[data-phase=welcome] .sketch-caption {
  margin-top: -12px;
}
.single-round .gallery {
  grid-template-columns: minmax(0, 440px);
  justify-content: center;
}
.single-round .gallery figure {
  transform: rotate(-2deg);
}
@media (max-width: 820px) {
  .mode-selector button {
    font-size: 11px;
    padding: 6px 10px;
  }
  body[data-phase=welcome] .sketch-caption {
    margin-top: -10px;
  }
  .single-round .gallery {
    grid-template-columns: minmax(0, 320px);
  }
}

.character-ticket h1.long-name { font-size:clamp(19px,1.9vw,27px); overflow-wrap:anywhere; }
@media(max-width:820px){.character-ticket h1.long-name{font-size:17px;line-height:1.3}}
.character-ticket h1 .character-variant { display:block; font-size:.75em; line-height:1.4; margin-top:3px; letter-spacing:0; }
@media(max-width:820px){.character-ticket h1 .character-variant{font-size:13px}}

.choose-character { position:relative; z-index:1; margin-top:10px; padding:8px 12px; border:1px solid #9cdaef; border-radius:12px; background:#effaff; color:#17638d; font-size:12px; font-weight:800; }
.character-dialog { width:min(520px,calc(100vw - 32px)); }
.character-dialog .dialog-head h2 { font-size:19px; }
.character-dialog .close-button { flex-shrink:0; }
.character-dialog > label { display:block; margin-bottom:8px; font-weight:700; }
#character-search { width:100%; min-width:0; padding:12px; border:1px solid #9cdaef; border-radius:12px; background:white; color:#24334b; font:inherit; }
.character-count { color:#526d84; font-size:12px; }
.character-options { list-style:none; padding:0; margin:0; max-height:min(340px,40dvh); overflow-y:auto; overscroll-behavior:contain; }
.character-options li + li { margin-top:6px; }
.character-options button { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; padding:13px 12px; text-align:left; border:1px solid #c5e2ee; border-radius:12px; background:#f3fbff; color:#24334b; }
.character-options button strong { overflow-wrap:anywhere; }
.character-options button span { flex-shrink:0; color:#526d84; font-size:11px; }
.character-options button:hover,.character-options button[aria-pressed=true] { background:#dff4ff; border-color:#069ac9; }
.character-options button:focus-visible,#character-search:focus-visible,.choose-character:focus-visible { outline:3px solid #069ac9; outline-offset:2px; }
@media(max-width:820px){.choose-character{margin-top:4px;padding:6px 10px;font-size:11px}}
@media(max-width:360px){.mode-selector button{padding:6px 7px}.character-dialog .dialog-head h2{font-size:16px}.character-options button{gap:6px}.character-options button strong{font-size:12px}}

.title-ranking { position:absolute; z-index:7; top:22px; right:20px; min-height:36px; padding:8px 14px; border:1px solid #bdeeff; border-radius:20px; background:#f2fbff; color:#17638d; font-size:12px; box-shadow:0 3px 0 #135f9830; }
.public-leaderboard { width:calc(100% - 32px); max-width:620px; max-height:calc(100dvh - 32px); }
.public-leaderboard .dialog-head { gap:12px; margin-bottom:16px; }
.public-leaderboard .close-button { flex-shrink:0; }
.public-leaderboard .leaderboard-heading { font-size:18px; font-weight:800; color:#087eaa; }
#public-ranking-status { font-size:13px; color:#526d84; }
.public-ranking-list { list-style:none; padding:0; margin:16px 0 0; }
.public-ranking-list li { display:grid; grid-template-columns:40px minmax(0,1fr) auto; align-items:center; gap:8px; padding:14px 12px; border:1px solid #c5e2ee; border-radius:12px; background:#f3fbff; }
.public-ranking-list li + li { margin-top:8px; }
.leaderboard-position { font-weight:800; color:#087eaa; }
.leaderboard-name { overflow-wrap:anywhere; }
.leaderboard-score { font-weight:800; white-space:nowrap; }
.public-ranking-list .leaderboard-subjects { grid-column:2/-1; font-size:11px; line-height:1.7; margin:0; color:#526d84; overflow-wrap:anywhere; }
@media(max-width:360px){.public-leaderboard{padding:18px}.public-ranking-list li{grid-template-columns:30px minmax(0,1fr) auto;padding:12px 8px;gap:6px;font-size:12px}.public-leaderboard .leaderboard-heading{font-size:16px}}

/* Session failures must remain visible beside Start on every layout. */
#session-error {
  color: #8b2039;
  background: #fff4f5;
  border: 1px solid #d98998;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}
@media (max-width:420px) {
  .toolbar { top:20px; gap:3px; }
  .toolbar .tool { height:34px; }
}
/* Leave a clear gutter between the tools and the drawing/color controls. */
.toolbar { left:-48px; top:var(--paper-top); }
@media (min-width:821px) and (max-width:1099px) {
  .toolbar { left:-38px; }
}

/* Voluntary support appears between games, outside the drawing workspace. */
.support-note {
  display: none;
  margin: 24px auto 48px;
  text-align: center;
  max-width: 560px;
}
body:is([data-phase=welcome], [data-phase=summary]) .support-note {
  display: block;
}
.support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid #bccfdf;
  border-radius: 999px;
  background: #ffffffd9;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.support-link:hover { background: #edf8ff; }
.support-link:focus-visible { outline: 3px solid var(--blue-dark); outline-offset: 4px; }
.support-note p {
  margin: 8px 0 0;
  color: #506784;
  font-size: 11px;
  line-height: 1.8;
}
@media (max-width:820px) {
  .sketchbook { margin-left:20px; margin-right:-10px; }
  .toolbar { left:-38px; }
}

/* A restored game stays usable without covering the drawing surface. */
.progress-note{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 16px;margin:0 auto 16px;padding:10px 14px;max-width:820px;border-radius:12px;background:#f3fbff;color:#234967;font-size:13px;line-height:1.6}
.progress-note[hidden]{display:none}

.retire-link{display:block;margin:14px auto 0;color:#805059}
.retire-actions{display:flex;flex-direction:column;gap:12px;margin-top:16px}
.retire-actions .text-button{color:#805059;white-space:normal}
#retire-dialog .dialog-head{gap:12px}#retire-dialog .dialog-head h2{font-size:20px}
#retire-dialog .close-button{flex-shrink:0}

.ranking-mode { display:flex; gap:8px; margin:16px 0; }
.ranking-mode button { padding:8px 12px; font-size:14px; white-space:nowrap; border-radius:18px; background:#eaf5fa; color:#397098; font-weight:800; }
.ranking-mode button[aria-pressed=true] { background:#069ac9; color:#fff; }
.mode-selector .mode-detail { border:0; padding:0; }
@media(max-width:540px){
  .mode-selector .mode-detail { display:none; }
}
