/* Kleidagboek — kleuren en lettertypes volgens het design. */
:root {
    --bg: #ede8e1;
    --surface: #f6f4f0;
    --tile: #e4ddd1;
    --line: #ddd6cc;
    --field-line: #c4bcb1;
    --ink: #2a2723;
    --muted: #6b645c;
    --teal: #2d5f5a;
    --teal-dark: #224a46;
    --rust: #a6502f;
    --peach: #f0e2d8;
    --danger: #a3372a;
    --radius: 12px;
    --radius-sm: 6px;
    --serif: "Fraunces", Georgia, serif;
    --sans: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); min-height: 100vh; }
img { max-width: 100%; display: block; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .35em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.35rem; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-weight: 400; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 68px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.55rem; color: var(--teal); text-decoration: none; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 4px 34px; flex-wrap: wrap; }
.nav form { margin: 0; }
.nav a, .nav button {
    position: relative; display: inline-block; padding: 20px 0;
    color: var(--ink); text-decoration: none; font: 500 1.05rem var(--sans);
    background: none; border: 0; cursor: pointer;
}
.nav .nav-muted { color: var(--muted); }
.nav a:hover, .nav button:hover { color: var(--teal); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 2px; background: var(--teal); }
@media (max-width: 640px) {
    .nav { gap: 0 20px; }
    .nav a, .nav button { padding: 10px 0 14px; font-size: .98rem; }
    .nav a[aria-current="page"]::after { bottom: 6px; }
}

main { padding-top: 56px; padding-bottom: 80px; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--teal); color: #fff; border: 1.5px solid var(--teal);
    padding: 10px 21px; border-radius: var(--radius-sm);
    font: 700 1rem var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn-outline { background: transparent; color: var(--teal); }
