* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { color-scheme: light; --ink: #2b2124; --wine: #5e1f2e; --line: #a8968f; --paper: #fffdfa; }
body { margin: 0; color: var(--ink); background: #f8f2ee; font: 1rem/1.55 system-ui, sans-serif; }
header { background: var(--wine); color: white; }
.bar,main { width: min(100% - 2rem, 62rem); margin-inline: auto; }
.bar,.title-row,.dialog-head,.actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; flex-wrap: wrap; }
.bar { padding-block: .8rem; }
.brand { text-transform: uppercase; letter-spacing: .12em; font: 600 .9rem/1.6 Georgia, serif; }
main { padding-block: clamp(1.5rem,4vw,3.5rem); }
h1,h2 { font: normal clamp(2.1rem,4vw,3.3rem)/1.08 Georgia,serif; margin: 0 0 .6rem; }
h2 { font-size: 1.65rem; }
p { margin: .45rem 0 1rem; }
label { display: block; margin: .5rem 0 .25rem; font-weight: 640; }
input,select,textarea,button,.button { font: inherit; min-height: 44px; border: 1px solid var(--line); border-radius: .25rem; color: inherit; background: var(--paper); }
input,textarea,select { padding: .55rem .65rem; width: 100%; min-width: 0; }
textarea { resize: vertical; }
button,.button { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: .55rem .95rem; color: var(--wine); font-weight: 630; text-decoration: none; }
button:hover,.button:hover { border-color: var(--wine); background: #f3e5de; }
button:disabled { color: #665957; background: #e9e4e1; cursor: default; }
button.primary { background: var(--wine); color: white; border-color: var(--wine); }
button.primary:disabled { color: #655a57; background: #e9e4e1; border-color: var(--line); }
:focus-visible { outline: 3px solid #075ba3; outline-offset: 3px; }
.panel,.release,#login { background: var(--paper); border: 1px solid #c9bbb5; padding: clamp(1rem,2.5vw,2rem); border-radius: .45rem; margin-top: 1.25rem; }
#login { max-width: 28rem; margin: 1rem auto; }
#login button { margin-top: 1rem; }
.row,.photo-edit { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.3rem; }
.row { border-bottom: 1px solid #ded2cb; padding-bottom: 1rem; margin-bottom: 1rem; }
.photo-edit { align-items: start; margin-top: 1rem; }
.photo-edit img { width: 100%; height: 12rem; display: block; object-fit: contain; background: #eee7e2; border-radius: .25rem; }
.actions { justify-content: flex-start; margin-top: 1.2rem; }
#status:empty,#library-status:empty { display: none; }
#status { position: sticky; bottom: .5rem; width: fit-content; padding: .5rem 1rem; background: var(--ink); color: white; border-radius: .25rem; }
#tiles { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fill,minmax(min(9rem,100%),1fr)); margin: 1rem 0; }
.tile { display: flex; align-items: stretch; flex-direction: column; justify-content: flex-start; overflow: hidden; text-align: left; font-size: .82rem; padding: 0; overflow-wrap: anywhere; }
.tile img,.order img { display: block; object-fit: cover; }
.tile img { width: 100%; height: 6rem; }
.tile span { padding: .35rem .5rem; }
dialog { width: min(46rem,94%); max-height: 86vh; max-height: 86dvh; padding: 1rem; border: 1px solid var(--line); border-radius: .45rem; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #241b1cc9; }
.hint { font-size: .875rem; }
.order { list-style: none; padding: 0; }
.order li { display: grid; align-items: center; grid-template-columns: 4rem 1fr auto auto; gap: .55rem; padding: .5rem 0; border-bottom: 1px solid #dfd3cb; }
.order img { width: 4rem; height: 3rem; }
.order span { overflow-wrap: anywhere; }
a { color: var(--wine); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 38rem) {
  .row,.photo-edit { grid-template-columns: 1fr; gap: .4rem; }
  .order li { grid-template-columns: 4rem 1fr 1fr; }
  .order span { grid-column: span 2; }
  .order button:first-of-type { grid-column: 2; }
}
