@font-face { font-family: Manrope; src: url('/assets/manrope.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
:root {
  color-scheme: light;
  font-family: Manrope, system-ui, sans-serif;
  --paper: #eef5ef;
  --white: #fbfdf9;
  --ink: #172e2a;
  --muted: #435c52;
  --green: #206052;
  --line: #bed1c4;
  --mint: #b8ebce;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #2d7663; outline-offset: 3px; }
::selection { background: #ccead6; color: #17352d; }
.wrap { width: min(69rem, calc(100% - 3rem)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 2; padding: .72rem 1rem; background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.masthead { border-bottom: 1px solid var(--line); background: #f8fbf5; }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .55rem 1rem; min-height: 4.1rem; padding-block: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .58rem; font-weight: 800; text-decoration: none; }
.brand img { flex: none; }
.more { font-size: .875rem; font-weight: 750; text-underline-offset: .22em; }
.intro { padding: clamp(2rem, 5vw, 3.7rem) 0 clamp(1.4rem, 3.5vw, 2.15rem); }
.intro h1 { margin: 0; font-size: clamp(2.35rem, 5.8vw, 4.65rem); line-height: 1.02; font-weight: 800; letter-spacing: -.038em; }
.intro h1 span { color: var(--green); }
.intro p { margin: .8rem 0 0; color: var(--muted); font-size: 1.06rem; line-height: 1.55; }

.workbench { display: grid; grid-template-columns: minmax(15rem, .9fr) minmax(0, 2.1fr); align-items: stretch; border: 1px solid var(--line); border-radius: 1rem; background: var(--white); }
.controls { min-width: 0; padding: clamp(.9rem, 3vw, 1.45rem); }
.drop { display: grid; justify-items: center; align-content: center; gap: .55rem; min-height: 8.9rem; padding: .85rem .6rem; border: 1.5px dashed #739986; border-radius: .7rem; background: #edf6ee; text-align: center; }
.drop[data-over] { border-color: #276b56; background: #d8eddd; }
.drop p { margin: 0; font-weight: 800; }
.drop .file-limit { color: var(--muted); font-size: .875rem; font-weight: 550; }
.button { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; padding: .54rem .9rem; border: 1px solid transparent; border-radius: .53rem; font-weight: 800; line-height: 1.25; text-decoration: none; }
.choose, .create { background: var(--green); color: white; }
.choose:not(:disabled):hover, .create:not(:disabled):hover { background: #164a40; }
.choose:disabled, .create:disabled { color: #435c52; background: #e5eee7; border-color: #bdcfc2; }
.file-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 0 .4rem; margin-top: .2rem; }
.text-button { min-height: 2.75rem; padding: .42rem .2rem; border: 0; border-radius: .38rem; color: var(--green); background: transparent; font-size: .875rem; font-weight: 800; text-decoration: underline; text-underline-offset: .22em; }
.text-button:not(:disabled):hover { background: #e9f2e9; }
.text-button:disabled { color: var(--muted); }
.file-info { margin: .1rem 0 0; color: var(--muted); font-size: .875rem; line-height: 1.45; overflow-wrap: anywhere; }
.range-field { margin-top: .82rem; }
.range-field label { display: block; margin-bottom: .35rem; font-size: .94rem; font-weight: 800; }
.range-field input { width: 100%; padding: .55rem .7rem; min-height: 2.75rem; border: 1px solid #7e9d8c; border-radius: .52rem; color: var(--ink); background: white; }
.range-field input::placeholder { color: #5a7167; }
.range-field input:disabled { background: #f0f4ef; }
.range-field input[aria-invalid='true'] { border-color: #a34744; }
.range-field p { margin: .35rem 0 0; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.range-field p.field-error { color: #852c2e; }
.create, .download { width: 100%; margin-top: .85rem; }
.download { color: #173b2d; background: var(--mint); }
.download:hover { background: #c9f5dd; }
.problem { margin: .75rem 0 0; padding: .65rem .78rem; border-radius: .45rem; color: #812c31; background: #fff1ef; font-size: .9rem; line-height: 1.5; }
.status { margin: .64rem 0 0; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.status:empty { margin: 0; }
.privacy { margin: .65rem 0 0; color: var(--muted); font-size: .875rem; }

.gallery { min-width: 0; min-height: 23.25rem; padding: clamp(1rem, 3vw, 1.5rem); border-radius: 0 .94rem .94rem 0; background: #173f37; color: #f8fff9; }
.gallery :focus-visible { outline-color: #f4d18e; }
.gallery-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.gallery-head h2 { margin: 0; font-size: 1.18rem; font-weight: 800; }
.gallery-head p { margin: 0; color: var(--mint); font-size: .875rem; font-weight: 800; }
.empty { display: grid; justify-items: center; align-content: center; margin-top: .9rem; min-height: 17.9rem; padding: 1rem; border: 1px solid #639487; border-radius: .67rem; background: #204d43; text-align: center; }
.empty p { margin: .9rem 0 .1rem; color: #e4f1e9; font-size: .94rem; }
.sheets { position: relative; width: 9.8rem; height: 8.7rem; }
.sheets span { position: absolute; width: 4.7rem; height: 6.35rem; border-radius: .42rem; transform-origin: center; }
.sheets span:nth-child(1) { top: 19%; left: 10%; transform: rotate(-18deg); background: #79a99b; }
.sheets span:nth-child(2) { top: 9%; left: 36%; transform: rotate(13deg); background: #f2e3bd; }
.sheets span:nth-child(3) { top: 8%; left: 29%; transform: rotate(-5deg); background: #c7edd4; }
.sheets span:last-child::before { content: ''; position: absolute; inset: 20% 18% auto; height: .25rem; border-radius: .3rem; background: #54816f; box-shadow: 0 .72rem #54816f; }
.sheets span:last-child i { position: absolute; right: 21%; bottom: 24%; width: 1.02rem; height: .64rem; border: solid #235542; border-width: 0 0 3px 3px; transform: rotate(-45deg); }
.gallery-tools { display: flex; align-items: center; gap: .1rem .5rem; flex-wrap: wrap; margin: .35rem 0 .55rem; }
.gallery-tools p { flex: 1 0 9rem; margin: .3rem 0; color: #d0e5d9; font-size: .875rem; }
.gallery-action { padding: .52rem .55rem; min-height: 2.75rem; border: 0; border-radius: .4rem; color: #edffef; background: transparent; font-size: .875rem; font-weight: 800; text-decoration: underline; text-underline-offset: .22em; }
.gallery-action:not(:disabled):hover { background: #29584c; }
.gallery-action:disabled { color: #acc7b9; text-decoration: none; }
.page-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin: 0; padding: 0; list-style: none; }
.tile { display: grid; gap: .48rem; justify-items: stretch; width: 100%; min-height: 2.75rem; padding: .54rem; border: 1px solid #739b8e; border-radius: .58rem; color: #f7fff7; background: #275649; text-align: left; }
.tile:not(:disabled):hover { background: #32705b; }
.tile[aria-pressed='true'] { border-color: #b8ebce; color: #132f26; background: #b8ebce; }
.tile[aria-pressed='true']:not(:disabled):hover { background: #c9f5dd; }
.sheet-preview { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 4.5; overflow: hidden; border-radius: .27rem; padding: .3rem; background: #1b4338; }
.sheet-preview canvas { position: absolute; inset: .3rem; width: calc(100% - .6rem); height: calc(100% - .6rem); object-fit: contain; }
.sheet-note { color: #ecf8ed; font-size: .875rem; line-height: 1.28; text-align: center; overflow-wrap: anywhere; }
.tile-caption { display: flex; align-items: center; justify-content: space-between; gap: .3rem; font-weight: 800; font-size: .875rem; line-height: 1.25; }
.selection-mark { display: block; flex: none; position: relative; width: 1.1rem; height: 1.1rem; border: 1px solid currentColor; border-radius: .23rem; }
.tile[aria-pressed='true'] .selection-mark { background: #235542; border-color: #235542; }
.tile[aria-pressed='true'] .selection-mark::after { content: ''; position: absolute; width: .49rem; height: .28rem; left: .23rem; top: .27rem; border: solid #f4fff5; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.pagination { display: flex; justify-content: space-between; gap: .5rem; margin-top: .46rem; }

.guide { display: grid; grid-template-columns: .95fr 1fr; gap: clamp(1.5rem, 6vw, 4.5rem); margin-top: clamp(2.1rem, 5vw, 3.7rem); padding: 1.7rem 0 2.1rem; border-top: 1px solid var(--line); }
.guide h2 { margin: 0; max-width: 22ch; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.13; letter-spacing: -.025em; }
.guide h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.guide ol { margin: .9rem 0 0; padding-inline-start: 1.5rem; }
.guide li { padding-inline-start: .24rem; }
.guide li + li { margin-top: .48rem; }
.guide p, .guide li { color: var(--muted); line-height: 1.6; }
.guide p { margin: .25rem 0 0; }
.guide p + h3 { margin-top: .95rem; }
footer { margin-top: 1.85rem; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding-block: 1rem; color: var(--muted); font-size: .875rem; }
.footer-inner a { text-underline-offset: .22em; }
.footer-inner a:first-child { font-weight: 800; }
@media (max-width: 56rem) {
  .page-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 45rem) {
  .wrap { width: calc(100% - 1.75rem); }
  .workbench, .guide { grid-template-columns: 1fr; }
  .gallery { min-height: 0; border-radius: 0 0 .94rem .94rem; }
  .empty { min-height: 12rem; }
  .drop { min-height: 7.5rem; }
}
@media (max-width: 25rem) {
  .page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
