:root {
  --bg: #ffffff;
  --surface: #f2f3f4;
  --ink: #1c1e22;
  --muted: #697078;
  --line: #e3e5e8;
  --accent: #1d5b48;
  --accent-soft: #e3efe9;
  --accent-ink: #ffffff;
  --danger: #b3261e;
  --radius: 10px;
  --serif: Newsreader, Georgia, serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #202328;
    --ink: #eceef0;
    --muted: #9aa1a9;
    --line: #2d3137;
    --accent: #7cc7a8;
    --accent-soft: #1f3a31;
    --accent-ink: #0f231c;
    --danger: #f2877e;
  }
}

* { box-sizing: border-box; }
button, input, select, textarea { font-family: inherit; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Schibsted Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: .75rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); text-underline-offset: .15em; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.count { color: var(--muted); font-weight: 500; font-size: .7em; letter-spacing: 0; vertical-align: .15em; margin-left: .15em; }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* frame */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem max(16px, calc((100vw - 1120px) / 2));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .5rem; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.mark { width: 1.6rem; height: 1.6rem; fill: none; stroke: var(--accent); stroke-width: 2.6; }
.top nav { display: flex; gap: .25rem; }
.top nav a { display: flex; align-items: center; gap: .4rem; padding: .4rem .7rem; border-radius: 99px; color: var(--muted); text-decoration: none; font-weight: 500; }
.top nav a:hover { color: var(--ink); background: var(--surface); }
.top nav a.on { color: var(--accent); background: var(--accent-soft); }
main { max-width: 1120px; margin: 0 auto; padding: 1.25rem 16px 3rem; }

@media (max-width: 700px) {
  .top { justify-content: center; backdrop-filter: none; background: var(--bg); }
  .top nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    justify-content: space-around; gap: 0;
    padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--line);
  }
  .top nav a { flex-direction: column; gap: .15rem; padding: .3rem .5rem; font-size: .75rem; border-radius: 8px; }
  .top nav a .i { width: 1.35rem; height: 1.35rem; }
  .top nav a:hover { background: none; }
  .top nav a.on { background: none; }
  main { padding-bottom: 6rem; }
  #update { bottom: calc(4.5rem + env(safe-area-inset-bottom)) !important; }
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  font: inherit; font-weight: 700; line-height: 1;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 4px; padding: .65rem 1.1rem; box-shadow: inset 0 -2px 0 rgb(0 0 0 / .18);
  text-decoration: none; cursor: pointer;
}
.btn:disabled, .icon-btn:disabled { opacity: .5; cursor: wait; }
.btn.danger { background: none; color: var(--danger); box-shadow: inset 0 0 0 1px currentColor; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none;
  border: 0; border-radius: 99px; background: none; color: var(--ink);
  cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn.solid { border-radius: 4px; background: var(--accent); color: var(--accent-ink); }
.toolbar { display: flex; justify-content: space-between; margin: -.5rem -.5rem .5rem; }

/* page heads and tables */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .5rem .6rem; white-space: nowrap; }
th { font-size: .8rem; font-weight: 500; color: var(--muted); }
.num { text-align: right; }
.photos { display: inline-flex; align-items: center; gap: .25rem; margin-left: .5rem; font-size: .8rem; color: var(--muted); vertical-align: .05em; }
.photos .i { width: .95em; height: .95em; }
.photos > span { display: inline-flex; align-items: center; gap: .25rem; }
.photos > span + span { margin-left: .5rem; }
.photos.none { opacity: .45; }
.initial { font-weight: 800; font-size: 1.4rem; color: var(--muted); }
.narrow { display: none; }
@media (max-width: 640px) {
  .wide { display: none; }
  .narrow { display: inline; }
  .photos { display: flex; margin: .1rem 0 0; }
  th, td { padding: .45rem .22rem; }
  tr > :first-child { padding-left: 0; }
  tr > :last-child { padding-right: 0; }
}

