@layer reset, base, layout, components, responsive;
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  body,
  h1,
  h2,
  h3,
  p,
  fieldset {
    margin: 0;
  }
  button,
  input,
  textarea {
    font: inherit;
  }
  button {
    cursor: pointer;
  }
  button,
  a,
  input,
  textarea {
    -webkit-tap-highlight-color: transparent;
  }
  button {
    color: inherit;
  }
  button:disabled {
    cursor: not-allowed;
  }
  fieldset {
    border: 0;
    padding: 0;
    min-width: 0;
  }
  svg {
    display: block;
  }
  textarea {
    resize: none;
  }
  button {
    touch-action: manipulation;
  }
  [hidden] {
    display: none !important;
  }
}
@layer base {
  :root {
    color-scheme: light;
    --bg: #f5f3ed;
    --ink: #233c35;
    --muted: #6c756f;
    --line: #dedfd5;
    --green: #285644;
    --orange: #c14f30;
    --font: Arial, Helvetica, sans-serif;
  }
  body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
  }
  button {
    border: 0;
    background: none;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  textarea:focus-visible {
    outline: 3px solid #d77c43;
    outline-offset: 4px;
  }
  button:disabled {
    opacity: 0.4;
  }
  ::selection {
    background: #d2e4c6;
    color: #233c35;
  }
  .icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
  }
  .icon-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
  }
  .sr-only {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
  }
  .eyebrow,
  .step-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.9px;
    line-height: 1.5;
  }
  .eyebrow {
    color: var(--muted);
  }
  .step-label {
    color: #7b8173;
    margin-bottom: 17px;
  }
  h1,
  h2 {
    font-weight: 500;
    line-height: 1.1;
  }
  h1 {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: -1.8px;
    font-size: clamp(36px, 4.6vw, 57px);
  }
  h2 {
    font-size: 22px;
    letter-spacing: -0.55px;
  }
}
@layer layout {
  .site-header,
  main {
    max-width: 1140px;
    margin: 0 auto;
  }
  .site-header {
    height: 91px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
  }
  main {
    padding-top: 43px;
  }
  .intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 43px;
  }
  .intro h1 {
    margin: 12px 0 15px;
  }
  .intro .eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .intro .eyebrow > span {
    background: var(--orange);
    width: 6px;
    height: 6px;
    border-radius: 50%;
  }
  .intro-copy {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
  }
  .workspace {
    display: grid;
    grid-template-columns: 257px minmax(0, 1fr);
    gap: 58px;
    align-items: start;
  }
  .controls {
    padding-top: 5px;
  }
  .tool-section {
    border-bottom: 1px solid var(--line);
    padding-bottom: 25px;
    margin-bottom: 24px;
  }
  .start-section > p:not(.step-label) {
    color: var(--muted);
    margin: 11px 0 19px;
    max-width: 240px;
    line-height: 1.65;
  }
  .finish-section {
    padding-bottom: 19px;
    margin-bottom: 17px;
  }
  .canvas-section {
    min-width: 0;
  }
  .canvas-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
  }
  .paper-wrap {
    background: #e5e9df;
    border: 1px solid #dde1d5;
    border-radius: 12px;
    padding: 28px 43px 32px;
    overflow: hidden;
    position: relative;
  }
  .paper-wrap {
    display: flex;
    justify-content: center;
  }
  .card {
    width: 100%;
    max-width: 540px;
    flex-shrink: 0;
  }
  .paper-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.25;
    background-image: radial-gradient(#829178 0.65px, transparent 0.65px);
    background-size: 8px 8px;
  }
  .card {
    position: relative;
    padding: 25px 26px 15px;
    background: var(--paper);
    color: var(--card-ink);
    box-shadow:
      0 10px 26px #233c3510,
      0 1px 4px #233c3515;
    transform: rotate(-0.45deg);
    transition:
      background 0.2s,
      color 0.2s;
  }
  .canvas-help {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: var(--muted);
    margin-top: 12px;
    gap: 15px;
  }
  .export-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 0 25px;
    border-top: 1px solid var(--line);
    margin-top: 31px;
  }
  .export-bar strong {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.3px;
  }
  .export-bar p {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
  }
  .export-actions {
    display: flex;
    gap: 10px;
  }
  .site-footer {
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 22px 0 32px;
    font-size: 11px;
    color: #737c73;
  }
}
@layer components {
  .brand {
    display: flex;
    align-items: center;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.75px;
  }
  .brand-mark {
    background: var(--ink);
    color: var(--bg);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    margin-right: 10px;
  }
  .brand-mark .icon {
    width: 19px;
    height: 19px;
    fill: currentColor;
    stroke: none;
  }
  .brand-light {
    font-weight: 400;
  }
  .brand-dot {
    color: var(--orange);
    font-size: 28px;
    line-height: 1;
  }
  .header-note {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.3px;
  }
  .intro-stamp {
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border: 1px solid #b9c5b4;
    border-radius: 50%;
    outline: 1px solid #d6ddce;
    outline-offset: 5px;
    transform: rotate(10deg);
    background: #edf0e5;
  }
  .intro-stamp span {
    font-size: 8px;
    letter-spacing: 2px;
  }
  .intro-stamp strong {
    font-family: Georgia, serif;
    font-size: 21px;
    font-style: italic;
    font-weight: 500;
    margin: 6px 0;
  }
  .button {
    min-height: 44px;
    padding: 11px 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    transition:
      background 0.15s,
      transform 0.15s,
      box-shadow 0.15s;
    white-space: nowrap;
  }
  .button:not(:disabled):active,
  .icon-button:not(:disabled):active {
    transform: translateY(1px);
  }
  .button:not(:disabled):hover {
    box-shadow: 0 2px 5px #233c3510;
  }
  .paste-button {
    border: 1px solid #bccab8;
    background: #edf1e5;
    width: 100%;
    justify-content: flex-start;
    font-size: 13px;
    padding-left: 13px;
  }
  .paste-button:hover {
    background: #e1e9d9;
  }
  .paste-button .arrow {
    margin-left: auto;
    width: 16px;
  }
  .primary {
    background: var(--orange);
    color: #fff;
  }
  .primary:not(:disabled):hover {
    background: #a94228;
  }
  .subtle {
    background: #edece5;
    border: 1px solid #d8dbd0;
  }
  .subtle:not(:disabled):hover {
    background: #e3e6da;
  }
  .text-button {
    padding: 10px 0;
    font-size: 11px;
    color: var(--green);
    text-decoration: underline;
    text-decoration-color: #8b9e8370;
    text-underline-offset: 3px;
    min-height: 40px;
  }
  .text-button:hover {
    color: var(--orange);
  }
  .start-section .text-button {
    margin-top: 2px;
  }
  .icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 7px;
  }
  .icon-button:not(:disabled):hover {
    background: #e3e6da;
  }
  .muted {
    color: var(--muted);
  }
  legend {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
  }
  legend > span {
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
  }
  .segmented {
    display: flex;
    background: #e9ebe2;
    border-radius: 7px;
    padding: 4px;
    gap: 4px;
  }
  .segmented button {
    flex: 1;
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 5px;
    font-size: 12px;
    color: var(--muted);
  }
  .segmented button[aria-pressed="true"] {
    background: #fffdf8;
    box-shadow: 0 1px 4px #243c3514;
    color: var(--ink);
    font-weight: 700;
  }
  .palette-field {
    margin-top: 22px;
  }
  .palette-options {
    display: flex;
    gap: 13px;
  }
  .palette {
    padding: 4px;
    border: 1px solid transparent;
    border-radius: 50%;
    width: 46px;
    height: 46px;
  }
  .palette[aria-pressed="true"] {
    border-color: var(--ink);
  }
  .palette > span {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
  }
  .palette .icon {
    width: 17px;
    height: 17px;
    visibility: hidden;
  }
  .palette[aria-pressed="true"] .icon {
    visibility: visible;
  }
  .forest > span {
    background: #285644;
    color: #f8f5ee;
  }
  .ocean > span {
    background: #6392ab;
    color: white;
  }
  .berry > span {
    background: #b26c7f;
    color: white;
  }
  .toggle-row {
    display: flex;
    align-items: center;
    position: relative;
    justify-content: space-between;
    gap: 12px;
    margin-top: 21px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    min-height: 44px;
  }
  .toggle-row small {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: var(--muted);
    margin-top: 3px;
  }
  .toggle-row input {
    position: absolute;
    right: 0;
    width: 38px;
    height: 30px;
    opacity: 0;
    cursor: pointer;
  }
  .switch {
    display: block;
    background: #c9cec2;
    border-radius: 18px;
    width: 34px;
    height: 20px;
    flex-shrink: 0;
    pointer-events: none;
    transition: background 0.2s;
  }
  .switch::after {
    content: "";
    display: block;
    background: #fffdf8;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px #0002;
  }
  .toggle-row input:checked + .switch {
    background: var(--green);
  }
  .toggle-row input:checked + .switch::after {
    transform: translateX(14px);
  }
  .toggle-row input:focus-visible + .switch {
    outline: 3px solid #d77c43;
    outline-offset: 4px;
  }
  .toggle-row:has(input:disabled) {
    cursor: default;
    opacity: 0.6;
  }
  .mix-actions {
    display: flex;
    gap: 8px;
  }
  .mix-actions > .button {
    flex: 1;
  }
  .mix-actions > .icon-button {
    background: #edece5;
    border: 1px solid #d8dbd0;
  }
  .small-note {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.6;
    margin-top: 9px;
  }
  .local-note {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    color: var(--muted);
  }
  .saved-dot {
    width: 5px;
    height: 5px;
    background: #809c69;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .live-badge {
    font-size: 8px;
    letter-spacing: 0.9px;
    background: #e6ebde;
    border-radius: 4px;
    padding: 4px 6px;
    margin-left: 8px;
    color: #52684b;
  }
  .completion {
    font-size: 10px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .progress-track {
    width: 52px;
    height: 3px;
    background: #dde1d5;
    border-radius: 3px;
    overflow: hidden;
  }
  .progress-track > span {
    display: block;
    height: 100%;
    background: var(--green);
    transition: width 0.15s;
    width: 0;
  }
  .theme-ink {
    --paper: #f8f5ee;
    --card-ink: #243b36;
    --card-line: #819087;
    --free: #c3dbc8;
  }
  .theme-sea {
    --paper: #f1f7fa;
    --card-ink: #173c58;
    --card-line: #7c9aa8;
    --free: #c3e1ed;
  }
  .theme-rose {
    --paper: #fcf3f1;
    --card-ink: #672c40;
    --card-line: #ac8291;
    --free: #edc9cc;
  }
  .card-rule {
    border-top: 1px solid var(--card-ink);
  }
  .card-kicker {
    text-align: center;
    font-size: 8px;
    letter-spacing: 5px;
    padding: 12px 0 5px;
    opacity: 0.7;
  }
  .card #card-title {
    display: block;
    background: transparent;
    color: var(--card-ink);
    border: 0;
    width: 100%;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    line-height: 1.15;
    height: 73px;
    padding: 10px 5px 13px;
    overflow: hidden;
    text-wrap: balance;
    border-radius: 5px;
    margin-bottom: 12px;
  }
  .card #card-title::placeholder {
    font-family: Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 24px;
    color: var(--card-ink);
    opacity: 0.35;
  }
  .card #card-title:hover {
    background: #7e967609;
  }
  .card #card-title:focus {
    background: #7e96760d;
    outline-offset: 0;
  }
  .bingo-grid {
    display: grid;
    grid-template-columns: repeat(var(--size, 5), minmax(0, 1fr));
    grid-template-rows: repeat(var(--size, 5), minmax(0, 1fr));
    aspect-ratio: 1;
    border: 1.4px solid var(--card-ink);
    border-radius: 5px;
    overflow: hidden;
  }
  .size-3 {
    --size: 3;
  }
  .size-4 {
    --size: 4;
  }
  .size-5 {
    --size: 5;
  }
  .cell {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    border-right: 1px solid var(--card-line);
    border-bottom: 1px solid var(--card-line);
    background: var(--paper);
  }
  .cell:last-child {
    border-bottom: 0;
  }
  .size-5 .cell:nth-child(5n),
  .size-4 .cell:nth-child(4n),
  .size-3 .cell:nth-child(3n) {
    border-right: 0;
  }
  .size-5 .cell:nth-child(n + 21),
  .size-4 .cell:nth-child(n + 13),
  .size-3 .cell:nth-child(n + 7) {
    border-bottom: 0;
  }
  .cell textarea {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    border: 0;
    background: transparent;
    outline: none;
    color: var(--card-ink);
    font-size: 16px;
    line-height: 1.2;
    font-weight: 600;
    padding: 10px 5px;
    word-break: normal;
    overflow-wrap: anywhere;
    overflow: hidden;
    z-index: 1;
    border-radius: 0;
  }
  .cell textarea::placeholder {
    font-weight: 400;
    color: var(--card-ink);
    opacity: 0.2;
    font-size: 21px;
  }
  .cell:first-child textarea::placeholder {
    font-size: 12px;
  }
  .cell:focus-within {
    box-shadow: inset 0 0 0 2px #c87040;
    background: color-mix(in srgb, var(--paper), white 30%);
    z-index: 2;
  }
  .cell:has(textarea:not(:placeholder-shown)) {
    background: color-mix(in srgb, var(--paper), white 25%);
  }
  .cell:not(.free):hover {
    background: color-mix(in srgb, var(--paper), white 65%);
  }
  .cell textarea:focus-visible {
    outline: 0;
  }
  .cell textarea:focus::placeholder {
    color: transparent;
  }
  .cell-number {
    position: absolute;
    top: 4px;
    left: 5px;
    font-size: 7px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
  }
  .cell:hover .cell-number,
  .cell:focus-within .cell-number {
    opacity: 0.5;
  }
  .cell.free {
    align-items: center;
    text-align: center;
    justify-content: center;
    background: var(--free);
    margin: 4px;
    border-radius: 3px;
    border: 0;
    outline: 4px solid var(--paper);
    z-index: 1;
  }
  .free-inner {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 700;
  }
  .free-inner span {
    display: block;
    font-family: Georgia, serif;
    font-size: 25px;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: 0;
    font-weight: 400;
  }
  .card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 6px;
    letter-spacing: 1.6px;
    margin-top: 16px;
    opacity: 0.65;
  }
  .card-bottom-line {
    width: 45px;
    border-top: 1px solid var(--card-ink);
  }
  .keycap {
    display: inline-block;
    border: 1px solid #d3d8cc;
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 8px;
  }
  .help-divider {
    padding: 0 4px;
  }
  .print-button {
    border: 1px solid #cccfbf;
    min-width: 122px;
    background: transparent;
  }
  .export-actions .primary {
    min-width: 160px;
  }
  .export-bar .button {
    min-height: 47px;
  }
  .toast {
    position: fixed;
    left: 50%;
    bottom: 25px;
    transform: translateX(-50%);
    background: var(--ink);
    color: #fffef6;
    box-shadow: 0 5px 20px #0002;
    border-radius: 9px;
    padding: 13px 19px;
    font-size: 13px;
    z-index: 20;
    max-width: calc(100vw - 32px);
    width: max-content;
  }
  .toast button {
    color: #d7ecbd;
    font-weight: 700;
    text-decoration: underline;
    margin-left: 14px;
    padding: 4px;
    font-size: inherit;
  }
  dialog {
    border: 1px solid #cbd1c2;
    border-radius: 14px;
    box-shadow: 0 30px 100px #233c3535;
    max-width: min(540px, calc(100vw - 30px));
    width: 540px;
    background: #faf9f3;
    color: var(--ink);
    padding: 27px;
  }
  dialog::backdrop {
    background: #233c3570;
    backdrop-filter: blur(3px);
  }
  .dialog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .dialog-heading h2 {
    font-family: Georgia, serif;
    font-size: 32px;
    margin-top: 6px;
  }
  .dialog-heading .eyebrow {
    font-size: 9px;
  }
  .dialog-heading > .icon-button {
    align-self: flex-start;
    margin-top: -8px;
    margin-right: -10px;
  }
  .dialog-copy {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.65;
    margin: 15px 0 20px;
  }
  #paste-text,
  #cell-input {
    font-size: 16px;
    line-height: 1.7;
    width: 100%;
    padding: 15px;
    border: 1px solid #cbd1c2;
    border-radius: 7px;
    background: #fffef9;
    color: var(--ink);
    min-height: 210px;
    resize: vertical;
  }
  #cell-input {
    margin-top: 20px;
    min-height: 150px;
  }
  .cell-navigation {
    gap: 7px;
  }
  .cell-navigation .button {
    padding-left: 12px;
    padding-right: 12px;
  }
  #paste-text::placeholder {
    color: #a1a69c;
  }
  .paste-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    gap: 15px;
  }
  .dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
  }
  .error-message {
    color: #a43f27;
    font-size: 12px;
    margin-top: 12px;
  }
  .noscript {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 20px;
    background: #fff0b7;
  }
  #print-target {
    display: none;
  }
}
@layer responsive {
  @media (min-width: 1500px) {
    .site-header,
    main {
      max-width: 1180px;
    }
    .workspace {
      grid-template-columns: 270px minmax(0, 1fr);
      gap: 70px;
    }
    .paper-wrap {
      padding-left: 65px;
      padding-right: 65px;
    }
  }
  @media (max-width: 1220px) {
    .site-header,
    main {
      margin-left: 40px;
      margin-right: 40px;
    }
    .workspace {
      gap: 35px;
      grid-template-columns: 230px minmax(0, 1fr);
    }
    .paper-wrap {
      padding: 24px 27px 27px;
    }
    .card {
      padding: 23px 22px 14px;
    }
  }
  @media (max-width: 950px) {
    .site-header,
    main {
      margin-left: 26px;
      margin-right: 26px;
    }
    .workspace {
      gap: 25px;
      grid-template-columns: 215px minmax(0, 1fr);
    }
    .paper-wrap {
      padding: 19px 18px 23px;
    }
    .card {
      padding: 19px 17px 13px;
    }
    .card #card-title {
      font-size: 23px;
      height: 66px;
      margin-bottom: 8px;
    }
    .card #card-title::placeholder {
      font-size: 21px;
    }
    .intro-stamp {
      width: 98px;
      height: 98px;
      margin-right: 10px;
    }
    .intro-stamp strong {
      font-size: 18px;
    }
    .cell:first-child textarea::placeholder {
      font-size: 10px;
    }
    .canvas-help > span {
      font-size: 9px;
    }
    .help-divider {
      padding: 0 2px;
    }
  }
  @media (max-width: 740px) {
    .site-header,
    main {
      margin-left: 20px;
      margin-right: 20px;
    }
    .site-header {
      height: 73px;
    }
    .brand {
      font-size: 20px;
    }
    .header-note {
      font-size: 10px;
    }
    main {
      padding-top: 28px;
    }
    .intro {
      margin-bottom: 25px;
    }
    .intro h1 {
      font-size: 38px;
      letter-spacing: -1.4px;
      margin: 10px 0 11px;
    }
    .intro-copy {
      font-size: 12px;
    }
    .intro-stamp {
      display: none;
    }
    .intro .eyebrow {
      font-size: 8px;
    }
    .workspace {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }
    .controls {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0 23px;
      width: 100%;
      padding: 0;
    }
    .tool-section {
      border: 0;
      padding: 0;
      margin: 0;
    }
    .start-section {
      grid-column: 1/-1;
      margin-bottom: 19px;
      padding-bottom: 18px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .start-section .step-label,
    .start-section h2,
    .start-section > p:not(.step-label) {
      display: none;
    }
    .start-section .paste-button {
      width: auto;
      flex: 1;
      max-width: 240px;
    }
    .start-section .text-button {
      margin: 0;
      min-height: 44px;
    }
    .tool-section .step-label {
      display: none;
    }
    .controls > .tool-section:nth-child(2) {
      display: contents;
    }
    .controls legend {
      margin-bottom: 8px;
    }
    .controls .segmented button {
      white-space: nowrap;
      padding: 7px 3px;
      font-size: 11px;
    }
    .palette-field {
      margin: 0;
      grid-column: 2;
      grid-row: 2;
    }
    .palette-field legend {
      margin-bottom: 6px;
    }
    .palette-options {
      gap: 8px;
    }
    .palette {
      width: 43px;
      height: 43px;
      padding: 3px;
    }
    .palette > span {
      width: 35px;
      height: 35px;
    }
    .toggle-row {
      grid-column: 1;
      grid-row: 3;
      margin-top: 12px;
      min-height: 44px;
      font-size: 11px;
    }
    .finish-section {
      grid-column: 2;
      grid-row: 3;
      align-self: center;
      margin-top: 12px;
      transform: none;
      z-index: 1;
    }
    .finish-section .small-note {
      display: none;
    }
    .mix-actions > .button {
      font-size: 11px;
      padding-left: 9px;
      padding-right: 9px;
    }
    .mix-actions {
      gap: 7px;
    }
    .local-note {
      grid-column: 1/-1;
      margin-top: 17px;
      font-size: 10px;
    }
    .controls {
      padding-bottom: 1px;
    }
    .canvas-section {
      width: 100%;
      margin-top: 0;
    }
    .canvas-bar {
      margin-bottom: 10px;
    }
    .paper-wrap {
      padding: 23px 26px 28px;
    }
    .card {
      padding: 23px 22px 15px;
    }
    .card #card-title {
      font-size: 26px;
      height: 73px;
      margin-bottom: 12px;
    }
    .card #card-title::placeholder {
      font-size: 23px;
    }
    .canvas-help > span {
      font-size: 9px;
    }
    .export-bar {
      margin-top: 22px;
      flex-direction: column;
      align-items: stretch;
      gap: 15px;
      padding: 21px 0 23px;
    }
    .export-bar > div:first-child {
      text-align: center;
    }
    .export-bar strong {
      font-size: 17px;
    }
    .export-actions {
      width: 100%;
    }
    .export-actions > .button {
      flex: 1;
      min-width: 0;
    }
    .site-footer {
      font-size: 10px;
      gap: 12px;
      flex-wrap: wrap;
      padding: 18px 0 24px;
    }
    .cell textarea {
      font-size: 16px;
    }
    .cell:first-child textarea::placeholder {
      font-size: 10px;
    }
  }
  @media (max-width: 390px) {
    .site-header,
    main {
      margin-left: 14px;
      margin-right: 14px;
    }
    .header-note {
      font-size: 9px;
    }
    .paper-wrap {
      padding: 18px 15px 23px;
    }
    .card {
      padding: 20px 16px 14px;
    }
    .card #card-title::placeholder {
      font-size: 20px;
    }
    .intro h1 {
      font-size: 34px;
    }
    .start-section {
      gap: 8px;
    }
    .start-section .text-button {
      font-size: 10px;
    }
    .controls > .tool-section:nth-child(2) {
      gap: 12px 16px;
    }
    .controls {
      gap: 0 16px;
    }
    .palette-options {
      gap: 7px;
    }
    .site-footer {
      font-size: 9px;
    }
    .canvas-help {
      gap: 7px;
    }
    .canvas-help .keycap {
      font-size: 7px;
    }
    .canvas-help > span {
      font-size: 8px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      transition: none !important;
      scroll-behavior: auto !important;
    }
  }
}
@media print {
  @page {
    size: auto;
    margin: 10mm;
  }
  body {
    background: white;
    margin: 0 !important;
    padding: 0 !important;
  }
  .site-header,
  main,
  dialog,
  .toast,
  .icon-defs {
    display: none !important;
  }
  #print-target {
    display: block !important;
    width: 100%;
    height: auto;
  }
  #print-target img,
  #print-target > svg {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 250mm;
    margin: 0 auto;
    break-inside: avoid;
    object-fit: contain;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
