
:root { --paper: #F7F5F0; --ink: #38373B; --muted: #6E6E6E; --line: #E2DED4; --sand: #E9DFC8;
        --card: #FFFFFF; --danger: #A23B2A; --ok: #3E6B48; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink);
       font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--ink); }
.shell { display: grid; grid-template-columns: 13rem 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; }
.side .mark { font-weight: 700; letter-spacing: .02em; }
.side .mark span { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.side nav { display: flex; flex-direction: column; gap: .25rem; }
.side nav a { padding: .4rem .6rem; border-radius: 6px; text-decoration: none; }
.side nav a[aria-current] { background: var(--sand); }
.side .who { margin-top: auto; font-size: .85rem; color: var(--muted); }
.side .who form { margin: .5rem 0 0; }
main { padding: 1.5rem 2rem 3rem; max-width: 72rem; width: 100%; }
h1 { font-size: 1.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.slim { max-width: 26rem; }
.narrow { max-width: 26rem; margin: 10vh auto; padding: 0 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; }
label { display: block; margin: 0 0 .9rem; }
label > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
textarea { min-height: 5rem; }
button, .button { display: inline-block; padding: .55rem 1rem; border-radius: 6px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font: inherit; cursor: pointer; text-decoration: none; }
button.secondary, .button.secondary { background: transparent; color: var(--ink); }
button.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; }
button.danger { background: var(--danger); border-color: var(--danger); }
.notice { padding: .6rem .8rem; border-radius: 6px; margin: 0 0 1rem; background: var(--sand); }
.notice.error { background: #F6DEDA; color: var(--danger); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td .thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--line); display: block; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.tag { font-size: .75rem; padding: .1rem .45rem; border-radius: 999px; background: var(--sand); }
.tag.hold { background: #F6DEDA; color: var(--danger); }
.tag.held { background: var(--ink); color: #fff; }
form.inline { display: inline-flex; gap: .35rem; margin: 0 .35rem .35rem 0; align-items: center; }
form.inline select { width: auto; padding: .35rem .5rem; }
form.inline button { padding: .35rem .7rem; font-size: .85rem; }
.row-actions { display: flex; flex-wrap: wrap; }
.link-card { margin: 0 0 1rem; }
.link-card input { width: calc(100% - 6rem); }
.filters { display: flex; gap: .5rem; margin: 0 0 1rem; flex-wrap: wrap; }
.filters select { width: auto; }
.nowrap { white-space: nowrap; }
.review { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
#map { height: 420px; border-radius: 10px; border: 1px solid var(--line); background: var(--line); }
.map-tools { display: flex; gap: .5rem; margin: .5rem 0 0; flex-wrap: wrap; align-items: center; font-size: .85rem; }
video { width: 100%; max-height: 480px; background: #000; border-radius: 10px; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.album img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
dl { display: grid; grid-template-columns: 9rem 1fr; gap: .35rem .75rem; margin: 0; }
dt { color: var(--muted); font-size: .85rem; }
dd { margin: 0; }
.codes { columns: 2; font-size: 1.05rem; padding-left: 1.2rem; }
.qr svg { width: 220px; height: 220px; display: block; margin: .5rem 0; }
fieldset { border: 0; padding: 0; margin: 0 0 .9rem; }
fieldset label { display: inline-flex; gap: .35rem; margin-right: 1rem; align-items: center; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side nav { flex-direction: row; }
  .side .who { margin-top: 0; margin-left: auto; }
  main { padding: 1rem; }
  .review { grid-template-columns: 1fr; }
}