/* dinner page */
.dinner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 2rem; align-items: start; }
.dinner.single { grid-template-columns: 1fr; }
.dinner-side, .dinner-main { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }
.dinner-img { width: 100%; aspect-ratio: 1.7; object-fit: cover; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.dinner-head h1 { font-size: clamp(2.4rem, 6.5vw, 3.9rem); margin-bottom: .5rem; }
.date { color: var(--muted); margin: 0 0 .25rem; font-family: var(--serif); font-style: italic; }
.links { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .55rem; }
.links a { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.links a .i { color: var(--accent); }
.links a:hover span { text-decoration: underline; text-underline-offset: .2em; }
.note { max-width: 60ch; margin: 1.4rem 0 .25rem; padding: .15rem 0 .15rem 1rem; border-left: 2px solid var(--accent); font-family: var(--serif); font-size: 1.1rem; line-height: 1.5; color: var(--ink); }
.figures { display: flex; flex-wrap: wrap; gap: 1rem 2.75rem; margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px dotted var(--line); }
.figures dt { font-size: .8rem; color: var(--muted); }
.figures dd { margin: 0; font-size: 1.2rem; font-weight: 700; }
.menu { margin: 0; padding: 0; list-style: none; counter-reset: course; }
.menu li { display: flex; gap: .6rem; padding: .5rem 0; line-height: 1.45; counter-increment: course; font-family: var(--serif); font-size: 1rem; }
.menu li::before { content: counter(course); flex: none; width: 1.4em; padding-top: .1rem; text-align: right; color: var(--muted); font-family: "Schibsted Grotesk", system-ui, sans-serif; font-size: .82rem; }
@media (max-width: 760px) {
  .dinner { display: flex; flex-direction: column; align-items: stretch; }
  .dinner-side, .dinner-main { display: contents; }
  .dinner-img { order: 1; }
  .dinner-head { order: 2; }
  .menu-card { order: 3; }
  .dinner-photos { order: 4; }
  .figures { display: grid; grid-template-columns: 1fr 1fr; }
  .dinner-img { margin: 0 -16px; width: calc(100% + 32px); max-width: none; padding: 0; border: 0; border-radius: 0; }
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px; }
.grid button, .grid .tile { padding: 0; border: 0; background: var(--surface); cursor: zoom-in; aspect-ratio: 1; overflow: hidden; border-radius: 2px; position: relative; }
.grid img { width: 100%; height: 100%; object-fit: cover; }
.grid button:hover img { opacity: .85; }

.filter { margin: 1rem 0 1.25rem; }

/* regnskab */
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem 4rem; margin-top: 3rem; }
.columns h2 { margin-bottom: 1rem; }
.plain td { padding: .7rem 0; border-top: 1px dotted var(--line); white-space: normal; vertical-align: top; }
.plain { margin-bottom: 1rem; }
.add summary { display: inline-flex; align-items: center; gap: .4rem; list-style: none; cursor: pointer; font-weight: 700; color: var(--accent); padding: .4rem 0; margin: 0; }
.add summary::-webkit-details-marker { display: none; }
.add[open] summary .i { transform: rotate(45deg); }
.add-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .75rem; padding: 1rem; background: var(--surface); border-radius: var(--radius); }
.add-form input { width: 100%; }
.add-form .span2, .add-form .add-actions { grid-column: span 2; }
.add-actions { display: flex; align-items: center; gap: .75rem; }

