:root {
  font-family: Tahoma, "MS Sans Serif", Verdana, sans-serif;
  font-synthesis: none;
  color: #161616;
  background: #faf9f6 url("assets/paper.png") repeat fixed;
  background-size: 768px auto;
  --panel: #c6c6c6;
  --navy: #343434;
  --raised: inset 1px 1px #fff, inset -1px -1px #202020, inset 2px 2px #dedede, inset -2px -2px #808080;
  --sunken: inset 1px 1px #808080, inset -1px -1px #fff, inset 2px 2px #202020, inset -2px -2px #dedede;
  cursor: url("assets/cursor-arrow.png") 2 2, default;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, a, select, input[type="range"], input[type="color"] { cursor: url("assets/cursor-hand.png") 13 3, pointer; }
button {
  border: 0; border-radius: 0; background: var(--panel); box-shadow: var(--raised);
  font-size: 12px; min-height: 34px; padding: 9px 16px;
  transition: background-color .12s;
}
button:hover:enabled { background-color: #d5d5d5; }
button:active:enabled, button[aria-pressed="true"] { box-shadow: var(--sunken); background-color: #dadada; }
button:disabled { color: #777; text-shadow: 1px 1px #fff; cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 1px dotted #000; outline-offset: -6px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #343434; outline-offset: 2px; }
[hidden] { display: none !important; }
main { min-height: 100svh; display: flow-root; position: relative; z-index: 1; }
.art-waterfall { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.waterfall-card { position: absolute; top: -220px; left: var(--art-x); width: 148px; height: 148px; margin-left: -74px; object-fit: contain; background: white; padding: 4px; border: 1px solid #404040; box-shadow: 3px 3px #0002; opacity: .85; visibility: hidden; animation: art-fall var(--art-duration) linear infinite; animation-delay: var(--art-delay); }
.waterfall-card[data-loaded="true"] { visibility: visible; }
.art-waterfall.is-paused .waterfall-card { animation-play-state: paused; }
.art-waterfall.is-static .waterfall-card { animation: none; top: calc(var(--art-row) * 205px + 20px); transform: rotate(var(--art-angle)); }
.waterfall-toggle { position: fixed; right: 14px; bottom: 14px; z-index: 2; font-size: 11px; min-height: 30px; }
@keyframes art-fall { from { transform: translateY(0) rotate(var(--art-angle)); } to { transform: translateY(calc(100svh + 440px)) rotate(var(--art-angle)); } }
#prompt-category { display: block; margin: 0 0 22px; min-width: 190px; }
#draw-category { min-width: 190px; }
#drawing-category { margin: 6px 0 0; }
.screen { animation: arrive .16s ease-out; }
.home { min-height: 100svh; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.home-core { width: 456px; max-width: 100%; padding: 4px; background: #fff; box-shadow: var(--raised), 4px 4px 0 #0002; }
.page-header, dialog h2 { color: #fff; background: linear-gradient(90deg, #343434, #707070); }
.home-logo { position: relative; display: block; aspect-ratio: 3.6; overflow: hidden; margin: 24px 24px 0; padding: 0; line-height: 0; }
.home-logo img { display: block; position: absolute; width: 114%; max-width: none; height: auto; left: -7%; top: 50%; transform: translateY(-52%); }
.page-header span::before { content: ""; display: inline-block; width: 18px; height: 18px; flex-shrink: 0; background: url("assets/app.svg") center / contain no-repeat; image-rendering: pixelated; }
.home-actions { display: grid; gap: 13px; padding: 22px 32px 33px; }
.home-actions .button { display: flex; align-items: center; gap: 20px; text-align: left; min-height: 65px; padding: 13px 22px; font-size: 16px; font-weight: normal; }
.home-actions .button::before { content: ""; display: block; width: 32px; height: 32px; background: center / contain no-repeat; flex-shrink: 0; image-rendering: pixelated; }
.home-actions [data-go="create"]::before { background-image: url("assets/main-paper.png"); image-rendering: auto; }
.home-actions [data-go="draw"]::before { background-image: url("assets/main-pencil.png"); image-rendering: auto; }
.home-actions [data-go="gallery"]::before { background-image: url("assets/gallery.svg"); }
.button { min-height: 39px; padding: 11px 24px; font-size: 13px; }
.notifications { display: grid; gap: 16px; width: 456px; max-width: 100%; }
.notifications:empty { display: none; }
.notifications:not(:empty) { margin-top: 22px; }
.notification { background: #fff; padding: 17px; box-shadow: var(--raised); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.notification p { margin: 0; flex: 1; min-width: 150px; line-height: 1.5; }
.notification img { width: 72px; height: 72px; background: #fff; object-fit: contain; padding: 2px; box-shadow: var(--sunken); }
.page { width: calc(100% - 64px); max-width: 1100px; margin: 40px auto; padding: 4px 24px 26px; background: #fff; box-shadow: var(--raised), 4px 4px 0 #0002; }
.page-header { margin: 0 -20px 30px; padding: 4px 5px 4px 8px; min-height: 31px; display: flex; gap: 14px; justify-content: space-between; align-items: center; }
.page-header span { display: flex; align-items: center; gap: 7px; order: -1; font-size: 12px; font-weight: bold; }
.back { color: #111; min-height: 24px; padding: 4px 10px; font-size: 11px; }
.narrow { max-width: 580px; margin: 0 auto; }
.eyebrow { font-size: 10px; font-weight: normal; letter-spacing: 1px; color: #444; margin: 0 0 10px; }
h2 { font-size: 27px; line-height: 1.25; letter-spacing: -.8px; margin: 0 0 24px; font-weight: bold; }
h3 { font-size: 11px; letter-spacing: 0; margin: 0 0 12px; }
label { display: block; font-size: 12px; margin: 0 0 10px; }
textarea { display: block; resize: vertical; width: 100%; min-height: 174px; border: 0; border-radius: 0; box-shadow: var(--sunken); padding: 14px; line-height: 1.65; font-size: 14px; background: #fff; cursor: text; }
textarea::placeholder { color: #777; }
.field-meta { display: flex; justify-content: space-between; font-size: 11px; margin-top: 9px; color: #444; }
.small { font-size: 11px; line-height: 1.6; color: #444; }
.identity-note { max-width: 620px; font-size: 11px; line-height: 1.65; color: #444; margin: 28px 0 0; border-top: 1px solid #858585; box-shadow: inset 0 1px #eee; padding-top: 15px; }
.status { font-size: 13px; line-height: 1.65; white-space: pre-line; margin: 18px 0; }
.status:empty, .connection-note:empty { display: none; }
.connection-note { font-size: 12px; line-height: 1.6; background: #ffffe1; padding: 13px 16px; margin-bottom: 22px; border: 1px solid #808080; }
.connection-note a { color: #000080; }
.draft-note { margin-top: 28px; border-top: 1px solid #888; font-size: 12px; line-height: 1.6; padding-top: 12px; }
.text-button { font-size: 11px; padding: 8px 13px; min-height: 30px; }
.gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.filters { display: flex; align-items: end; margin: 0 0 23px; gap: 3px; padding: 0 0 4px; border-bottom: 1px solid #808080; box-shadow: 0 1px #fff; }
.filters button { min-width: 85px; font-size: 12px; padding: 9px 16px; }
.filters [aria-pressed="true"] { background: #e1e1e1; font-weight: bold; }
.gallery-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.art-card { background: #fff; padding: 3px; box-shadow: var(--sunken); display: flex; flex-direction: column; overflow: hidden; }
.art-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-bottom: 1px solid #bbb; }
.card-copy { padding: 14px; }
.art-card p { margin: 0 0 12px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.art-card .small { font-size: 11px; margin: 12px 0 0; }
.pending-card { min-height: 180px; background: #fff; }
.card-tag { display: block; background: #808080; color: #fff; font-size: 10px; letter-spacing: .4px; padding: 5px 7px; margin: -11px -11px 14px; }
.studio-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 20px; }
.studio-heading h2 { font-size: 19px; letter-spacing: -.4px; max-width: 720px; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.studio-heading .eyebrow { margin-bottom: 5px; }
.studio-heading > .small { max-width: 190px; margin: 0; }
.studio-layout { display: grid; grid-template-columns: 136px minmax(0,1fr) 180px; gap: 18px; align-items: start; }
.toolbox, .palette, .layers-panel { padding: 10px; background: #fff; box-shadow: var(--raised); }
.toolbox h3, .palette h3, .layers-panel h3 { color: #fff; background: #808080; padding: 5px 6px; margin: -6px -6px 11px; font-weight: bold; }
.tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px; margin-bottom: 19px; }
.tools button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px; min-height: 59px; font-size: 10px; }
.tools button::before { content: ""; display: block; width: 25px; height: 25px; background: center / contain no-repeat; image-rendering: pixelated; }
.tools [data-tool="brush"]::before { background-image: url("assets/pencil.svg"); }
.tools [data-tool="eraser"]::before { background-image: url("assets/eraser.svg"); }
.tools [data-tool="fill"]::before { background-image: url("assets/bucket.svg"); }
.tools [data-tool="line"]::before { background-image: url("assets/line.svg"); }
.tools [data-tool="rectangle"]::before { background-image: url("assets/rectangle.svg"); }
.tools [data-tool="ellipse"]::before { background-image: url("assets/ellipse.svg"); }
.toolbox label { display: flex; justify-content: space-between; font-size: 10px; margin: 14px 0 7px; }
.toolbox output { font-weight: normal; }
input[type="range"] { appearance: none; width: 100%; margin: 6px 0; height: 4px; border: 1px solid; border-color: #808080 #fff #fff #808080; background: #777; border-radius: 0; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 21px; background: var(--panel); box-shadow: var(--raised); border: 0; border-radius: 0; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 21px; background: var(--panel); box-shadow: var(--raised); border: 0; border-radius: 0; }
.canvas-frame { background: #fff; box-shadow: var(--sunken); padding: 3px; line-height: 0; }
canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; touch-action: none; cursor: url("assets/cursor-crosshair.png") 15 15, crosshair; }
#canvas[data-tool="brush"] { cursor: url("assets/pencil.png") 3 29, crosshair; }
#canvas[data-tool="eraser"] { cursor: url("assets/eraser.png") 3 23, crosshair; }
#canvas[data-tool="fill"] { cursor: url("assets/bucket.png") 8 29, crosshair; }
.canvas-column > .small { margin: 10px 0 0; padding: 5px 8px; box-shadow: inset 1px 1px #888, inset -1px -1px #eee; min-height: 27px; }
.swatches { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; padding: 2px; }
.swatch { position: relative; width: 100%; height: auto; min-height: 0; aspect-ratio: 1; border: 2px solid; border-color: #808080 #fff #fff #808080; box-shadow: inset 1px 1px #222; padding: 0; }
.swatch:hover:enabled, .swatch[aria-pressed="true"] { background-color: revert; }
.swatch[aria-pressed="true"] { outline: 1px solid #000; outline-offset: 2px; box-shadow: inset 1px 1px #222; }
.swatch[aria-pressed="true"]::after { content: ""; position: absolute; inset: 7px; border: 1px solid #fff; box-shadow: 0 0 0 1px #111; }
.custom-label { font-size: 9px; margin: 18px 0 7px; }
input[type="color"] { display: block; width: 100%; height: 31px; padding: 4px; border: 0; border-radius: 0; background: var(--panel); box-shadow: var(--raised); }
.studio-footer { margin: 17px 198px 0 154px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.edit-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.edit-actions button { font-size: 10px; padding: 8px 9px; min-height: 34px; display: flex; gap: 5px; align-items: center; }
.edit-actions button::before, #finish::before, #submit-prompt::before { content: ""; display: inline-block; width: 18px; height: 18px; background: center / contain no-repeat; image-rendering: pixelated; vertical-align: middle; }
#undo::before { background-image: url("assets/undo.svg"); }
#redo::before { background-image: url("assets/redo.svg"); }
#clear::before { background-image: url("assets/clear.svg"); }
#download-canvas::before { background-image: url("assets/save.svg"); }
#finish::before { background-image: url("assets/check.svg"); margin-right: 8px; }
#submit-prompt::before { background-image: url("assets/document.svg"); margin-right: 8px; }
#finish { font-weight: bold; }
#studio-status, #release { margin-left: 154px; }
dialog { background: #fff; color: #111; border: 0; border-radius: 0; box-shadow: var(--raised), 4px 4px #0005; padding: 4px 20px 20px; width: calc(100% - 32px); max-width: 640px; max-height: 90svh; }
.home-core, .page, .notification, .toolbox, .palette, .layers-panel, .canvas-frame, .art-card, dialog { outline: 1px solid #000; outline-offset: 0; }
dialog::backdrop { background: #0005; }
dialog h2 { font-size: 14px; line-height: 1.5; letter-spacing: 0; margin: 0 -16px 18px; padding: 5px 8px; overflow-wrap: anywhere; }
.dialog-close { position: sticky; top: 4px; float: right; z-index: 1; margin: 3px -12px 0 8px; font-size: 10px; min-height: 23px; padding: 4px 7px; }
#art-image { display: block; width: 100%; height: auto; background: #fff; padding: 3px; box-shadow: var(--sunken); }
#rating-area { margin: 20px 0; }
.rating-controls { display: flex; gap: 12px; align-items: center; }
.rating-controls .button { font-size: 12px; }
select { border: 0; border-radius: 0; padding: 9px 13px; background: #fff; box-shadow: var(--sunken); font-size: 12px; }
#confirm-dialog { max-width: 430px; font-size: 13px; line-height: 1.65; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 25px; }
.error { color: #8b0000; }
noscript { position: fixed; inset: 30px; padding: 30px; background: #fff; outline: 1px solid #000; box-shadow: var(--raised); }
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 800px) {
  .page { width: calc(100% - 32px); margin: 24px auto; padding: 4px 18px 22px; }
  .page-header { margin-left: -14px; margin-right: -14px; }
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-layout { grid-template-columns: 114px minmax(0,1fr) 168px; gap: 13px; }
  .toolbox, .palette, .layers-panel { padding: 8px; }
  .tools button { font-size: 9px; }
  .studio-footer { margin-left: 127px; margin-right: 181px; }
  #studio-status, #release { margin-left: 127px; }
}
@media (max-width: 600px) {
  .waterfall-card { width: 106px; height: 106px; margin-left: -53px; }
  .art-waterfall.is-static .waterfall-card { top: calc(var(--art-row) * 155px + 12px); }
  .home { padding: 20px 16px; }
  .home-actions { padding: 25px 21px 27px; gap: 12px; }
  .home-actions .button { min-height: 60px; padding: 12px 18px; gap: 18px; font-size: 14px; }
  .home-actions .button::before { width: 29px; height: 29px; }
  .page { width: calc(100% - 20px); margin: 12px auto; padding: 4px 15px 20px; }
  .page-header { margin: 0 -11px 23px; gap: 8px; }
  .page-header span { font-size: 11px; }
  .page-header span::before { width: 15px; height: 15px; }
  .back { font-size: 10px; padding: 4px 8px; }
  h2 { font-size: 24px; margin-bottom: 20px; }
  .eyebrow { font-size: 9px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-heading { align-items: start; }
  .filters button { min-width: 0; flex: 1; }
  .studio-heading { display: block; margin-bottom: 15px; }
  .studio-heading h2 { font-size: 17px; }
  .studio-heading > .small { max-width: none; margin-top: 9px; }
  .studio-layout { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .canvas-column { grid-row: 1; }
  .tools { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; margin-bottom: 12px; }
  .tools button { min-height: 62px; font-size: 11px; gap: 4px; }
  .tools button::before { width: 24px; height: 24px; }
  .toolbox label { margin-top: 13px; font-size: 11px; }
  .toolbox input[type="range"] { margin-bottom: 9px; }
  .swatches { grid-template-columns: repeat(8,minmax(0,1fr)); max-width: 400px; gap: 7px; }
  .swatch[aria-pressed="true"]::after { inset: 5px; }
  .palette input[type="color"] { width: 90px; }
  .custom-label { margin-top: 15px; font-size: 10px; }
  .studio-footer { margin: 16px 0 0; }
  .edit-actions { gap: 5px; width: 100%; }
  .edit-actions button { font-size: 10px; flex: 1; padding: 8px 6px; }
  .edit-actions button::before { width: 14px; height: 14px; }
  #studio-status, #release { margin-left: 0; }
  .rating-controls { flex-wrap: wrap; }
  .notifications:not(:empty) { margin-top: 20px; }
}
@media (max-width: 370px) { .edit-actions button { flex: auto; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Prompt browsing and editable layers use the same compact desktop controls. */
.prompt-list { display: grid; gap: 12px; margin: 20px 0; }
.prompt-option { padding: 16px; border: 1px solid #000; background: #fff; }
.prompt-option p { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; margin: 8px 0 14px; }
.prompt-option .small { font-size: 10px; margin: 0; }
.prompt-option button { min-height: 36px; }
.studio-sidebar { display: grid; gap: 18px; min-width: 0; }
.layers-panel { min-width: 0; }
.layers-panel h3 { display: flex; justify-content: space-between; }
.layer-list { display: grid; gap: 5px; max-height: 240px; overflow-y: auto; padding: 2px; }
.layer-row { display: flex; align-items: center; gap: 5px; }
.layer-row input { width: 17px; height: 17px; flex-shrink: 0; margin: 0; accent-color: #333; cursor: url("assets/cursor-hand.png") 13 3, pointer; }
.layer-select { flex: 1; min-width: 0; padding: 8px 5px; min-height: 34px; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.layer-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; margin: 12px 0; }
.layer-actions button { padding: 7px 2px; min-height: 34px; font-size: 10px; }
.layers-panel label { font-size: 10px; margin: 12px 0 6px; }
#layer-name { width: 100%; min-height: 32px; border: 1px solid #888; background: #fff; padding: 5px; font-size: 11px; }
#layer-status { font-size: 10px; margin-bottom: 0; }
@media (max-width:600px) {
  .studio-sidebar { gap: 14px; }
  .layer-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .layer-actions { grid-template-columns: repeat(5,minmax(0,1fr)); }
  #layer-name { max-width: 300px; }
}
