:root { font-family: Inter, system-ui, sans-serif; color: #303030; background: #f8f5ee; --line: #ded8cb; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header { background: #fff; border-bottom: 1px solid var(--line); }
.bar, main { max-width: 1120px; margin: auto; padding: 0 24px; }
.bar { display: flex; justify-content: space-between; align-items: center; min-height: 64px; font-size: .85rem; }
.bar img { width: 104px; }
.intro { display: flex; gap: 16px; align-items: end; justify-content: space-between; padding: 42px 0 25px; }
h1, h2, p { margin: 0; }
h1 { font: normal clamp(2.6rem,8vw,5rem)/.95 Georgia, serif; letter-spacing: -.055em; }
h2 { font-size: 1.16rem; }
p { margin-top: 8px; color: #625b51; }
.layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 24px; }
aside, .layout > section { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
nav { display: grid; gap: 6px; margin-top: 14px; max-height: 60vh; overflow: auto; }
button, input, select { font: inherit; min-height: 44px; }
button { cursor: pointer; background: #ffb536; border: 1px solid transparent; border-radius: 9px; color: #303030; padding: 8px 13px; font-weight: 650; }
button:disabled { opacity: .5; cursor: default; }
.secondary, nav button { background: #fff; border-color: var(--line); }
nav button { text-align: left; overflow-wrap: anywhere; }
nav button[aria-current] { background: #fff1d3; border-color: #e6ae49; }
nav .drawer { padding-left: 25px; }
.toolbar, .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar { justify-content: space-between; }
.grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(132px,1fr)); gap: 12px; margin-top: 16px; }
.empty { grid-column: 1/-1; padding: 32px 16px; border: 1px dashed var(--line); border-radius: 10px; }
.card { padding: 0; text-align: left; overflow: hidden; background: #faf8f3; border-color: var(--line); }
.card img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; background: #eee8dc; }
.card span, .card small { display: block; margin: 8px 10px; overflow-wrap: anywhere; }
dialog { width: min(440px, calc(100vw - 26px)); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
dialog::backdrop { background: #26201999; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 4px; }
label small { display: contents; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 8px; background: white; color: inherit; }
#preview { max-height: 180px; max-width: 100%; border-radius: 8px; }
dialog .actions { justify-content: flex-end; }
.danger { color: #8a2727; background: #fff1ee; margin-right: auto; }
#print-label { text-align: center; padding: 8px 0 20px; }
#qr { max-width: 100%; image-rendering: pixelated; }
#notice { padding-bottom: 18px; }
#notice.error { color: #8a2727; font-weight: 650; }
@media (max-width: 650px) {
  .bar, main { padding-inline: 14px; }
  .intro { padding-top: 27px; }
  .layout { grid-template-columns: 1fr; gap: 12px; }
  nav { display: flex; overflow-x: auto; }
  nav button { flex-shrink: 0; max-width: 75vw; }
  nav .drawer { padding-left: 13px; }
}
@media print {
  body { background: white; }
  body > :not(#label-dialog), #label-dialog .actions { display: none !important; }
  #label-dialog { position: static; margin: 0; border: 0; width: 64mm; }
  #label-dialog::backdrop { display: none; }
  #qr { width: 42mm; }
}
#demo-note { margin: 0 0 18px; padding: 10px 14px; background: #fff1d3; border-radius: 8px; }

#pagination { justify-content: center; margin-top: 18px; }

.layout > * { min-width: 0; }
