/* Vinnotat: skjema og ferdig side. Alltid hvit bakgrunn (ingen mørk modus). */
:root{color-scheme:light;--bg:#fff;--fg:#222;--muted:#666;--accent:#7a1f3d;--line:#e3ddd5;--card:#fff;--ok:#1f6b3a;--warn:#7a5a00;--err:#8a1f1f}

/* ---------- ferdig notat ---------- */
body.note-page{margin:0;background:#fff;color:var(--fg);font:17px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}
body.note-page.embed{background:transparent}
.note{max-width:62rem;margin:0 auto;padding:1.5rem 1rem 2rem}
.note-head .cat{margin:0;text-transform:uppercase;letter-spacing:.08em;font-size:.85rem;color:var(--muted)}
.note-head h1{margin:.2rem 0;font-size:1.9rem;line-height:1.2}
.note-head .pid{margin:.1rem 0 0;color:var(--muted)}

/* score med signatur til høyre. De to signaturlinjene er mindre enn scoren, så de ikke blir høyere enn den */
.scorerow{display:flex;align-items:center;gap:1rem;margin:1.6rem 0 1.8rem}
.score{flex:none;width:4.6rem;height:4.6rem;border-radius:50%;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:2.2rem;line-height:1}
.byline{display:flex;flex-direction:column;justify-content:center;font-size:.95rem;line-height:1.35;color:var(--fg)}
.byline span:last-child{color:var(--muted)}

/* tekst + faktaboks til venstre, bilde til høyre */
.note-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,300px);gap:2.5rem;align-items:start}
.note h2{font-size:1.15rem;margin:0 0 .5rem;border-bottom:2px solid var(--accent);padding-bottom:.2rem}
.note h3{font-size:1rem;margin:1rem 0 .4rem}
.text p{margin:0 0 .8rem}
.main .factbox{margin-top:2.2rem}                         /* luft mellom teksten og faktaboksen */
.wine-img{display:block;width:auto;height:auto;max-width:100%;max-height:300px;margin:0 auto 1rem;background:#fff}
.chips{list-style:none;display:flex;flex-wrap:wrap;gap:.4rem;padding:0;margin:0 0 .5rem}
.chips li{background:#fff;border:1px solid var(--line);border-radius:999px;padding:.1rem .7rem;font-size:.9rem}
.pairing h3{margin-top:0}
.factbox{background:#fff;border:1px solid var(--line);border-radius:.5rem;padding:1rem 1.2rem}
.facts{columns:2;column-gap:2rem;margin:0}
.fact-item{display:flex;gap:.5rem;break-inside:avoid;padding:.25rem 0;border-bottom:1px dotted var(--line)}
.fact-item dt{font-weight:600;min-width:6.4rem}
.fact-item dd{margin:0;overflow-wrap:anywhere}

/* Se på polet: firkantet, hvit knapp med kantlinje og tekst i scorens farge */
.polet-btn{display:block;margin-top:1rem;padding:.75rem 1rem;text-align:center;border:2px solid var(--accent);border-radius:0;background:#fff;color:var(--accent)!important;font-weight:700;text-decoration:none}
.polet-btn:hover{background:#faf1f4}
.polet-btn[hidden]{display:none}

/* tidligere smaksnotater */
.previous{margin-top:2rem}
.previous ul{list-style:none;margin:0;padding:0}
.previous li{margin:.3rem 0}
.previous a{display:flex;align-items:center;gap:.8rem;text-decoration:none;color:var(--fg)}
.previous a:hover .prev-title{text-decoration:underline}
.mini-score{flex:none;width:2.2rem;height:2.2rem;border-radius:50%;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.95rem}

.note-foot{display:flex;justify-content:space-between;margin-top:1.5rem;color:var(--muted);font-size:.85rem}
.note-foot a,.note a{color:var(--accent)}
.note a.polet-btn{color:var(--accent)}
@media (max-width:42rem){.note-grid{grid-template-columns:1fr}.facts{columns:1}.side{order:2}}
@media print{.staffbar,.note-foot a{display:none}.score,.mini-score{-webkit-print-color-adjust:exact;print-color-adjust:exact}.factbox{break-inside:avoid}}

/* ---------- skjema og liste (inne i base.html) ---------- */
.form-title{margin:.3rem 0 1rem}
.note-form .row{margin-bottom:1rem}
.note-form label{display:block;font-weight:600;margin-bottom:.25rem}
.note-form label small,.factbox h2 small{font-weight:400;color:var(--muted)}
.note-form input[type=text],.note-form select,.note-form textarea{width:100%;padding:.6rem .7rem;font:inherit;border:1px solid var(--line);border-radius:.4rem;background:#fff;color:var(--fg)}
.note-form input.big{font-size:1.25rem;font-weight:600}
.with-button{display:flex;gap:.5rem}
.with-button.narrow{max-width:24rem}
.note-form button,.btn{padding:.6rem 1rem;border:0;border-radius:.4rem;background:var(--accent);color:#fff;font:inherit;cursor:pointer;text-decoration:none;display:inline-block}
.note-form button.primary{padding:.8rem 1.6rem;font-weight:600}
.score-row{display:flex;align-items:center;gap:1.2rem;margin-top:2rem;margin-bottom:2rem}
.score-field{flex:none}
.score-field select{width:7.5rem;font-size:1.6rem;font-weight:700;padding:.5rem .6rem}
.form-byline{align-self:flex-end;padding-bottom:.3rem}
.note-form textarea#note{overflow:hidden;resize:none;min-height:6.5rem;line-height:1.5}
.note-form .main .factbox{margin-top:2.2rem}
.img-box{min-height:3rem;margin-bottom:1rem}
.img-box{text-align:center}
.img-box img{display:inline-block;width:auto;height:auto;max-width:100%;max-height:300px;background:#fff}
.hint{color:var(--muted);font-size:.85rem;margin:.3rem 0}
details.multi{border:1px solid var(--line);border-radius:.4rem;background:#fff;margin-bottom:.5rem}
details.multi summary{padding:.6rem .7rem;cursor:pointer;list-style:none}
details.multi summary::after{content:"▾";float:right}
details.multi .options{border-top:1px solid var(--line);padding:.5rem .7rem;display:grid;grid-template-columns:1fr 1fr;gap:.2rem .8rem}
label.check{display:flex;align-items:center;gap:.4rem;font-weight:400;margin:0}
.note-form .factbox{padding:1rem 1.2rem}
.fact-grid{display:grid;grid-template-columns:1fr 1fr;gap:.6rem 1.2rem}
.fact label{font-size:.85rem;color:var(--muted);font-weight:600}
.actions{display:flex;justify-content:space-between;align-items:center;margin-top:1.5rem}
.msg{padding:.6rem .9rem;border-radius:.4rem;margin:.6rem 0;border:1px solid var(--line);background:#fff}
.msg.ok{color:var(--ok)}.msg.warn{color:var(--warn)}.msg.err{color:var(--err)}
.msg ul{margin:.3rem 0 0 1.2rem;padding:0}
.list-head{display:flex;justify-content:space-between;align-items:center}
ul.notes{list-style:none;padding:0;margin:1rem 0}
ul.notes li{display:flex;gap:1rem;align-items:center;padding:.7rem .8rem;margin:.4rem 0;background:#fff;border:1px solid var(--line);border-radius:.5rem}
.score-badge{flex:none;width:2.8rem;height:2.8rem;border-radius:50%;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700}
.grow{flex:1;min-width:0}
.meta{color:var(--muted);font-size:.85rem}
.meta.url{overflow-wrap:anywhere}
.row-actions{display:flex;gap:1rem;align-items:center}
button.link{background:none;border:0;padding:0;cursor:pointer;font:inherit;color:var(--accent);text-decoration:underline}
button.link.danger{color:var(--err)}
.staffbar{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.5rem;padding:.5rem 1rem;background:#fff;border-bottom:1px solid var(--line);font-size:.85rem}
.staffbar code{overflow-wrap:anywhere}
@media (max-width:42rem){.note-form .note-grid,.fact-grid{grid-template-columns:1fr}.score-row{flex-wrap:wrap}}

/* hovedmeny (felles for /vin/ og notatsidene): logo til venstre, lenker midtstilt */
.sitemenu { background: var(--accent); width: 100%; }
.menu-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.sitemenu .logo { justify-self: start; display: block; padding: 0; line-height: 0; margin: 0; }
.sitemenu .logo img { height: 68px; width: auto; display: block; }
.sitemenu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.sitemenu li a { display: block; padding: 18px 14px; color: #fff; text-decoration: none; font-weight: 600; }
.sitemenu li a:hover, .sitemenu li a[aria-current] { text-decoration: underline; }
@media (max-width: 680px) {
  .menu-inner { grid-template-columns: 1fr; justify-items: center; }
  .sitemenu .logo { justify-self: center; padding-top: 8px; }
  .menu-spacer { display: none; }
  .sitemenu li a { padding: 10px 12px; }
}
body.embed .sitemenu { display: none; }