.btn-outline:hover { background: var(--surface); color: var(--teal-dark); }
.btn-large { padding: 14px 30px; font-size: 1.15rem; }
.btn-block { width: 100%; padding: 15px; font-size: 1.15rem; }
.button-row { display: flex; gap: 6px 6px; flex-wrap: wrap; align-items: center; }
.button-row form { margin: 0; }
.proud-toggle.is-on { background: var(--rust); border-color: var(--rust); color: #fff; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; }
.link-danger { color: var(--danger); font-size: .9rem; }
.link:hover { text-decoration: underline; }

.badge { display: inline-block; background: var(--rust); color: #fff; font-weight: 700; font-size: .85rem; line-height: 1; padding: 6px 11px; border-radius: 999px; white-space: nowrap; }

/* ---------- messages ---------- */
.flash { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--teal); padding: 12px 16px; border-radius: var(--radius-sm); margin: -24px 0 32px; }
.errors { background: #f6dfd9; color: var(--danger); border-radius: var(--radius-sm); padding: 12px 16px 12px 34px; margin: 0 0 20px; }
p.errors { padding-left: 16px; }

/* ---------- shared surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tile { background: var(--tile); display: grid; place-items: center; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.art { width: 58%; height: 58%; }
.empty { text-align: center; padding: 56px 16px; background: var(--surface); border: 1px dashed var(--field-line); border-radius: var(--radius); }
.empty-page { max-width: 560px; margin: 0 auto; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-bottom: 64px; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .9rem; font-weight: 500; color: var(--muted); margin: 0 0 14px; }
.lede { font-size: 1.2rem; max-width: 520px; margin: 0 0 28px; }
.hero-art { aspect-ratio: 6 / 5; border-radius: var(--radius); }
.hero-art .art { width: 64%; height: 64%; }
@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; gap: 32px; }
    .hero-art { aspect-ratio: 16 / 9; }
}
.section-sub { color: var(--muted); margin: 0 0 28px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgb(42 39 35 / .08); }
.card-media { position: relative; aspect-ratio: 19 / 10; }
.card-media .art { width: 44%; height: 70%; }
.card-media .badge, .gallery-main .badge { position: absolute; top: 14px; left: 14px; }
.card-body { padding: 16px 20px 22px; }
.card-body h3 { font-size: 1.5rem; margin-bottom: 8px; }
.card-body p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ---------- overzicht ---------- */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 36px; }
.page-head h1 { margin: 0; }
.page-head .eyebrow { margin-bottom: 8px; }
.chips { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.chip { padding: 12px 24px; border: 1px solid var(--field-line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 1.15rem; line-height: 1.2; }
.chip:hover { border-color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.table-panel { overflow: hidden; }
.pieces { width: 100%; border-collapse: collapse; font-size: 1.15rem; }
.pieces th { text-align: left; font: 700 .9rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 22px 16px 18px; border-bottom: 1px solid var(--line); }
.pieces td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pieces tbody tr:last-child td { border-bottom: 0; }
.pieces tbody tr { position: relative; }
.pieces tbody tr:hover { background: #f1eee8; }
.pieces th:first-child, .pieces td:first-child { padding-left: 24px; width: 108px; }
.cell-title a { color: var(--ink); font-weight: 700; text-decoration: none; }
.cell-title a::after { content: ""; position: absolute; inset: 0; }
.cell-date { color: var(--muted); white-space: nowrap; }
.cell-badge { text-align: right; padding-right: 64px !important; width: 1%; }
.thumb { width: 66px; height: 66px; border-radius: 8px; }
.thumb .art { width: 64%; height: 64%; }
@media (max-width: 860px) {
    .pieces, .pieces tbody { display: block; font-size: 1rem; }
    .pieces thead { display: none; }
    .pieces tr { display: grid; grid-template-columns: 66px 1fr auto; gap: 2px 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
    .pieces tbody tr:last-child { border-bottom: 0; }
    .pieces td { padding: 0 !important; border: 0; width: auto !important; }
    .pieces .cell-thumb { grid-row: 1 / span 3; }
    .pieces .cell-title, .pieces .cell-technique, .pieces .cell-status { grid-column: 2; }
    .pieces .cell-technique, .pieces .cell-status { color: var(--muted); font-size: .92rem; }
    .pieces .cell-date { grid-column: 3; grid-row: 2; font-size: .88rem; text-align: right; }
    .pieces .cell-badge { grid-column: 3; grid-row: 1; }
    .chip { padding: 9px 18px; font-size: 1rem; }
}

/* ---------- formulieren ---------- */
.narrow { max-width: 740px; margin: 0 auto; }
.form-head { margin-bottom: 24px; }
.form-head h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 6px; }
.form-head p { margin: 0; font-size: .95rem; }
.form { display: grid; gap: 18px; }
.form label, .field-label { display: grid; gap: 8px; font-weight: 700; font-size: .9rem; }
.form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 26px 24px; gap: 20px 18px; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid h3 { margin: 0; }
.full { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; }
@media (max-width: 640px) { .form-grid, .form-grid-2 { grid-template-columns: 1fr; padding: 20px 16px; } }

input, select, textarea {
    width: 100%; font: 400 1rem var(--sans); color: var(--ink);
    background: #fff; border: 1px solid var(--field-line); border-radius: var(--radius-sm); padding: 9px 11px;
}
textarea { resize: vertical; min-height: 72px; }
input::placeholder, textarea::placeholder { color: #8b847b; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }

.dropzone { display: grid !important; place-items: center; min-height: 86px; background: #fff; border: 1px dashed var(--field-line); border-radius: var(--radius-sm); color: var(--teal); cursor: pointer; position: relative; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--teal); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-edit { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.photo-edit img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 4px; }
.form label.check { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: .85rem; }
.check input { width: auto; }

.proud-check { display: flex !important; align-items: center; gap: 14px !important; background: var(--peach); border-radius: 8px; padding: 18px; font-weight: 400 !important; font-size: 1rem !important; cursor: pointer; }
.proud-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--rust); }

/* ---------- inloggen ---------- */
body.bare main { padding-top: 88px; }
.auth { max-width: 630px; margin: 0 auto; padding: 54px; }
.auth h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin: 0 0 6px; }
.auth > .muted { font-size: 1.2rem; margin: 0 0 36px; }
.auth .form { gap: 22px; }
.auth .form label { font-size: 1.12rem; gap: 10px; }
.auth input { padding: 18px 14px; border-color: #9c948a; border-radius: 8px; }
.auth .btn { border-radius: 8px; }
.auth-brand { display: flex; align-items: center; gap: 18px; margin-bottom: 40px; font: 600 1.85rem var(--serif); color: var(--teal); text-decoration: none; }
.auth-brand .tile { width: 84px; height: 84px; border-radius: 14px; }
.auth-brand .art { width: 60%; height: 60%; }
.auth-foot { text-align: center; color: var(--muted); font-size: 1.12rem; margin: 26px 0 0; }
.auth-foot a { font-weight: 700; }
@media (max-width: 640px) { .auth { padding: 32px 20px; } body.bare main { padding-top: 32px; } }

/* ---------- werkstuk ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; margin-bottom: 64px; align-items: start; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.gallery-main { position: relative; aspect-ratio: 5 / 4; border-radius: var(--radius); }
.specs-panel { padding: 8px 24px 20px; }
.specs-panel h3 { font-size: 1.15rem; margin: 22px 0 6px; }
.specs-panel p { margin: 0; }
.specs { margin: 0; }
.specs div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 500; }

.narrow-left { max-width: 740px; }
.timeline { list-style: none; margin: 8px 0 36px; padding: 0 0 0 26px; border-left: 2px solid var(--tile); }
.timeline li { position: relative; padding: 0 0 26px 6px; }
.timeline li::before { content: ""; position: absolute; left: -34px; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--teal); border: 3px solid var(--bg); }
.tl-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tl-head time { font-weight: 700; }
.tl-head form { margin: 0 0 0 auto; }
.timeline p { margin: 4px 0 0; }
.tl-photo { margin-top: 12px; max-width: 280px; border-radius: 8px; }
.danger-zone { margin-top: 28px; }

.phases { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; margin: -32px 0 64px; align-items: start; }
@media (max-width: 640px) { .phases { grid-template-columns: 1fr; } }
.phase { padding: 22px 24px; }
.phase h2 { font-size: 1.5rem; margin-bottom: 4px; }
.phase .specs div:last-child { border-bottom: 0; }
.coat-view { border-bottom: 1px solid var(--line); padding: 8px 0; }
.coat-view h3 { font-size: 1.1rem; margin: 10px 0 0; }
.photo-strip { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- zoeken ---------- */
.search { position: relative; display: flex; gap: 8px; max-width: 720px; margin: -12px 0 20px; }
.search svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding: 12px 14px 12px 46px; font-size: 1.05rem; border-radius: 999px; }
.search .btn { border-radius: 999px; }
.search-result { margin: -16px 0 24px; color: var(--muted); }

/* ---------- werkstukformulier met tabbladen ---------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.piece-form .panel { padding: 26px 24px; margin-bottom: 16px; }
.piece-form .form-grid { padding: 0; }
.tabs { display: none; }
.js .tabs {
    position: relative; display: flex; overflow-x: auto; scrollbar-width: none;
    margin: 0 0 20px; border-bottom: 1px solid var(--line);
}
.js .tabs::-webkit-scrollbar { display: none; }
.tabs button {
    flex: 1 0 auto; padding: 14px 22px; background: none; border: 0; border-bottom: 3px solid transparent;
    font: 600 1.15rem var(--serif); color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.js .tab-panel:not(.is-active) { display: none; }
.js .tab-title { display: none; }
.tab-title { font-size: 1.5rem; }

.unit-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 400; font-size: 1rem; color: var(--ink); }
.unit-field input { width: 120px; }
.check-row { display: flex !important; align-items: center; gap: 12px !important; font-weight: 400 !important; font-size: 1rem !important; cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin: 0; accent-color: var(--teal); }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.choices-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { position: relative; display: block !important; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 10px 14px;
    background: #fff; border: 1.5px solid var(--line); border-radius: 10px; text-align: center;
    font: 600 1.02rem var(--serif); color: #a39b91; transition: border-color .12s, color .12s;
}
.choice svg { width: 26px; height: 26px; flex: none; }
.choice:hover span { border-color: var(--field-line); color: var(--muted); }
.choice input:checked + span { border: 2px solid var(--ink); color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }

.coats { display: grid; gap: 16px; }
.coat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.coat-title { font-size: 1.15rem; margin: 0 0 14px; }
.btn-dark { background: var(--ink); border-color: var(--ink); border-radius: 999px; }
.btn-dark:hover { background: #000; border-color: #000; }
.btn-ghost-danger { background: #fff; border-color: var(--line); color: var(--danger); border-radius: 999px; font-size: 1rem; padding: 12px; }
.btn-ghost-danger:hover { background: #fbeeea; border-color: #f0cfc7; }

.photo-row { display: flex; gap: 12px; flex-wrap: wrap; }
.photo-add, .photo-thumb { position: relative; width: 104px; height: 104px; border-radius: 10px; overflow: hidden; cursor: pointer; display: block !important; }
.photo-add { background: #fff; border: 1.5px solid var(--line); display: grid !important; place-items: center; align-content: center; color: var(--ink); }
.photo-add:hover { border-color: var(--teal); color: var(--teal); }
.photo-add > span[aria-hidden] { font: 300 2.6rem/1 var(--sans); }
.photo-add small { font-size: .78rem; color: var(--teal); font-weight: 700; }
.photo-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; border: 1.5px solid var(--line); border-radius: 10px; }
.photo-thumb input { position: absolute; opacity: 0; }
.photo-remove { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgb(255 255 255 / .9); color: var(--ink); font-size: .8rem; }
.photo-thumb input:checked ~ .photo-remove { background: var(--danger); color: #fff; }
.photo-thumb:has(input:checked) img { opacity: .35; }
.photo-thumb input:focus-visible ~ .photo-remove { outline: 2px solid var(--teal); }

/* ---------- delen & reacties ---------- */
.small { font-size: .88rem; }
.section-title { font-size: 1.6rem; margin-top: 40px; }
.settings-block { padding: 24px; margin-bottom: 16px; }
.settings-block h2 { font-size: 1.4rem; }
.share-add { display: flex; gap: 8px; margin: 12px 0 16px; flex-wrap: wrap; }
.share-add input { flex: 1 1 220px; width: auto; }
.share-list { list-style: none; margin: 0 0 12px; padding: 0; }
.share-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.share-list li > span { display: grid; min-width: 0; overflow-wrap: anywhere; }
.share-list form { margin: 0; }

.people { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.person { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--ink); text-decoration: none; }
.person:hover { border-color: var(--teal); }
.person > span:last-child { display: grid; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tile); color: var(--teal); font: 600 1.1rem var(--serif); }
.cell-maker, .comment-count { display: block; font-size: .85rem; color: var(--muted); font-weight: 400; }
.comment-count { color: var(--teal); }

.comments { list-style: none; margin: 8px 0 24px; padding: 0; display: grid; gap: 12px; }
.comment { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comment-head .avatar { width: 32px; height: 32px; font-size: .95rem; }
.comment-head form { margin: 0 0 0 auto; }
.comment-kind { font-size: .82rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--tile); }
.comment-succes .comment-kind { background: #dcebe5; color: var(--teal); }
.comment p { margin: 8px 0 0; }
.comment-form { padding: 20px; margin-bottom: 24px; }

/* ---------- mobiel: tabbalk onderin (als webapp) ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
    body.has-tabbar .nav { display: none; }
    body.has-tabbar .header-inner { min-height: 56px; justify-content: center; }
    .site-header { padding-top: env(safe-area-inset-top); }
    body.has-tabbar main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
    main { padding-top: 28px; }
    .tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
        display: grid; grid-template-columns: repeat(5, 1fr);
        background: var(--surface); border-top: 1px solid var(--line);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }
    .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 4px 0; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 500; }
    .tabbar svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .tabbar a[aria-current="page"] { color: var(--teal); }
    .tabbar a[aria-current="page"] svg { stroke-width: 2.1; }
    .tabbar .tab-new svg { color: #fff; fill: var(--teal); stroke: #fff; width: 30px; height: 30px; margin-top: -3px; }
    .page-head .btn-large { display: none; }
    .flash { margin-top: -8px; }
}
@media (display-mode: standalone) {
    /* Als app op het beginscherm: geen tekstselectie bij lang drukken op knoppen en menu. */
    .tabbar, .btn, .chip, .tabs { -webkit-user-select: none; user-select: none; }
}

.install-hint {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
    background: var(--ink); color: #fff; border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / .2);
}
.has-tabbar .install-hint { bottom: calc(76px + env(safe-area-inset-bottom)); }
.install-hint p { margin: 0; font-size: .95rem; }
.install-hint svg { width: 18px; height: 18px; vertical-align: -3px; }
.install-hint .link { color: #fff; margin-left: auto; font-size: 1.1rem; }

.save-bar {
    position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px;
    margin: 0 -8px; padding: 14px 8px; background: linear-gradient(to top, var(--bg) 70%, transparent);
}
@media (max-width: 760px) {
    /* Opslaan-balk boven de tabbalk houden. */
    .has-tabbar .save-bar { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ---------- materialen ---------- */
.material-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.material-grid .card-media { aspect-ratio: 4 / 3; }
.material-grid .card-body h3 { font-size: 1.3rem; }
.material-initial { font: 600 3.4rem var(--serif); color: var(--teal); opacity: .55; }
.gallery-main .material-initial { font-size: 6rem; }

.material-preview { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: .88rem; color: var(--teal); }
.material-preview.is-new { color: var(--muted); }
.material-preview img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.material-link { display: inline-flex; align-items: center; gap: 10px; color: var(--teal); font-weight: 600; text-decoration: none; }
.material-link:hover span { text-decoration: underline; }
.material-link img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
h3 .material-link { font: inherit; color: inherit; }
h3 .material-link img { width: 40px; height: 40px; }

/* ---------- Botz-catalogus ---------- */
.catalog-series { margin-bottom: 28px; }
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.catalog-head h2 { font-size: 1.4rem; }
.catalog-head h2 .muted { font: 400 .95rem var(--sans); margin-left: 6px; }
.catalog-head form { margin: 0; }
.catalog-head .link { color: var(--teal); font-weight: 600; }
.catalog-list { list-style: none; margin: 8px 0 0; padding: 0; }
.catalog-list li { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.catalog-list li:last-child { border-bottom: 0; }
.catalog-list li:target { background: #eef5f3; }
.catalog-list form { margin: 0; }
.catalog-code { font-weight: 700; color: var(--teal); font-variant-numeric: tabular-nums; }
.catalog-name { display: grid; line-height: 1.3; }
.catalog-name .muted { font-size: .88rem; }
.catalog-owned { font-size: .88rem; color: var(--teal); font-weight: 600; white-space: nowrap; }
