:root {
  --paper: #faf7ef;
  --ink: #332b49;
  --muted: #817b8c;
  --purple: #7450d5;
  --purple-dark: #5736ad;
  --lilac: #f0eafa;
  --line: #e7e0d5;
  --yellow: #f6d884;
  --white: #fffefa;
  --shadow: 0 6px 0 #e9e2d6;
  --radius: 22px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
a {
  color: inherit;
}
button {
  transition:
    transform 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}
button:not(:disabled):active {
  transform: translateY(2px);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  letter-spacing: -0.035em;
  line-height: 1.15;
}
h1 {
  font-size: 38px;
}
h2 {
  font-size: 27px;
}
h3 {
  font-size: 19px;
}
input,
textarea,
select {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 13px 15px;
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--purple);
  outline: 3px solid #7450d51c;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--purple);
}
textarea {
  resize: vertical;
  width: 100%;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
legend {
  padding: 0;
  margin-bottom: 12px;
}
.page-shell {
  max-width: 1312px;
  margin: auto;
  padding: 0 42px;
}
.site-header {
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
}
.brand small {
  display: block;
  letter-spacing: 2.3px;
  font-size: 9px;
  margin-top: 8px;
  color: var(--muted);
}
.brand-accent {
  color: var(--purple);
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--purple);
  color: white;
  border-radius: 15px;
  font-size: 34px;
  transform: rotate(-8deg);
  box-shadow: 3px 3px 0 #d9c9f6;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pill {
  display: inline-flex;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 30px;
  font-size: 12px;
  color: #70687c;
  background: #fff9;
}
.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  font-weight: bold;
  background: transparent;
  font-size: 18px;
}
.icon-button:hover {
  background: var(--lilac);
}
.eyebrow {
  display: block;
  color: var(--purple);
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 800;
  margin-bottom: 13px;
}
.eyebrow i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  margin-right: 8px;
}
.button {
  border-radius: 12px;
  border: 1.5px solid transparent;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-weight: bold;
  white-space: nowrap;
  line-height: 1.4;
  min-height: 49px;
}
.button.primary {
  background: var(--purple);
  color: white;
  box-shadow: 0 4px 0 #503495;
}
.button.primary:hover:not(:disabled) {
  background: var(--purple-dark);
  transform: translateY(-1px);
}
.button.secondary {
  background: var(--lilac);
  border-color: #e1d7f5;
  color: var(--purple-dark);
}
.button.secondary:hover:not(:disabled) {
  background: #e5d9f8;
}
.full {
  width: 100%;
}
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  padding: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:hover {
  color: var(--purple);
}
.muted {
  color: var(--muted);
}
.small-copy {
  font-size: 12px;
  line-height: 1.65;
}
.centered {
  text-align: center;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 9px;
}
.card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.card-heading h2 {
  margin: 0;
  font-size: 22px;
}
.card-heading .eyebrow {
  margin-bottom: 9px;
}
.card-heading .eyebrow + h2 {
  font-size: 28px;
}
.count-badge {
  border-radius: 20px;
  background: var(--lilac);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: bold;
  color: var(--purple);
}
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(370px, 1fr);
  gap: 65px;
  align-items: center;
  padding: 54px 0 58px;
}
.home-hero h1 {
  font-size: clamp(48px, 5vw, 68px);
  font-weight: 900;
  line-height: 1.07;
  margin: 24px 0 30px;
  position: relative;
  letter-spacing: -3px;
}
.home-hero h1 span {
  color: var(--purple);
}
.underline {
  display: block;
  width: 340px;
  max-width: 85%;
  height: 18px;
  position: absolute;
  bottom: -17px;
  left: 0;
  stroke: var(--yellow);
  stroke-width: 6;
  fill: none;
  stroke-linecap: round;
}
.hero-copy {
  font-size: 16px;
  color: #7b7489;
  line-height: 1.7;
  margin: 0;
}
.mini-story {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 32px;
  position: relative;
  flex-wrap: wrap;
}
.story-note {
  font-size: 12px;
  font-weight: bold;
  background: white;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 2px 3px 0 #e9e2d6;
  transform: rotate(-5deg);
  max-width: 140px;
  line-height: 1.5;
}
.final-note {
  background: #fff0bd;
  transform: rotate(5deg);
}
.story-arrow {
  font-size: 29px;
  color: var(--purple);
  font-family: Georgia, serif;
}
.story-cat {
  font-size: 56px;
  position: relative;
  display: inline-block;
  transform: rotate(-10deg);
  padding: 0 3px;
}
.story-cat span {
  font-size: 25px;
  color: var(--purple);
  position: absolute;
  right: 0;
  top: -13px;
}
.home-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 11px;
  color: #888092;
}
.join-card {
  position: relative;
  padding: 30px 32px;
  background: #fffefa;
}
.join-card:before {
  content: "";
  position: absolute;
  top: -9px;
  right: 32px;
  width: 65px;
  height: 20px;
  background: #f1d58fbb;
  transform: rotate(8deg);
}
.join-card h2 {
  font-size: 27px;
  margin-bottom: 24px;
}
.join-card #nickname {
  width: 100%;
  font-size: 14px;
}
.avatar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}
.avatar-label > span:last-child {
  font-size: 11px;
  color: var(--muted);
}
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin: 3px 0 18px;
}
.avatar-option {
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 15px;
  background: transparent;
  line-height: 0;
}
.avatar-option:hover {
  background: var(--lilac);
}
.avatar-option.selected {
  border-color: var(--purple);
  background: var(--lilac);
  box-shadow: 0 2px 0 #cfbce9;
}
.avatar {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  vertical-align: middle;
  max-width: 100%;
}
.avatar.small {
  width: 39px;
  height: 39px;
}
.avatar-option .avatar {
  width: 100%;
  height: auto;
}
.form-error {
  color: #b23c50;
  font-size: 13px;
  margin-bottom: 10px;
  min-height: 0;
}
.form-error:empty {
  display: none;
}
.join-card .primary {
  justify-content: space-between;
}
.divider {
  position: relative;
  border-top: 1px solid var(--line);
  text-align: center;
  margin: 27px 0 21px;
  height: 0;
}
.divider span {
  position: relative;
  top: -12px;
  background: var(--white);
  padding: 0 12px;
  font-size: 11px;
  color: var(--muted);
}
.join-row {
  display: flex;
  gap: 9px;
}
.join-row input {
  width: 45%;
  font-size: 13px;
  letter-spacing: 2px;
  text-align: center;
}
.join-row button {
  flex: 1;
  padding: 12px;
  font-size: 13px;
}
.join-footnote {
  font-size: 11px;
  text-align: center;
  margin: 18px 0 0;
  color: #9a92a4;
}
.how-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding: 32px 0 24px;
  gap: 30px;
}
.how-strip > div {
  position: relative;
  padding-left: 45px;
}
.step-number {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--purple);
  background: var(--lilac);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  text-align: center;
  padding-top: 6px;
  font-weight: bold;
  font-size: 12px;
}
.how-strip h3 {
  font-size: 16px;
  margin: 4px 0 6px;
}
.how-strip p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 25px 0;
  margin-top: 18px;
  font-size: 10px;
  color: #a29aa8;
}
.loading {
  text-align: center;
  padding: 150px 0;
  color: var(--purple);
}
.room-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 36px 0 26px;
}
.room-bar h1 {
  font-size: 32px;
  margin: 0;
}
.room-bar .eyebrow {
  margin-bottom: 9px;
}
.room-code-box {
  display: grid;
  grid-template-columns: 1fr 36px;
  column-gap: 20px;
  align-items: center;
  border: 1.5px dashed #c9b7e4;
  border-radius: 14px;
  padding: 10px 16px;
  background: #f2ecfa;
}
.room-code-box > span {
  font-size: 8px;
  color: var(--purple);
  letter-spacing: 1.5px;
  font-weight: bold;
}
.room-code-box > strong {
  font-size: 24px;
  letter-spacing: 4px;
  grid-column: 1;
  line-height: 1.4;
}
.room-code-box > button {
  grid-column: 2;
  grid-row: 1/3;
}
.lobby-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 32px;
  align-items: start;
}
.players-card {
  padding: 23px;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #f0ece4;
  min-height: 64px;
}
.player-row:last-child {
  border: 0;
}
.player-identity {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.player-identity strong {
  font-size: 13px;
  display: block;
}
.player-identity small {
  font-weight: normal;
  font-size: 10px;
  color: var(--muted);
}
.player-identity > small {
  display: block;
}
.is-me .player-identity strong {
  color: var(--purple);
}
.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86b898;
}
.players-card .button {
  margin-top: 22px;
  font-size: 13px;
}
.players-card > p {
  margin: 14px 0 5px;
}
.kick-button {
  background: transparent;
  border: 0;
  color: #b1a5bb;
  font-size: 20px;
}
.players-card > .text-button {
  padding-left: 0;
  font-size: 11px;
}
.settings-card {
  padding: 28px;
}
.settings-card > .muted {
  font-size: 13px;
  margin-bottom: 24px;
}
.pencil-badge {
  font-size: 35px;
  background: #f9e5a8;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  transform: rotate(8deg);
  flex-shrink: 0;
}
.mode-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mode-card {
  position: relative;
  background: #fbfaf6;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 15px 13px;
  cursor: pointer;
}
.mode-card:has(input:checked) {
  background: var(--lilac);
  border-color: var(--purple);
  box-shadow: 0 2px 0 #d7c8ee;
}
.mode-card input {
  position: absolute;
  right: 9px;
  top: 12px;
  margin: 0;
  width: 13px;
  height: 13px;
}
.mode-card strong {
  display: block;
  font-size: 13px;
  margin: 7px 0 5px;
}
.mode-card small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.mode-icon {
  font-size: 22px;
  color: var(--purple);
  line-height: 1;
}
.timing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 25px 0 20px;
}
.timing-block {
  background: #fbf9f3;
  border-radius: 14px;
  padding: 16px;
}
.timing-block h3 {
  font-size: 14px;
  letter-spacing: 0;
  margin-bottom: 14px;
}
.time-input-row {
  display: flex;
  gap: 16px;
}
.time-input-row label {
  font-size: 10px;
  color: var(--muted);
  flex: 1;
}
.time-input-row label > span {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}
.time-input-row input {
  padding: 8px;
  width: 100%;
  font-size: 15px;
  border-radius: 9px;
  font-weight: bold;
  color: var(--ink);
}
.settings-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  flex-wrap: wrap;
}
.curve-label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
}
.curve-label select {
  padding: 8px;
  font-size: 11px;
}
.checkbox-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}
.checkbox-label input {
  padding: 0;
  width: 15px;
  height: 15px;
  margin: 0;
}
.schedule-box {
  margin: 23px 0;
  padding: 17px;
  background: #f6f2fa;
  border: 1px dashed #d5c9e5;
  border-radius: 14px;
}
.schedule-box > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  gap: 10px;
}
.schedule-box > div > span {
  font-size: 10px;
  color: var(--muted);
}
.schedule-preview {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.phase-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: white;
  border: 1px solid #e2d8ee;
  min-width: 48px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: bold;
  color: var(--purple);
}
.phase-chip small {
  font-size: 9px;
  color: #9c8aaa;
  font-weight: normal;
}
.phase-chip.draw-chip {
  background: #fff5d8;
  border-color: #ebdca7;
  color: #9c7c36;
}
.schedule-box p {
  margin: 12px 0 0;
  font-size: 10px;
}
.lobby-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 2px;
}
.lobby-start p {
  margin: 0;
  font-size: 11px;
  max-width: 220px;
}
.lobby-start .button {
  font-size: 13px;
}
.waiting-pill {
  font-size: 12px;
  color: var(--purple);
  background: var(--lilac);
  border-radius: 14px;
  padding: 12px 16px;
}
.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 14px;
}
.game-topbar h1 {
  font-size: 24px;
  margin: 0;
}
.game-topbar p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 0;
}
.round-timer {
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  background: var(--lilac);
  padding: 7px 20px;
  border-radius: 13px;
  color: var(--purple);
  font-weight: bold;
}
.round-timer.urgent {
  background: #fff0dc;
  color: #ba6b2b;
}
progress {
  width: 100%;
  height: 6px;
  border: 0;
  display: block;
  background: #e7e0ef;
  border-radius: 5px;
  overflow: hidden;
  appearance: none;
  margin-bottom: 22px;
}
progress::-webkit-progress-bar {
  background: #e7e0ef;
}
progress::-webkit-progress-value {
  background: var(--purple);
  border-radius: 5px;
}
progress::-moz-progress-bar {
  background: var(--purple);
}
.game-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 30px;
}
.game-sidebar {
  padding: 22px;
}
.game-sidebar h2 {
  font-size: 18px;
}
.game-sidebar .player-row {
  gap: 8px;
  padding: 8px 0;
  min-height: 55px;
}
.game-sidebar .avatar {
  width: 33px;
  height: 33px;
}
.game-sidebar .player-identity strong {
  font-size: 11px;
}
.player-ready {
  color: #b4a5c5;
  font-size: 16px;
  font-weight: bold;
}
.player-ready.ready {
  color: #5caa7a;
}
.has-left {
  opacity: 0.5;
}
.game-sidebar > p {
  margin-top: 22px;
  font-size: 10px;
}
.game-sidebar > .text-button {
  font-size: 10px;
  padding-left: 0;
}
.task-card {
  padding: 22px;
}
.task-card textarea {
  font-size: 18px;
  background: #fffefb;
  margin-top: 5px;
}
.prompt-strip {
  background: #f1ebfb;
  border: 1px solid #e0d4f4;
  border-radius: 12px;
  padding: 12px 17px;
  margin-bottom: 17px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.prompt-strip > span {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--purple);
  font-weight: bold;
  flex-shrink: 0;
}
.prompt-strip strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.writing-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 35px 0 18px;
}
.writing-illustration span:nth-child(1) {
  font-size: 42px;
  color: #d4c5ef;
  transform: rotate(-10deg);
}
.writing-illustration span:nth-child(2) {
  font-size: 80px;
  line-height: 1.4;
  background: #f9dfa2;
  border-radius: 30%;
  width: 115px;
  text-align: center;
  transform: rotate(10deg);
  color: var(--purple);
}
.writing-illustration span:nth-child(3) {
  font-size: 35px;
  color: var(--purple);
}
.writing-title {
  text-align: center;
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 15px;
}
.writing-title + p {
  font-size: 13px;
  margin-bottom: 30px;
}
.text-meta {
  display: flex;
  justify-content: space-between;
  color: #a197aa;
  font-size: 10px;
  margin-top: 7px;
}
.task-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  margin-top: 19px;
  padding-top: 18px;
}
.task-bottom > span {
  font-size: 11px;
}
.task-bottom .button {
  font-size: 13px;
  min-width: 150px;
}
.received-drawing {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 18px;
  text-align: center;
  min-height: 150px;
}
.received-drawing img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  margin: auto;
  object-fit: contain;
  border-radius: 11px;
}
.received-drawing p {
  padding: 40px;
  color: var(--muted);
}
.draw-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
  flex-wrap: wrap;
}
.tool-group {
  display: flex;
  gap: 4px;
}
.tool-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf9f3;
  width: 33px;
  height: 33px;
  font-size: 19px;
}
.tool-button.active {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
}
.tool-button:hover:not(:disabled) {
  border-color: var(--purple);
}
.drawing-workspace {
  display: flex;
  gap: 10px;
}
.palette {
  display: grid;
  grid-template-columns: repeat(2, 25px);
  gap: 6px;
  align-content: start;
  flex-shrink: 0;
}
.swatch {
  width: 25px;
  height: 25px;
  padding: 3px;
  border: 1px solid #e3dbd0;
  border-radius: 7px;
  background: white;
}
.swatch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
}
.swatch.selected {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}
.custom-color {
  grid-column: 1/3;
  border: 1px dashed #bda8d6;
  border-radius: 7px;
  position: relative;
  height: 27px;
  text-align: center;
  color: var(--purple);
  overflow: hidden;
}
.custom-color input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  cursor: pointer;
}
.canvas-frame {
  border: 1.5px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  background: white;
  align-self: flex-start;
  line-height: 0;
}
.canvas-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  touch-action: none;
  background: white;
}
.canvas-frame canvas.locked {
  cursor: default;
}
.brush-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 0 0 65px;
  flex-wrap: wrap;
}
.brush-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
}
input[type="range"] {
  accent-color: var(--purple);
  width: 90px;
  padding: 0;
  height: 15px;
  border: 0;
  background: none;
}
.brush-controls output {
  font-size: 10px;
  min-width: 25px;
  color: var(--ink);
}
.album-grid {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 30px;
}
.album-sidebar {
  padding: 23px;
}
.album-sidebar h2 {
  font-size: 20px;
}
.album-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.album-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px;
  background: transparent;
  font-size: 12px;
  text-align: left;
}
.album-tab.active {
  background: var(--lilac);
  border-color: #d9c9ed;
}
.album-tab span {
  flex: 1;
  overflow-wrap: anywhere;
}
.album-tab small {
  font-size: 11px;
  color: var(--purple);
}
.album-tab .avatar {
  width: 34px;
  height: 34px;
}
.album-card {
  padding: 25px;
}
.album-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.album-heading > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.album-heading h2 {
  font-size: 23px;
  margin: 0;
}
.album-heading .eyebrow {
  font-size: 9px;
  margin-bottom: 8px;
}
.album-cover {
  padding: 50px 20px;
  text-align: center;
  background: #f6f0fb;
  border-radius: 16px;
  margin-top: 22px;
}
.album-cover > span {
  font-size: 65px;
  color: var(--purple);
}
.album-cover h3 {
  font-size: 25px;
  margin: 15px 0;
}
.album-cover p {
  color: var(--muted);
  font-size: 13px;
}
.album-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
.album-controls .button {
  font-size: 12px;
}
.album-entry {
  margin: 23px 0;
  animation: appear 0.25s ease-out;
}
.entry-author {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  font-size: 12px;
}
.entry-author .avatar {
  width: 29px;
  height: 29px;
}
.entry-author small {
  font-size: 10px;
  color: var(--muted);
}
.entry-author > span {
  margin-left: auto;
  font-size: 10px;
  color: #b2a7bd;
}
.album-phrase {
  padding: 20px 24px;
  font-size: 21px;
  line-height: 1.5;
  background: #fff2cb;
  border-radius: 13px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.album-entry img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.empty-drawing {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 13px;
  font-size: 13px;
}
.connection {
  background: #fff0d5;
  border: 1px solid #ebcf9d;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 13px;
  margin: 20px 0;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 14px 24px;
  border-radius: 13px;
  box-shadow: 0 5px 25px #332b4933;
  z-index: 100;
  font-size: 13px;
  max-width: 90vw;
  text-align: center;
}
dialog {
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  padding: 35px;
  max-width: 560px;
  width: calc(100% - 40px);
  box-shadow: 0 20px 80px #332b4933;
}
dialog::backdrop {
  background: #332b4966;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 28px;
  margin-top: 12px;
}
dialog p {
  font-size: 14px;
  color: var(--muted);
}
dialog > .dialog-close.icon-button {
  position: absolute;
  right: 18px;
  top: 18px;
}
.rules-steps {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 20px 0;
  padding: 15px 0;
  border-block: 1px solid var(--line);
  font-size: 12px;
  color: var(--purple);
  font-weight: bold;
}
.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.button-row .button {
  font-size: 13px;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1500px) {
  .page-shell {
    max-width: 1380px;
  }
  .home-hero {
    gap: 100px;
    padding-top: 65px;
  }
  .home-hero h1 {
    font-size: 76px;
  }
  .join-card {
    padding: 35px 42px;
  }
  .avatar-picker {
    gap: 10px;
  }
  .home-facts {
    font-size: 12px;
    gap: 22px;
  }
}
@media (max-width: 1050px) {
  .page-shell {
    padding: 0 25px;
  }
  .home-hero {
    gap: 30px;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 1fr);
  }
  .home-hero h1 {
    font-size: 54px;
  }
  .join-card {
    padding: 26px;
  }
  .home-facts {
    gap: 10px;
  }
  .story-note {
    max-width: 110px;
    font-size: 10px;
  }
  .mini-story {
    gap: 5px;
  }
  .story-cat {
    font-size: 44px;
  }
  .lobby-grid {
    grid-template-columns: 230px 1fr;
    gap: 18px;
  }
  .settings-card {
    padding: 23px;
  }
  .mode-card {
    padding: 13px 10px;
  }
  .mode-card small {
    font-size: 9px;
  }
  .timing-grid {
    gap: 10px;
  }
  .time-input-row {
    gap: 8px;
  }
  .game-grid {
    grid-template-columns: 190px 1fr;
    gap: 16px;
  }
  .game-sidebar {
    padding: 16px;
  }
  .draw-toolbar {
    gap: 8px;
  }
  .tool-button {
    width: 30px;
    height: 30px;
  }
  .tool-group {
    gap: 3px;
  }
  .palette {
    grid-template-columns: repeat(2, 22px);
    gap: 5px;
  }
  .swatch {
    width: 22px;
    height: 22px;
  }
  .brush-controls {
    padding-left: 56px;
  }
  .album-grid {
    grid-template-columns: 210px 1fr;
    gap: 18px;
  }
}
@media (max-width: 760px) {
  .page-shell {
    padding: 0 18px;
  }
  .site-header {
    height: 88px;
  }
  .brand {
    font-size: 24px;
  }
  .brand-icon {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 1.5px;
  }
  .header-actions .pill {
    display: none;
  }
  .home-hero {
    grid-template-columns: 1fr;
    padding: 34px 0;
    gap: 30px;
  }
  .home-hero h1 {
    font-size: 56px;
    line-height: 1.08;
    letter-spacing: -2.5px;
    margin: 22px 0 30px;
  }
  .hero-copy {
    font-size: 15px;
  }
  .home-hero > div:first-child {
    max-width: 500px;
  }
  .mini-story {
    margin: 27px 0;
    gap: 10px;
  }
  .story-note {
    font-size: 11px;
    max-width: 125px;
  }
  .home-facts {
    font-size: 10px;
    gap: 14px;
  }
  .join-card {
    max-width: 500px;
    width: 100%;
    margin: auto;
    padding: 26px;
  }
  .join-card h2 {
    font-size: 27px;
  }
  .avatar-picker {
    gap: 9px;
  }
  .how-strip {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0;
  }
  .site-footer {
    font-size: 9px;
    gap: 15px;
  }
  .site-footer > span:last-child {
    display: none;
  }
  .room-bar {
    padding: 27px 0 20px;
    gap: 14px;
    align-items: flex-start;
  }
  .room-bar h1 {
    font-size: 25px;
  }
  .room-bar .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .room-code-box {
    padding: 8px 11px;
    gap: 6px;
  }
  .room-code-box > strong {
    font-size: 18px;
    letter-spacing: 2px;
  }
  .room-code-box > span {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .room-code-box .icon-button {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .lobby-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .players-card,
  .settings-card {
    width: 100%;
  }
  .players-card {
    padding: 20px;
  }
  .players-card .card-heading {
    margin-bottom: 8px;
  }
  #players-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 15px;
  }
  .players-card .button {
    margin-top: 12px;
  }
  .players-card > p {
    margin-bottom: 0;
  }
  .settings-card {
    padding: 22px 18px;
  }
  .card-heading .eyebrow + h2 {
    font-size: 24px;
  }
  .pencil-badge {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
  .mode-picker {
    gap: 7px;
  }
  .mode-card {
    padding: 12px 8px;
  }
  .mode-card input {
    top: 9px;
    right: 6px;
  }
  .mode-card strong {
    font-size: 11px;
  }
  .mode-card small {
    font-size: 8px;
    line-height: 1.5;
  }
  .mode-icon {
    font-size: 22px;
  }
  .timing-grid {
    margin-top: 20px;
    gap: 9px;
  }
  .timing-block {
    padding: 12px 10px;
  }
  .timing-block h3 {
    font-size: 12px;
  }
  .time-input-row {
    gap: 7px;
  }
  .time-input-row label {
    font-size: 9px;
  }
  .time-input-row input {
    font-size: 14px;
    padding: 8px 5px;
  }
  .lobby-start {
    flex-direction: column;
    align-items: stretch;
  }
  .lobby-start p {
    max-width: none;
    text-align: center;
  }
  .lobby-start .button {
    width: 100%;
  }
  .settings-bottom {
    gap: 15px;
  }
  .game-grid {
    display: flex;
    flex-direction: column-reverse;
    gap: 18px;
  }
  .task-card,
  .game-sidebar {
    width: 100%;
  }
  .task-card {
    padding: 16px;
  }
  .game-sidebar {
    padding: 18px;
  }
  .game-sidebar > p {
    margin: 10px 0 0;
  }
  .game-topbar h1 {
    font-size: 21px;
  }
  .game-topbar p {
    font-size: 10px;
  }
  .round-timer {
    font-size: 21px;
    padding: 8px 15px;
  }
  .writing-title {
    font-size: 25px;
  }
  .task-card textarea {
    font-size: 16px;
  }
  .task-bottom {
    gap: 10px;
  }
  .task-bottom > span {
    font-size: 10px;
  }
  .task-bottom .button {
    font-size: 12px;
    min-width: 135px;
    padding: 12px;
  }
  .prompt-strip {
    display: block;
    padding: 11px 13px;
  }
  .prompt-strip > span {
    display: block;
    font-size: 8px;
    margin-bottom: 5px;
  }
  .prompt-strip strong {
    font-size: 14px;
  }
  .tool-button {
    width: 29px;
    height: 31px;
    font-size: 18px;
  }
  .draw-toolbar {
    gap: 7px;
  }
  .tool-group {
    gap: 3px;
    flex-wrap: wrap;
  }
  .draw-toolbar > .tool-group:first-child {
    flex: 1;
  }
  .palette {
    grid-template-columns: repeat(2, 18px);
    gap: 4px;
  }
  .swatch {
    width: 18px;
    height: 22px;
    padding: 2px;
  }
  .drawing-workspace {
    gap: 7px;
  }
  .brush-controls {
    padding: 11px 0 0;
    gap: 9px;
  }
  .brush-controls label {
    font-size: 9px;
    gap: 4px;
  }
  .brush-controls input {
    width: 68px;
  }
  .received-drawing img {
    max-height: 300px;
  }
  .album-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .album-sidebar,
  .album-card {
    width: 100%;
    padding: 20px;
  }
  .album-tabs {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 5px;
  }
  .album-tab {
    min-width: 120px;
  }
  .album-sidebar h2 {
    margin-bottom: 14px;
  }
  .album-heading h2 {
    font-size: 21px;
  }
  .album-heading .avatar {
    width: 43px;
    height: 43px;
  }
  .album-heading > div {
    gap: 10px;
  }
  .album-phrase {
    font-size: 18px;
    padding: 16px;
  }
  .album-cover h3 {
    font-size: 23px;
  }
  .album-cover {
    padding: 30px 12px;
  }
  .album-controls {
    gap: 9px;
  }
  .room-bar > .pill {
    display: none;
  }
  dialog {
    padding: 28px;
  }
  .rules-steps {
    font-size: 10px;
  }
  .join-row input {
    width: 43%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
.swatch {
  padding: 2px;
  border: 1px solid #ded7e8;
  border-radius: 5px;
  background: white;
  line-height: 0;
}
.swatch span {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 15px;
  border-radius: 2px;
}
.swatch.selected {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}
.custom-color {
  position: relative;
  display: grid;
  place-items: center;
  grid-column: 1/3;
  background: var(--lilac);
  border-radius: 6px;
  height: 26px;
  color: var(--purple);
  font-weight: bold;
  cursor: pointer;
}
.custom-color input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  cursor: pointer;
}
.draw-hint {
  font-size: 9px;
  color: var(--muted);
}
.prompt-strip {
  padding: 13px 17px;
  background: var(--lilac);
  border-radius: 12px;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.prompt-strip > span {
  display: block;
  font-size: 8px;
  letter-spacing: 1.4px;
  font-weight: bold;
  color: var(--purple);
  margin-bottom: 4px;
}
.prompt-strip > strong {
  font-size: 16px;
}
.game-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 25px 0 17px;
}
.game-top h1 {
  font-size: 27px;
  margin: 0;
}
.game-top .eyebrow {
  font-size: 9px;
  margin-bottom: 8px;
}
.round-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}
.round-timer > span {
  font-size: 8px;
  letter-spacing: 1.2px;
  font-weight: bold;
}
.round-timer > strong {
  font-size: 28px;
  line-height: 1.3;
}
progress {
  height: 7px;
  margin: 0 0 22px;
  display: block;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #e9e1f5;
}
progress::-webkit-progress-bar {
  background: #e9e1f5;
}
progress::-webkit-progress-value {
  background: var(--purple);
  border-radius: 8px;
}
progress::-moz-progress-bar {
  background: var(--purple);
}
.player-ready {
  font-size: 20px;
  color: #b9b1c2;
}
.player-ready.ready {
  font-size: 18px;
  color: #549e75;
}
.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #79b58d;
}
.has-left {
  opacity: 0.5;
}
.is-me strong {
  color: var(--purple);
}
.player-identity > small {
  display: block;
  font-size: 9px;
  color: var(--muted);
}
.player-identity strong {
  display: block;
  font-size: 12px;
}
.player-identity strong small {
  font-size: 9px;
  font-weight: normal;
}
.album-phrase {
  background: #f6f0fb;
  border-radius: 13px;
  padding: 19px 22px;
  font-size: 20px;
  margin: 12px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.entry-author {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.entry-author .avatar {
  width: 29px;
  height: 29px;
}
.entry-author small {
  color: var(--muted);
  font-size: 10px;
}
.entry-author > span {
  margin-left: auto;
  color: #b3a8bf;
  font-size: 11px;
}
@media (max-width: 760px) {
  .game-top h1 {
    font-size: 21px;
  }
  .game-top .eyebrow {
    font-size: 8px;
  }
  .round-timer {
    min-width: 80px;
    padding: 8px 13px;
  }
  .round-timer > strong {
    font-size: 24px;
  }
  .game-grid {
    grid-template-columns: 1fr;
  }
  .game-sidebar {
    padding: 14px 17px;
  }
  .game-sidebar .card-heading {
    margin-bottom: 7px;
  }
  .game-sidebar h2 {
    font-size: 16px;
  }
  .game-sidebar #players-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
  }
  .game-sidebar .player-row {
    border: 0;
    min-width: 90px;
    gap: 6px;
    padding: 5px 0;
  }
  .game-sidebar .player-row .avatar {
    width: 28px;
    height: 28px;
  }
  .game-sidebar .player-identity strong {
    font-size: 10px;
  }
  .game-sidebar .player-identity small {
    font-size: 8px;
  }
  .game-sidebar .small-copy {
    display: none;
  }
  .game-sidebar > .text-button {
    font-size: 9px;
    padding: 5px 0 0;
  }
  .task-card {
    padding: 18px;
  }
  .task-bottom > span {
    font-size: 10px;
  }
  .task-bottom .button {
    min-width: 120px;
    padding: 12px;
  }
  .prompt-strip > strong {
    font-size: 14px;
  }
}
@media (min-width: 761px) {
  .drawing-workspace {
    justify-content: center;
  }
  .canvas-frame {
    max-width: min(100%, calc((100dvh - 515px) * 1.6129));
    flex: 1;
  }
  .brush-controls {
    padding-left: 0;
  }
  .task-card:has(#drawing-pad) {
    padding: 20px;
  }
  .task-card:has(#drawing-pad) .task-bottom {
    margin-top: 12px;
    padding-top: 12px;
  }
}