/* suggestions */
.ideas { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; align-items: start; }
.idea { position: relative; display: grid; gap: .3rem; align-content: start; min-height: 7.5rem; padding: 1rem 1.1rem; background: var(--surface); border-radius: var(--radius); }
.idea > strong { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; padding-right: 5rem; }
.idea .host { display: inline-flex; align-items: center; gap: .35rem; justify-self: start; }
.idea p { margin: .25rem 0 0; }
.idea .tools { position: absolute; top: .5rem; right: .5rem; display: flex; }
.add-card { background: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.add-card:not(:has(details[open])) { align-content: center; justify-items: center; }
.add-card summary { padding: 0; }
.card-form { display: grid; gap: .75rem; margin-top: .75rem; }
.idea > .card-form { margin-top: 0; }
.card-form input { width: 100%; }

/* forms */
input, textarea { font: inherit; color: inherit; background: var(--bg); border: 1.5px solid var(--line); border-radius: 8px; padding: .55rem .7rem; max-width: 100%; }
input:focus, textarea:focus { border-color: var(--accent); outline: none; }
label { display: grid; gap: .3rem; font-size: .875rem; color: var(--muted); }
label input, label textarea { color: var(--ink); font-size: 1rem; }
.inline { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.inline .status { align-self: center; }
.dinner-form { display: grid; gap: 2.25rem; margin-top: 1.25rem; }
.dinner-form > section { display: grid; gap: 1rem; align-content: start; }
.dinner-form > section:not(.drop), .dinner-form .actions { max-width: 720px; }
.dinner-form h2 { margin: 0; }
.dinner-form input:not([type=checkbox]):not([type=file]) { width: 100%; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
@media (max-width: 560px) { .pair { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: .5rem; color: var(--ink); font-size: 1rem; }
.bill { margin: -.25rem 0 0; min-height: 1.5em; }
.menu-edit { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; counter-reset: course; }
.menu-edit li { display: flex; align-items: center; gap: .5rem; counter-increment: course; }
.menu-edit li::before { content: counter(course); width: 1.6em; flex: none; text-align: right; color: var(--muted); }
.menu-edit input { font-family: var(--serif); font-size: 1.08rem; }
.menu-edit .icon-btn { color: var(--muted); }
.grip { display: grid; place-items: center; width: 1.5rem; height: 2.4rem; flex: none; color: var(--muted); cursor: grab; touch-action: pan-y; }
.menu-edit .sortable-ghost { opacity: .35; }
.menu-edit .sortable-chosen .grip, .pick .sortable-chosen { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
.menu-edit .sortable-fallback { opacity: .9; }
.add-row { justify-self: start; display: inline-flex; align-items: center; gap: .4rem; margin-left: calc(2.1em + 2rem); padding: .35rem 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }
.drop { border-radius: var(--radius); outline: 2px dashed transparent; outline-offset: 8px; }
.drop.over { outline-color: var(--accent); }
.drop p { margin: -.5rem 0 0; }
.upload { justify-self: start; display: inline-flex; flex-direction: row; align-items: center; gap: .45rem; padding: .6rem 1rem; border-radius: 4px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 1rem; cursor: pointer; margin-bottom: .5rem; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:has(input:focus-visible) { outline: 2px solid var(--accent); }
.pick { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
@media (max-width: 640px) { .pick { grid-template-columns: repeat(2, 1fr); gap: 6px; } }
.pick .tile { cursor: grab; touch-action: pan-y; user-select: none; }
.pick .sortable-ghost { opacity: .3; }
.pick .tile .course-btn { position: absolute; left: 4px; right: 4px; bottom: 4px; width: calc(100% - 8px); height: 1.7rem; aspect-ratio: auto; padding: 0 .5rem; font: inherit; font-size: .75rem; line-height: 1.7rem; text-align: left; white-space: nowrap; border: 0; border-radius: 6px; background: rgb(0 0 0 / .6); color: #fff; cursor: pointer; display: flex; align-items: center; gap: .3rem; }
.pick .tile .course-btn span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pick .tile .course-btn b { flex: none; padding: 0 .35rem; border-radius: 99px; background: rgb(0 0 0 / .25); font-size: .75rem; line-height: 1.2rem; }
.pick .tile .course-btn.on { background: var(--accent); color: var(--accent-ink); }
#photo-note, #course-picker { border: 0; border-radius: var(--radius); padding: 1.1rem 1.2rem; width: min(30rem, calc(100vw - 32px)); max-height: 80vh; background: var(--bg); color: var(--ink); box-shadow: 0 20px 50px -15px rgb(0 0 0 / .45); }
#photo-note::backdrop, #course-picker::backdrop { background: rgb(0 0 0 / .45); }
#photo-note h3, #course-picker h3 { margin: 0 0 .75rem; font-family: var(--serif); font-size: 1.25rem; }
#course-picker .opts { display: grid; gap: .1rem; max-height: 55vh; overflow-y: auto; margin-bottom: 1rem; }
#course-picker .check { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem .25rem; border-radius: 6px; cursor: pointer; line-height: 1.35; }
#course-picker .check:hover { background: var(--surface); }
#course-picker .check input { margin-top: .2rem; flex: none; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.pick .tile .note-btn { position: absolute; top: 4px; left: 4px; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; padding: 0; border: 0; border-radius: 99px; background: rgb(0 0 0 / .55); color: #fff; cursor: pointer; }
.pick .tile .note-btn .i { width: 1rem; height: 1rem; }
.pick .tile .note-btn.on { background: var(--accent); color: var(--accent-ink); }
.del { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 99px; background: rgb(0 0 0 / .55); color: #fff; cursor: pointer; }
.del input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.del .i { width: 1rem; height: 1rem; }
.tile:has(.del input:checked) img { opacity: .25; }
.tile:has(.del input:checked) .del { background: var(--danger); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.actions .danger { margin-left: auto; }
.status { color: var(--muted); }
summary { cursor: pointer; margin-bottom: .75rem; }

/* photo viewer (PhotoSwipe) */
.pswp { --pswp-bg: #0d0d0f; }
.pswp__title { flex: 1; min-width: 0; align-self: center; padding: 0 .5rem 0 1.25rem; color: #f2f2f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pswp__title strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.pswp__title span { margin-left: .5rem; color: rgb(255 255 255 / .6); font-size: .875rem; }
.pswp__course { position: absolute; left: 0; right: 0; bottom: 0; padding: 3.5rem max(1.25rem, env(safe-area-inset-left)) calc(1.4rem + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgb(0 0 0 / .75)); color: #fff; font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.9rem); line-height: 1.3; text-align: center; text-wrap: balance; transition: opacity .2s; }
.pswp__course[hidden] { display: none; }
.pswp__course div + div { margin-top: .25rem; }
.pswp__course.many { text-align: left; font-family: "Schibsted Grotesk", system-ui, sans-serif; font-size: clamp(.85rem, 1.3vw, 1.05rem); padding-top: 4rem; }
.pswp__course.many div { max-width: 48rem; margin-inline: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pswp__course.many div + div { margin-top: .15rem; }
.pswp__course.many .n { font-size: .75em; min-width: 1.6em; height: 1.6em; margin-right: .5em; vertical-align: .05em; }
.pswp__course.many small { max-width: 48rem; margin-inline: auto; }
.pswp__course small { display: block; margin-top: .3rem; font-family: "Schibsted Grotesk", system-ui, sans-serif; font-size: .58em; color: rgb(255 255 255 / .8); }
.pswp__course small.alone { margin-top: 0; font-family: var(--serif); font-size: .8em; color: #fff; }
.pswp__course .n { display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; margin-right: .55em; padding: 0 .35em; border-radius: 99px; background: rgb(255 255 255 / .18); font-family: "Schibsted Grotesk", system-ui, sans-serif; font-size: .62em; font-weight: 700; vertical-align: .25em; }
.pswp--ui-visible .pswp__course { opacity: 1; }
.pswp:not(.pswp--ui-visible) .pswp__course { opacity: 0; }
@media (max-width: 700px) {
  .pswp__title { padding-left: .9rem; }
  .pswp__title strong { font-size: 1.02rem; }
  .pswp__title span { display: none; }
}

#update { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 1000; width: max-content; max-width: calc(100vw - 32px); display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: center; padding: .55rem .55rem .55rem 1rem; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 8px 24px -10px rgb(0 0 0 / .35); font-family: var(--serif); font-size: 1.05rem; }
#update[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.secret { position: relative; display: block; }
.secret input { width: 100%; padding-right: 2.75rem; }
.secret .icon-btn { position: absolute; right: .15rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.bank-add { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.25rem; }
.bank-add details { flex: 1 1 100%; }
.bank-add details:not([open]) { flex: 0 0 auto; }
.csv-link { display: inline; color: var(--muted); font-size: .875rem; text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }
.csv-link input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.csv-link:has(input:focus-visible) { outline: 2px solid var(--accent); }

/* front page: own photos and timeline */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 120px; gap: 4px; margin: -.25rem 0 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip a { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 2px; scroll-snap-align: start; background: var(--surface); }
.strip img { width: 100%; height: 100%; object-fit: cover; }
.strip span { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem .5rem .4rem; color: #fff; font-family: var(--serif); font-style: italic; font-size: .95rem; font-weight: 400; background: linear-gradient(transparent, rgb(0 0 0 / .6)); }
@media (max-width: 640px) { .strip { grid-auto-columns: 38%; margin-left: -16px; margin-right: -16px; padding: 0 16px; scroll-padding: 0 16px; } }
.timeline { margin: 1.75rem 0 2.25rem; }
.timeline h2 { margin-bottom: 1.1rem; }
.track { position: relative; height: 2.6rem; margin: 0 .5rem; border-top: 2px solid var(--line); }
.year { position: absolute; top: .45rem; font-size: .75rem; color: var(--muted); padding-left: .3rem; border-left: 1px solid var(--line); line-height: 1.4; }
.dot { position: absolute; top: -8px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
.dot:hover, .dot:focus-visible { transform: scale(1.35); }
.now { position: absolute; top: -6px; width: 2px; height: 10px; margin-left: -1px; background: var(--muted); }
@media (max-width: 640px) {
  .year:nth-of-type(even) { visibility: hidden; }
  .dot { top: -6px; width: 10px; height: 10px; margin-left: -5px; box-shadow: 0 0 0 2px var(--bg); }
}

/* herbs from A Curious Herbal in the margins */
.herb { position: fixed; bottom: 0; z-index: -1; pointer-events: none; width: calc((100vw - 1120px) / 2 - 12px); height: min(78vh, 720px);
  background: var(--accent); opacity: .14; -webkit-mask: var(--img) no-repeat bottom / contain; mask: var(--img) no-repeat bottom / contain; }
.herb-rosemary { left: 0; --img: url(rosemary.png); }
.herb-mint { right: 0; --img: url(mint.png); }
@media (max-width: 1360px) {
  .herb { width: 24vw; height: 52vh; opacity: .08; }
  .herb-rosemary { left: -3vw; -webkit-mask-position: bottom left; mask-position: bottom left; }
  .herb-mint { right: -3vw; -webkit-mask-position: bottom right; mask-position: bottom right; }
}
@media (max-width: 700px) {
  .herb { width: 42vw; height: 38vh; bottom: calc(4.2rem + env(safe-area-inset-bottom)); opacity: .06; }
  .herb-rosemary { left: -6vw; -webkit-mask-position: bottom left; mask-position: bottom left; }
  .herb-mint { right: -6vw; -webkit-mask-position: bottom right; mask-position: bottom right; }
}

/* map and address search */
.map-section { margin: 0 0 2.25rem; }
#map { height: 340px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); z-index: 0; }
#map.leaflet-container, #map .leaflet-popup-content { font: inherit; }
@media (hover: none) { #map.leaflet-container:not(.active) { touch-action: pan-x pan-y; } #map.active { outline: 2px solid var(--accent); outline-offset: -2px; } }
.map-hint { position: absolute; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; background: rgb(0 0 0 / .45); color: #fff; font-weight: 600; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s; }
#map.hinting .map-hint { opacity: 1; }
#map .leaflet-tile-pane { filter: grayscale(1) contrast(.9) brightness(1.05); }
@media (prefers-color-scheme: dark) {
  #map .leaflet-tile-pane { filter: grayscale(1) invert(1) contrast(.85) brightness(.8); }
  #map { background: var(--bg); }
}
.leaflet-tooltip { font-family: var(--serif); font-size: .95rem; }
@media (max-width: 640px) { #map { height: 260px; margin: 0 -16px; border-left: 0; border-right: 0; border-radius: 0; } }
.address-field { position: relative; }
.suggest { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin: .25rem 0 0; padding: .25rem; list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px -8px rgb(0 0 0 / .3); max-height: 16rem; overflow-y: auto; }
.suggest li { display: grid; padding: .5rem .6rem; border-radius: 4px; cursor: pointer; }
.suggest li:hover, .suggest li:focus { background: var(--surface); outline: none; }
.suggest li .muted { font-size: .8rem; }
.suggest li.none { color: var(--muted); cursor: default; }

.dot-popup .leaflet-popup-content-wrapper { border-radius: 6px; background: var(--bg); color: var(--ink); box-shadow: 0 6px 20px -6px rgb(0 0 0 / .35); }
.dot-popup .leaflet-popup-tip { background: var(--bg); }
.dot-popup .leaflet-popup-content { margin: .45rem .45rem .45rem .7rem; display: grid; grid-template-columns: auto auto; column-gap: .75rem; align-items: center; font: inherit; width: auto !important; }
.dot-popup strong { font-family: var(--serif); font-weight: 600; font-size: 1rem; line-height: 1.2; white-space: nowrap; }
.dot-popup .muted { grid-column: 1; font-size: .75rem; white-space: nowrap; }
.dot-popup a { grid-column: 2; grid-row: 1 / 3; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 4px; background: var(--accent); }
#map .dot-popup a { color: var(--accent-ink); }
.dot-popup a .i { width: 1.1rem; height: 1.1rem; }
#map .leaflet-control-attribution { background: none; color: var(--muted); opacity: .55; font-size: .6rem; padding: 0 .4rem .15rem; }
#map .leaflet-control-attribution:hover { opacity: 1; }
#map .leaflet-control-attribution a { color: var(--muted); }
#map .leaflet-bar a, #map .leaflet-bar a:hover { background: var(--bg); color: var(--ink); border-bottom-color: var(--line); font-family: inherit; }
#map .leaflet-bar { border: 1px solid var(--line); box-shadow: none; border-radius: 4px; }
#map .map-reset { display: grid; place-items: center; }
#map .map-reset .i { width: 15px; height: 15px; }
.dinner-form textarea { width: 100%; resize: vertical; line-height: 1.45; }
.dinner-form textarea.grow { overflow: hidden; min-height: 5.2rem; }

/* Oskar's own visits (only with the #/config switch) */
#filter {
  appearance: none; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer;
  border: 0; border-radius: 99px; padding: .4rem 1.8rem .4rem .8rem; margin-left: auto; margin-right: .5rem;
  background: var(--surface) no-repeat;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%;
  background-size: 5px 5px;
}
#filter:hover { color: var(--ink); }
#filter.on { color: var(--accent); background-color: var(--accent-soft); }
#filter option { color: var(--ink); background: var(--bg); }
@supports (appearance: base-select) {
  #filter, #filter::picker(select) { appearance: base-select; }
  #filter::picker-icon { display: none; }
  #filter::picker(select) {
    margin-top: .35rem; padding: .3rem; min-width: anchor-size(width); overflow: visible;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg); box-shadow: 0 8px 24px rgb(0 0 0 / .12);
  }
  #filter option { padding: .4rem .8rem; border-radius: 6px; font-weight: 500; }
  #filter option::checkmark { display: none; }
  #filter option:hover, #filter option:focus-visible { background: var(--surface); outline: none; }
  #filter option:checked { color: var(--accent); background: var(--accent-soft); }
}
@media (max-width: 700px) { .top:has(#filter:not([hidden])) { justify-content: space-between; } #filter { margin: 0; } }
.tag { display: inline-block; margin-left: .5rem; font-size: .75rem; padding: .05rem .45rem; border-radius: 4px; background: var(--surface); color: var(--muted); vertical-align: .1em; }
.dot.own { background: var(--bg); box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 3px var(--bg); }
.big-check { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.dinner-form select { font: inherit; color: inherit; background: var(--bg); border: 1.5px solid var(--line); border-radius: 8px; padding: .55rem .7rem; width: 100%; }
.dinner-form [hidden] { display: none !important; }
#photo-note form { display: grid; gap: .8rem; }
#photo-note label { display: grid; gap: .3rem; font-size: .875rem; color: var(--muted); }
#photo-note input { width: 100%; color: var(--ink); }
#photo-note .row { display: flex; gap: .5rem; }
.btn.ghost { background: var(--surface); color: var(--ink); }
.grid .credit-badge { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 99px; background: rgb(0 0 0 / .55); color: #fff; pointer-events: none; }
.grid .credit-badge .i { width: .8rem; height: .8rem; }
.pswp__course .credit { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: .55rem; margin: .7rem auto 0; padding: .3rem .8rem .3rem .3rem; border-radius: 99px; background: rgb(0 0 0 / .55); backdrop-filter: blur(6px); font-family: "Schibsted Grotesk", system-ui, sans-serif; font-style: normal; font-size: clamp(.8rem, 1vw, .95rem); line-height: 1.3; color: rgb(255 255 255 / .9); text-align: left; }
.pswp__course .credit .tag { display: inline-flex; flex: none; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 99px; background: rgb(255 255 255 / .92); color: #111; font-weight: 600; font-size: .9em; }
.pswp__course .credit .i { width: .95em; height: .95em; flex: none; }
.pswp__course.many .credit { max-width: 48rem; margin-inline: auto; }

.dish-search-form { display: flex; align-items: stretch; max-width: 36rem; margin-bottom: 1.25rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--bg); overflow: hidden; }
.dish-search-form:focus-within { border-color: var(--accent); }
.dish-search-form > .i { flex: none; align-self: center; width: 1.1rem; height: 1.1rem; margin-left: .75rem; color: var(--muted); }
.dish-search-form .dish-search { flex: 1; min-width: 0; border: 0; border-radius: 0; background: none; padding: .65rem .6rem; outline: none; }
.search-go { flex: none; border: 0; padding: 0 1.25rem; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; }
.search-go:hover { filter: brightness(1.08); }
.dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.1rem .75rem; }
.dishes figure { margin: 0; min-width: 0; }
.dishes button, .dishes .no-photo { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 2px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.dishes img { width: 100%; height: 100%; object-fit: cover; }
.dishes button:hover img { opacity: .85; }
.dishes .no-photo { display: grid; place-content: center; justify-items: center; gap: .3rem; color: var(--muted); font-size: .8rem; text-decoration: none; cursor: pointer; }
.dishes figcaption { margin-top: .4rem; font-size: .875rem; line-height: 1.3; }
.dishes figcaption span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dishes figcaption small { display: block; margin-top: .1rem; color: var(--muted); font-size: .8rem; }
.dishes figcaption a { display: block; margin-top: .15rem; color: var(--muted); font-family: var(--serif); font-style: italic; text-decoration: none; }
.dishes figcaption a:hover { color: var(--accent); }
@media (max-width: 640px) { .dishes { grid-template-columns: 1fr 1fr; } }

.keyfigs { display: grid; grid-template-columns: 1.3fr 1fr 1fr; margin: 1.25rem 0 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.keyfigs > div { display: flex; flex-direction: column; padding: .9rem 1.5rem 1rem; border-left: 1px solid var(--line); }
.keyfigs > div:first-child { padding-left: 0; border-left: 0; }
.keyfigs dt { font-size: .8rem; color: var(--muted); }
.keyfigs dd { margin: auto 0 0; padding-top: .35rem; font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.keyfigs .main dd { font-size: 2.3rem; color: var(--accent); }
.keyfigs small { margin-top: .2rem; font-size: .8rem; color: var(--muted); }
.keyfigs + .columns { margin-top: 2.5rem; }
.ledger td, .plain.ledger td { padding: .45rem 0; border-top: 1px solid var(--line); }
.ledger td .muted { font-size: .875rem; margin-left: .35rem; white-space: nowrap; }
.ledger .sum td { font-weight: 700; border-top-color: var(--ink); }
.ledger tr:last-child.sum td { border-bottom: 3px double var(--ink); }
.ledger + .muted.small { margin: .6rem 0 1rem; }
@media (max-width: 760px) {
  .keyfigs { grid-template-columns: 1fr 1fr; }
  .keyfigs > div { padding: .8rem 0 .9rem 1rem; border-top: 1px solid var(--line); }
  .keyfigs > div:first-child { grid-column: 1 / -1; border-top: 0; }
  .keyfigs > div:nth-child(2) { padding-left: 0; border-left: 0; }
}

.air-datepicker {
  --adp-font-family: inherit; --adp-font-size: .95rem; --adp-width: 18.5rem; --adp-padding: 6px; --adp-border-radius: 6px; --adp-cell-border-radius: 4px;
  --adp-background-color: var(--bg); --adp-border-color: var(--line); --adp-border-color-inner: var(--line); --adp-border-color-inline: var(--line);
  --adp-color: var(--ink); --adp-color-secondary: var(--muted); --adp-accent-color: var(--accent); --adp-color-current-date: var(--accent);
  --adp-day-name-color: var(--muted); --adp-day-name-color-hover: var(--ink); --adp-nav-arrow-color: var(--ink); --adp-nav-color-secondary: var(--muted);
  --adp-background-color-hover: var(--surface); --adp-background-color-active: var(--surface); --adp-cell-background-color-hover: var(--surface);
  --adp-cell-background-color-selected: var(--accent); --adp-cell-background-color-selected-hover: var(--accent);
  --adp-color-other-month: color-mix(in srgb, var(--muted) 45%, transparent); --adp-color-other-month-hover: var(--muted);
  --adp-btn-color: var(--accent); --adp-btn-background-color-hover: var(--surface);
  box-shadow: 0 8px 28px rgb(0 0 0 / .16);
}
.air-datepicker-nav--title { font-weight: 700; color: var(--ink); }
.air-datepicker-nav--title i { font-style: normal; font-weight: 500; color: var(--muted); margin-left: .3em; padding: .1em .3em; border-radius: 4px; }
.air-datepicker-nav--title i:hover { color: var(--ink); background: var(--surface); }
.air-datepicker-nav--action svg.i { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; }
.air-datepicker-cell.-selected-, .air-datepicker-cell.-selected-.-current- { color: var(--accent-ink); }
.air-datepicker-cell.-day-.-other-month-, .air-datepicker-cell.-year-.-other-decade- { font-size: .85em; }
.air-datepicker-cell.-current- { font-weight: 700; }
.date-shown { cursor: pointer; }
.air-datepicker--pointer { display: none; }
.air-datepicker-body--day-name { text-transform: none; }
.air-datepicker--buttons { padding: 0 4px 4px; border-top: 0; }
.air-datepicker--buttons .air-datepicker-buttons { display: flex; justify-content: flex-end; }
.air-datepicker-button.adp-today { flex: none; width: 2rem; height: 2rem; padding: 0; }
.air-datepicker-button.adp-today svg.i { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; }

@media (max-width: 640px) {
  .pswp__course { padding: 2.5rem 1rem calc(.9rem + env(safe-area-inset-bottom)); font-size: 1.12rem; }
  .pswp__course small { font-size: .78em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; pointer-events: auto; cursor: pointer; }
  .pswp__course.open small { display: block; }
  .pswp__course .credit { margin-top: .45rem; padding: .2rem .65rem .2rem .2rem; font-size: .75rem; }
  .pswp__course .credit .tag { font-size: 0; gap: 0; padding: .3rem; }
  .pswp__course .credit .tag .i { width: .8rem; height: .8rem; }
}

.play-badge { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 99px; background: rgb(0 0 0 / .5); color: #fff; pointer-events: none; }
.play-badge .i { width: 1.15rem; height: 1.15rem; margin-left: .15rem; }
.dishes button { position: relative; }
.pswp-video { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 60px 0 var(--cap, 0px); }
.pswp .pswp__course { pointer-events: none; }
.pswp-video video { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; }

.books { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "in st" "out out" "rec rec"; gap: 2.5rem 4rem; margin-top: 2.5rem; }
.books h2 { margin-bottom: 1rem; }
.b-in { grid-area: in; } .b-st { grid-area: st; } .expenses { grid-area: out; } .reconciliation { grid-area: rec; }
@media (max-width: 760px) { .books { grid-template-columns: 1fr; grid-template-areas: "in" "out" "rec" "st"; } }
.reconciliation { max-width: 34rem; }
.expenses th { font-size: .8rem; font-weight: 500; color: var(--muted); padding: 0 0 .4rem; }
.expenses th + th, .expenses .ledger td + td { padding-left: 1rem; }
.expenses tbody tr { cursor: pointer; }
.expenses tbody tr:hover td { background: var(--surface); }
.expenses td a { color: var(--ink); text-decoration: none; }
.expenses tfoot td { font-weight: 700; border-top-color: var(--ink); border-bottom: 3px double var(--ink); }
@media (max-width: 640px) {
  .expenses th + th, .expenses .ledger td + td { padding-left: .75rem; }
  .expenses .ledger tr > :nth-child(2) { padding-left: 0; }
  .expenses td { white-space: normal; }
  .expenses .num { white-space: nowrap; }
  .expenses .sub { display: block; margin-top: .1rem; font-size: .8rem; font-weight: 400; color: var(--muted); }
}
.cards + .map-section { margin-top: 2.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.card:hover { border-color: var(--accent); }
.card-logo { display: grid; place-items: center; aspect-ratio: 1.7; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
.card-logo img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.card-logo .initial { font-size: 3rem; }
.card-text { display: flex; flex-direction: column; padding: 1rem .85rem .85rem; }
.card-text strong { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.card-meta { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; margin-top: .25rem; font-size: .875rem; color: var(--muted); }
.card-meta .photos, .card-meta .tag { margin: 0; }
@media (max-width: 640px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .card-text { padding: .75rem .7rem .7rem; }
  .card-text strong { font-size: 1.05rem; }
  .card-meta { font-size: .8rem; }
}
@media (hover: hover) { .strip { cursor: grab; } .strip.dragging { cursor: grabbing; scroll-snap-type: none; } .strip.dragging a { pointer-events: none; } }

main h1 .query { color: var(--muted); }
[data-action=open-search] { display: none; }
@media (max-width: 640px) {
  [data-action=open-search] { display: grid; }
  .dish-search-form:not(.open) { display: none; }
  .search-go { display: none; }
  .dish-search-form { max-width: none; }
}

.menu-card { --paper: #fbf9f4; --paper-line: #e6dfd1; --grain: .05;
  position: relative; padding: 2rem 2.25rem 1.8rem; border: 1px solid var(--paper-line); border-radius: 3px;
  background: color-mix(in srgb, var(--paper) 90%, var(--bg)); box-shadow: 0 1px 2px rgb(60 45 20 / .06), 0 10px 28px -16px rgb(60 45 20 / .28); }
.menu-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: var(--grain);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.menu-card::after { content: ''; position: absolute; inset: 7px; border: 1px solid var(--paper-line); pointer-events: none; }
.menu-card h2 { margin: 0 0 1rem; text-align: center; font-style: italic; font-weight: 500; font-size: 1.5rem; }
.menu-card h2::after { content: ''; display: block; width: 2.5rem; margin: .7rem auto 0; border-top: 1px solid var(--paper-line); }
@media (prefers-color-scheme: dark) {
  .menu-card { --paper: #2b2722; --paper-line: #463e33; --grain: .08; box-shadow: 0 10px 28px -16px rgb(0 0 0 / .6); }
}
@media (max-width: 640px) { .menu-card { padding: 1.6rem 1.4rem 1.4rem; } }
