/* Fuku Bakehouse: placeholder design. Colours live in variables so the real design can replace them easily. */
:root {
    --dough: #F9D9A8;
    --dough-light: #FDF0DC;
    --crust: #E9B571;
    --sakura: #F4A7B9;
    --sakura-dark: #E07A93;
    --sakura-light: #FDE7EC;
    --cocoa: #6B4226;
    --cocoa-soft: #8C6A54;
    --cream: #FFF9F1;
    --white: #FFFFFF;
    --line: #EEDFCB;
    --danger: #B3261E;
    --ok: #2E7D4F;
    --radius: 18px;
    --shadow: 0 6px 24px rgba(107, 66, 38, 0.10);
    --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--cocoa);
    background: var(--cream);
    line-height: 1.5;
}
a { color: var(--sakura-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
img { max-width: 100%; }
.muted { color: var(--cocoa-soft); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* ---------- buttons & forms ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4em;
    padding: .7em 1.3em; border: 0; border-radius: 999px; cursor: pointer;
    font: inherit; font-weight: 700; text-decoration: none;
    background: var(--cocoa); color: var(--white);
    transition: transform .08s ease, background .2s ease;
}
.btn:hover { background: #57351E; }
.btn:active { transform: translateY(1px); }
.btn-pink { background: var(--sakura); color: var(--cocoa); }
.btn-pink:hover { background: var(--sakura-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--cocoa); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { background: var(--dough-light); }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 2px #F3C7C3; }
.btn-danger:hover { background: #FDECEA; }
.btn-small { padding: .4em .9em; font-size: .875rem; }
.btn-block { width: 100%; }
/* A button whose form is on its way to the server (public/js/admin-forms.js). */
.is-busy { opacity: .65; pointer-events: none; }

label { font-weight: 700; display: block; margin-bottom: .3em; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
    width: 100%; padding: .65em .8em; font: inherit; color: var(--cocoa);
    background: var(--white); border: 2px solid var(--line); border-radius: 12px;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 3px solid var(--sakura); outline-offset: 1px; }
textarea { resize: vertical; min-height: 9em; }
.field { margin-bottom: 1rem; }
.error { color: var(--danger); font-size: .9rem; margin-top: .3em; }
.checkbox { display: flex; align-items: center; gap: .5em; font-weight: 400; }

.alert { padding: .8em 1em; border-radius: 12px; margin-bottom: 1rem; }
.alert-ok { background: #E6F4EC; color: var(--ok); }
.alert-error { background: #FDECEA; color: var(--danger); }

/* ---------- public pages (mobile first) ---------- */
.public { min-height: 100vh; display: flex; justify-content: center; padding: 1.25rem; }
.public-card {
    width: 100%; max-width: 30rem; align-self: flex-start; margin-top: 4vh;
    background: var(--white); border-radius: 28px; box-shadow: var(--shadow);
    padding: 1.75rem 1.5rem 1.5rem; text-align: center;
}
.public-card .logo { width: 96px; height: auto; display: block; margin: -0.5rem auto .25rem; }
.brand { font-weight: 800; letter-spacing: .02em; color: var(--cocoa-soft); margin-bottom: 1rem; }
.public-card h1 { font-size: 1.6rem; }
.badge-soon {
    display: inline-block; margin-bottom: .75rem; padding: .25rem .8rem; border-radius: 999px;
    background: var(--sakura-light); color: var(--sakura-dark); font-weight: 700; font-size: .85rem; letter-spacing: .03em;
}
.public-card form { text-align: left; margin-top: 1.25rem; }
.privacy { margin-top: 1rem; font-size: .85rem; color: var(--cocoa-soft); text-align: center; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* CSS-only star rating: radios in reverse order so "~" can highlight the lower stars */
.stars { border: 0; padding: 0; margin: 0 0 1rem; text-align: center; }
.stars legend { font-weight: 700; margin: 0 auto .4rem; }
.stars-row { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.stars-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-row label {
    font-size: 2.6rem; line-height: 1; cursor: pointer; margin: 0; font-weight: 400;
    color: var(--line); transition: transform .1s ease, color .15s ease;
}
.stars-row label:hover, .stars-row label:hover ~ label,
.stars-row input:checked ~ label { color: var(--crust); }
.stars-row input:focus-visible + label { outline: 3px solid var(--sakura); border-radius: 8px; }
.stars-row label:active { transform: scale(1.15); }
.counter { text-align: right; font-size: .8rem; color: var(--cocoa-soft); }

/* Guest feedback: one star question per screen (JS adds .stepper; without JS all steps show stacked) */
.public-card-compact { margin-top: 0; padding-top: 1.25rem; }
.public-card-compact .logo { width: 64px; margin-top: -.25rem; }
.public-card-compact .brand { margin-bottom: .5rem; }
.public-card-compact h1 { font-size: 1.3rem; margin-bottom: 0; }
.js-only { display: none; }
.stepper .js-only { display: flex; }
.stepper .step { display: none; }
.stepper .step.is-current { display: block; animation: step-in .2s ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.step { padding: 1rem 0; border-bottom: 2px dashed var(--line); }
.step:last-child, .stepper .step { border-bottom: 0; }
.step-question { display: block; font-size: 1.35rem; font-weight: 800; line-height: 1.3; margin: .5rem auto 1rem; text-align: center; }
.step-hint { font-size: .9rem; color: var(--cocoa-soft); text-align: center; margin: -.5rem 0 .75rem; }
.step .stars legend.step-question { font-size: 1.35rem; font-weight: 800; margin: .5rem auto 1rem; }
.step .stars-row label { font-size: clamp(2.4rem, 12vw, 3.2rem); padding: 0 .1rem; -webkit-tap-highlight-color: transparent; }
.star-caption { min-height: 1.6em; margin-top: .4rem; font-weight: 700; color: var(--sakura-dark); }
/* "Just right" questions: five dots from the low end to the high end; the bigger middle one is just right. */
.jar-row { display: flex; justify-content: space-between; align-items: center; max-width: 20rem; margin: .3rem auto 0; }
.jar-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.jar-row label { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 3px solid var(--line); background: var(--white); cursor: pointer;
    transition: transform .1s ease, background .15s ease, border-color .15s ease; -webkit-tap-highlight-color: transparent; }
.jar-row label.jar-mid { width: 3.2rem; height: 3.2rem; border-color: var(--crust); }
.jar-row label:hover { border-color: var(--sakura); }
.jar-row input:checked + label { background: var(--sakura); border-color: var(--sakura-dark); }
.jar-row input:focus-visible + label { outline: 3px solid var(--sakura); outline-offset: 2px; }
.jar-row label:active { transform: scale(1.1); }
.jar-ends { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; max-width: 21rem; margin: .5rem auto 0; font-size: .85rem; color: var(--cocoa-soft); }
.jar-ends span:first-child { text-align: left; }
.jar-ends span:nth-child(2) { font-weight: 700; color: var(--cocoa); }
.jar-ends span:last-child { text-align: right; }
.step textarea { min-height: 4.5em; }
.step .counter { margin-bottom: .6rem; }
.step-foot { display: flex; align-items: center; gap: .75rem; margin-top: .5rem; }
.step-foot .privacy { margin: 0 0 0 auto; text-align: right; font-size: .78rem; line-height: 1.3; }
.step-progress { flex-direction: column; align-items: center; gap: .3rem; margin-bottom: .25rem; }
.step-progress-bar { width: 100%; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.step-progress-bar span { display: block; height: 100%; width: 0; background: var(--sakura); transition: width .25s ease; }
.step-progress-text { font-size: .8rem; color: var(--cocoa-soft); }
.step-nav { justify-content: space-between; margin-top: 1rem; }
.step-nav [data-next] { margin-left: auto; }
.link-btn {
    background: none; border: 0; padding: .6rem .4rem; font: inherit; font-weight: 700;
    color: var(--cocoa-soft); cursor: pointer; border-radius: 10px; white-space: nowrap; flex: none;
}
.link-btn:focus-visible { outline: 3px solid var(--sakura); }

/* ---------- admin ---------- */
.admin-header {
    background: var(--white); border-bottom: 2px solid var(--line);
    position: sticky; top: 0; z-index: 10;
}
.admin-header .inner { max-width: 72rem; margin: 0 auto; padding: .6rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--cocoa); text-decoration: none; }
.admin-brand img { width: 40px; height: auto; }
.admin-nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.admin-nav a {
    padding: .45em .9em; border-radius: 999px; text-decoration: none; color: var(--cocoa); font-weight: 700;
}
.admin-nav a:hover { background: var(--dough-light); }
.admin-nav a.active { background: var(--sakura-light); }
.badge {
    display: inline-block; min-width: 1.5em; padding: 0 .45em; margin-left: .2em; border-radius: 999px;
    background: var(--sakura-dark); color: var(--white); font-size: .75rem; line-height: 1.5em; text-align: center;
}
.admin-user { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.admin-user form { margin: 0; }
.admin-main { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
.crumbs { font-size: .9rem; margin-bottom: .3rem; }
.crumbs a { color: var(--cocoa-soft); }

.panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.panel h2 { font-size: 1.15rem; }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.inline-form { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin: 0; flex: 1 1 10rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }


.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--cocoa-soft); }
table.list tr.unread td { background: #FFF6F8; }
table.list tr.unread td:first-child { box-shadow: inset 4px 0 0 var(--sakura-dark); }
table.list a.rowlink { color: var(--cocoa); text-decoration: none; font-weight: 700; }
table.list a.rowlink:hover { text-decoration: underline; }
.num { text-align: right !important; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.rating { color: var(--crust); letter-spacing: .05em; white-space: nowrap; }
.rating .off { color: var(--line); }
.pill { display: inline-block; padding: .1em .6em; border-radius: 999px; background: var(--dough-light); font-size: .8rem; font-weight: 700; }
.pill-pink { background: var(--sakura-light); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--cocoa-soft); }
.empty img { width: 90px; opacity: .85; }

.filters { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); align-items: end; }
.filters .field { margin: 0; }
.filters label { font-size: .8rem; }

.message { white-space: pre-wrap; font-size: 1.05rem; background: var(--dough-light); border-radius: 14px; padding: 1rem 1.1rem; }
.notes { list-style: none; padding: 0; margin: 0 0 1rem; }
.notes li { border-left: 4px solid var(--sakura); padding: .4rem .9rem; margin-bottom: .8rem; }
.notes .meta { font-size: .8rem; color: var(--cocoa-soft); }
.notes .body { white-space: pre-wrap; }

.pagination { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: 1rem; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-block; padding: .35em .8em; border-radius: 999px; text-decoration: none; color: var(--cocoa); box-shadow: inset 0 0 0 2px var(--line); }
.pagination .current { background: var(--cocoa); color: var(--white); box-shadow: none; }
.pagination .disabled { opacity: .45; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.login-wrap .public-card { margin-top: 0; }

details.edit summary { cursor: pointer; color: var(--sakura-dark); font-weight: 700; list-style: none; }
details.edit summary::-webkit-details-marker { display: none; }
details.edit[open] summary { margin-bottom: .6rem; }

.seq { font-size: .8em; color: var(--cocoa-soft); font-weight: 400; }

/* ---------- feedbacks UI ---------- */
.kicker { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--cocoa-soft); margin-bottom: .35rem; }
.chip { display: inline-flex; align-items: center; gap: .4em; margin-top: .75rem; padding: .2em .4em .2em .8em; border-radius: 999px; background: var(--sakura-light); font-size: .85rem; font-weight: 700; }
.chip a { text-decoration: none; color: var(--cocoa); padding: 0 .35em; }
.link-button { border: 0; background: none; padding: 0; font: inherit; color: var(--cocoa-soft); text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--danger); }
form.inline { display: inline; margin-left: .4rem; }

/* one line of numbers */
.statline { display: flex; flex-wrap: wrap; gap: .1rem .9rem; font-size: .85rem; color: var(--cocoa-soft); margin-top: .25rem; }
.statline .stars-avg { color: var(--cocoa); font-weight: 700; }
.statline .new { color: var(--sakura-dark); font-weight: 800; text-decoration: none; }
.statline .rating-big { font-size: 1.25rem; line-height: 1; }

/* "⋯" menus */
details.menu { position: relative; flex: none; }
details.menu > summary {
    list-style: none; cursor: pointer; width: 2rem; height: 2rem; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--cocoa-soft); user-select: none;
}
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary:hover, details.menu[open] > summary { background: var(--dough-light); color: var(--cocoa); }
.menu-pop {
    position: absolute; right: 0; top: calc(100% + .3rem); z-index: 30; min-width: 12rem; padding: .35rem;
    background: var(--white); border-radius: 12px; box-shadow: 0 10px 30px rgba(107, 66, 38, .18);
}
.menu-pop form { margin: 0; }
.menu-item {
    display: block; width: 100%; text-align: left; padding: .5rem .75rem; border: 0; border-radius: 8px;
    background: none; font: inherit; font-size: .9rem; color: var(--cocoa); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.menu-item:hover { background: var(--dough-light); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: #FDECEA; }
.menu-item.muted { color: var(--cocoa-soft); cursor: default; font-size: .82rem; white-space: normal; }
.menu-item.muted:hover { background: none; }

/* page sections */
.section-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.4rem 0 1.25rem; }
.section-nav a {
    font-size: .85rem; font-weight: 700; text-decoration: none; color: var(--cocoa-soft);
    padding: .25em .8em; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--line);
}
.section-nav a:hover { color: var(--cocoa); background: var(--white); }
.page-section { margin-bottom: 2.25rem; scroll-margin-top: 5rem; }
.section-h { font-size: 1.3rem; padding-bottom: .4rem; margin-bottom: .9rem; border-bottom: 2px solid var(--line); }
.section-h .muted { font-weight: 400; font-size: .85rem; margin-left: .4rem; }
.sub-h { font-size: 1rem; margin: 1.25rem 0 .6rem; }
.panel-dashed { background: transparent; box-shadow: none; border: 2px dashed var(--line); }
.alert-info { background: var(--dough-light); color: var(--cocoa); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { background: var(--white); box-shadow: var(--shadow); border-radius: 14px; padding: .8rem 1rem; }
.stat b { display: block; font-size: 1.5rem; }
.stat span { font-size: .85rem; color: var(--cocoa-soft); }
.stat-new b { color: var(--sakura-dark); }

.manage-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.manage-row form { margin: 0; }
.manage-row .inline-form { flex: 1 1 24rem; max-width: 36rem; }
.manage-row .inline-form .field { margin: 0; }
.danger-zone { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.version-manage textarea { min-height: 14em; font-size: .95rem; }
.version-manage .kicker a { color: inherit; }

/* version lists */
.version-list { list-style: none; padding: 0; margin: 0; }
.version-row { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; gap: .6rem; align-items: start; padding: .6rem .4rem; border-top: 1px solid var(--line); }
.version-row:first-child { border-top: 0; }
.version-row.is-current { background: var(--dough-light); border-radius: 12px; }
.vnum { font-weight: 800; color: var(--cocoa); text-decoration: none; padding-top: .05rem; }
.version-row.is-current .vnum { color: var(--sakura-dark); }
.vdesc { color: var(--cocoa); text-decoration: none; margin-right: .4rem; }
.vdesc:hover, .vnum:hover { text-decoration: underline; }
.vbody .statline { font-size: .8rem; }
details.add-version { margin-top: .75rem; }
details.history > summary, details.add-version > summary, details.more-filters > summary {
    cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--sakura-dark); padding: .25rem 0;
}
details.add-version form { margin-top: .5rem; }
details.add-version .field { margin: 0; }
details.add-version p { margin: .4rem 0 0; }

.flavour-row { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
.flavour-row .flavour-name { margin-right: .4rem; }
.flavour-row .pill { margin-right: .3rem; }
.flavour-name { font-size: 1.15rem; font-weight: 800; color: var(--cocoa); text-decoration: none; }
.flavour-name:hover { text-decoration: underline; }

/* printing */
.print-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.print-form .field { margin: 0; flex: 1 1 14rem; max-width: 24rem; }
.print-form .field.count { flex: 0 0 6.5rem; }
.print-preview { margin: .7rem 0 0; }
.print-preview b { color: var(--cocoa); }

.combo-list { list-style: none; padding: 0; margin: 0; }
.combo-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.combo-list li:first-child { border-top: 0; }
.combo-label { font-weight: 700; color: var(--cocoa); text-decoration: none; margin-right: .4rem; }
.combo-label:hover { text-decoration: underline; }

details.history { margin-top: .5rem; }
.batch-list { list-style: none; padding: 0; margin: 0; }
.batch-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .6rem 0; border-top: 1px solid var(--line); }
.batch-list li:first-child { border-top: 0; }
.batch-main { display: flex; flex-direction: column; }
.batch-label { font-weight: 700; }
.batch-list .actions { gap: .35rem; }

/* products list */
.new-product-panel { margin-top: 1rem; }
.new-product-panel .inline-form { max-width: 36rem; }
.product-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.product-card {
    display: block; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem;
    color: var(--cocoa); text-decoration: none; transition: transform .1s ease, box-shadow .15s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(107, 66, 38, .16); }
.product-card h3 { margin-bottom: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }

/* inbox */
.filterbar { padding: 1rem 1.25rem; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.filter-row .field { margin: 0; }
.filter-row .grow { flex: 1 1 16rem; }
.filter-row select { width: auto; }
.filter-row .checkbox { margin: 0; white-space: nowrap; }
.filter-row .export { margin-left: auto; }
details.more-filters { margin-top: .6rem; }
details.more-filters .filters { margin-top: .6rem; }

.feedback-list { display: flex; flex-direction: column; gap: .6rem; }
.feedback-item {
    display: block; background: var(--white); border-radius: 16px; box-shadow: var(--shadow); padding: .85rem 1.1rem;
    color: var(--cocoa); text-decoration: none; border-left: 4px solid transparent;
}
.feedback-item:hover { box-shadow: 0 8px 26px rgba(107, 66, 38, .16); }
.feedback-item.unread { border-left-color: var(--sakura-dark); }
.fi-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; margin-bottom: .35rem; }
.fi-label { font-weight: 700; }
.fi-meta { margin-left: auto; font-size: .82rem; color: var(--cocoa-soft); }
.fi-text { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .5rem; line-height: 1.45; }
.fi-kind { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--cocoa-soft); padding-top: .2rem; }

/* one feedback */
.fb-title { font-size: 1.5rem; }
.fb-title a { color: inherit; text-decoration: none; }
.fb-title a:hover { text-decoration: underline; }
.notes .meta form.inline { margin-left: .5rem; font-size: .8rem; }

/* ---------- ingredients ---------- */
.ingredient-table td, .source-table td { vertical-align: middle; }
.amount-form { display: inline-flex; align-items: center; gap: .4rem; justify-content: flex-end; }
.amount-form input[type=number] { width: 7.5em; padding: .4em .6em; text-align: right; }
.amount-form .unit { min-width: 2.2em; text-align: left; color: var(--cocoa-soft); }
.add-ingredient { margin-top: 1rem; }
.add-ingredient .field.count, .source-form .field.count { flex: 0 1 9rem; }
.source-table tr.inactive td { color: var(--cocoa-soft); background: var(--dough-light); }
.source-table tr.inactive b { font-weight: 600; }
details.edit-source > summary { list-style: none; cursor: pointer; }
details.edit-source > summary::-webkit-details-marker { display: none; }
details.edit-source[open] { padding: .5rem; min-width: min(34rem, 85vw); }
.recipe-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.recipe-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.recipe-list li:last-child { border-bottom: 0; }
.recipe-list li.recipe-total, .ingredient-table tfoot th, .ingredient-table tfoot td { font-weight: 800; color: var(--cocoa); }
.batch-yield { margin-top: 1rem; padding-top: 1rem; border-top: 2px solid var(--line); }
.batch-yield .inline-form { align-items: flex-end; }
.batch-yield .unit { padding-bottom: .7em; color: var(--cocoa-soft); }
.piece-price { margin-top: .6rem; font-size: 1.05rem; }
.piece-price b { font-size: 1.15rem; }
.ingredient-table tfoot th { font-size: 1rem; text-transform: none; letter-spacing: 0; }
.ingredient-table tfoot th, .ingredient-table tfoot td { border-bottom: 0; border-top: 2px solid var(--line); }

/* star questions (Products: manage; Feedbacks: results) */
.question-list { list-style: none; padding: 0; margin: 0; }
.question-row { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; gap: .6rem; align-items: start; padding: .6rem .4rem; border-top: 1px solid var(--line); }
.question-row:first-child { border-top: 0; }
.qnum { font-weight: 800; color: var(--sakura-dark); padding-top: .05rem; }
.qtext { font-weight: 700; }
.qbody .statline { font-size: .8rem; }
.qbody details.edit { margin-top: .3rem; font-size: .85rem; }
.qbody details.edit p { margin: .4rem 0 0; }
.qactions { display: flex; align-items: center; gap: .15rem; }
.qactions form { margin: 0; }
.icon-btn {
    width: 2rem; height: 2rem; border: 0; border-radius: 999px; background: none; cursor: pointer;
    font: inherit; font-weight: 800; color: var(--cocoa-soft);
}
.icon-btn:hover:not(:disabled) { background: var(--dough-light); color: var(--cocoa); }
.icon-btn:disabled { opacity: .3; cursor: default; }
details.retired-questions { margin-top: 1rem; }
details.retired-questions > summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--cocoa-soft); }
details.retired-questions ul { list-style: none; padding: 0; margin: .5rem 0 0; }
details.retired-questions li { display: flex; flex-wrap: wrap; gap: .2rem .8rem; padding: .35rem 0; border-top: 1px dashed var(--line); color: var(--cocoa-soft); }

.qstats-panel { overflow-x: auto; margin-bottom: 1rem; }
.qstats { width: 100%; border-collapse: collapse; }
.qstats th, .qstats td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.qstats th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--cocoa-soft); }
.qstats .group td { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--cocoa-soft); background: var(--dough-light); }
.qstats tr.is-retired td { color: var(--cocoa-soft); }
.qstats .avg { font-weight: 800; white-space: nowrap; }
.dist { display: flex; align-items: flex-end; gap: 2px; height: 1.6rem; min-width: 5.5rem; }
.dist span { flex: 1; background: var(--crust); border-radius: 3px 3px 0 0; min-height: 2px; }
.dist-labels { display: flex; gap: 2px; font-size: .65rem; color: var(--cocoa-soft); }
.dist-labels span { flex: 1; text-align: center; }
/* Just-right questions: the middle bar (just right) in green, the question's own words under the ends. */
.dist-jar span:nth-child(3) { background: var(--ok); }
.dist-ends { display: grid; grid-template-columns: 1fr auto 1fr; gap: .3rem; font-size: .65rem; color: var(--cocoa-soft); }
.dist-ends span:nth-child(2) { color: var(--ok); font-weight: 800; }
.dist-ends span:last-child { text-align: right; }
.jar-result { white-space: nowrap; }
.answer-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.answer-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.fi-avg { font-weight: 800; font-size: .85rem; }
.answer-list .retired-tag { font-size: .75rem; color: var(--cocoa-soft); margin-left: .4rem; }

/* The version, small, under every admin page. */
.admin-footer { text-align: center; font-size: .72rem; color: var(--cocoa-soft); padding: 1.5rem 1rem 2rem; }

/* Sold versions and the product page's costs table. */
.pill-sold { background: #E6F4EC; color: var(--ok); }
.cost-table .cost-name { font-weight: 700; }
.cost-table .cost-total { font-weight: 800; }
.sold-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .9rem; }

/* Question forms (admin): the text, the kind, and for "just right" the words at both ends. */
.question-form { display: grid; gap: .6rem; margin-top: .4rem; }
.question-form .field { margin: 0; }
.question-kind { border: 0; padding: 0; margin: 0; display: grid; gap: .35rem; }
.question-kind .choice { display: flex; gap: .5rem; align-items: baseline; font-weight: 400; margin: 0; cursor: pointer; }
.question-ends { display: flex; flex-wrap: wrap; gap: .6rem; padding: .6rem .8rem; border-radius: 12px; background: var(--dough-light); }
.question-ends .field { flex: 1 1 10rem; }
.question-ends p { flex-basis: 100%; margin: 0; }
/* A just-right answer on a feedback's page: its words, green when just right. */
.jar-answer { font-weight: 700; white-space: nowrap; }
.jar-answer.is-right { color: var(--ok); }
