/* The three gallery pages (share a photo, the gallery, the approval page) share this one sheet. */
:root { --bg: #FFFAF5; --ink: #2B2A33; --soft: #6B6875; --card: #fff; --line: #EADFD3; --accent: #F4B183; --ok: #2E7D5B; --bad: #B3402E; }
* { box-sizing: border-box }
body { margin: 0; min-height: 100vh; padding: 24px 16px 48px; background: var(--bg); color: var(--ink); font: 400 17px/1.55 'Instrument Sans', system-ui, sans-serif }
main { width: 100%; max-width: 560px; margin: 0 auto }
main.wide { max-width: 1040px }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 32px 24px }
h1 { font: 400 32px/1.15 'Young Serif', Georgia, serif; margin: 0 0 12px; text-wrap: balance }
h2 { font: 400 22px/1.2 'Young Serif', Georgia, serif; margin: 28px 0 12px }
p { margin: 0 0 16px; color: var(--soft) }
a { color: var(--ink) }
.brand { display: block; font: 400 18px 'Young Serif', Georgia, serif; text-decoration: none; margin: 0 0 20px }
.btn { display: inline-block; border: 0; cursor: pointer; background: var(--ink); color: #fff; font: 600 17px 'Instrument Sans', system-ui, sans-serif; text-decoration: none; padding: 14px 26px; border-radius: 999px }
.btn.soft { background: #F1E9E0; color: var(--ink) }
.btn.bad { background: var(--bad) }
.btn.ok { background: var(--ok) }
.btn[disabled] { opacity: .5; cursor: default }
:focus-visible { outline: 3px solid #B9A6F0; outline-offset: 3px }
.pick { display: block; border: 2px dashed var(--line); border-radius: 18px; padding: 28px 16px; text-align: center; cursor: pointer; margin: 0 0 16px; color: var(--soft) }
.pick img { display: block; max-width: 100%; max-height: 320px; margin: 0 auto; border-radius: 12px }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px }
.tick { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 20px; font-size: 15px; color: var(--ink) }
.tick input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--ink) }
.note { font-size: 14px }
.msg { font-weight: 600; color: var(--ink) }
.msg.bad { color: var(--bad) }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none }
.grid li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden }
.grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #F1E9E0 }
.grid .cap { padding: 10px 14px; font-size: 14px; color: var(--soft) }
.grid .acts { display: flex; gap: 8px; padding: 0 14px 14px }
.grid .acts .btn { flex: 1; padding: 10px 8px; font-size: 15px; text-align: center }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 20px }
input[type=password] { font: inherit; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; flex: 1 }
#send { margin-bottom: 20px }

/* Whole photos, never cropped: each sits inside a fixed frame at its own shape. */
.grid.whole img { aspect-ratio: auto; height: 240px; object-fit: contain; background: #F6F0E9 }
.grid .open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in }

/* The bigger view */
.lb { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgba(20, 18, 26, .94); color: #fff }
.lb[open] { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center }
.lb::backdrop { background: rgba(20, 18, 26, .94) }
.lb figure { margin: 0; grid-column: 2; display: grid; justify-items: center; gap: 12px; min-width: 0 }
.lb figure img { max-width: 100%; max-height: calc(100dvh - 96px); object-fit: contain; border-radius: 8px; background: #000 }
.lb figcaption { font-size: 15px; color: #E8E3EE }
.lb button { border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .14); border-radius: 999px; width: 44px; height: 44px; font-size: 28px; line-height: 1; justify-self: center }
.lb button:hover { background: rgba(255, 255, 255, .28) }
.lb .lb-x { position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: 12px; z-index: 1 }
.lb .prev { grid-column: 1 } .lb .next { grid-column: 3 }
@media (max-width: 520px) { .lb[open] { grid-template-columns: 44px 1fr 44px } .lb button { width: 36px; height: 36px; font-size: 24px } }
