/* =====================================================================
   Spirit & Crafts — editorial design system
   Everything scoped under .sc-root so it never leaks into the theme.
   ===================================================================== */

.sc-root {
	--sc-paper:   #f3eee5;
	--sc-card:    #fbf8f2;
	--sc-ink:     #1a1714;
	--sc-ink-2:   #3a342d;
	--sc-muted:   #8a8175;
	--sc-line:    #e4ddd0;
	--sc-accent:  #000000;
	--sc-accent-soft: #ececec;

	/* Only three families are used across the whole UI. Minimal generic
	   fallback kept solely for the brief moment before the webfont loads. */
	--sc-serif: "Newsreader", serif;
	--sc-sans:  "Hanken Grotesk", sans-serif;
	--sc-mono:  "Spline Sans Mono", monospace;

	--sc-radius: 14px;
	--sc-gap: 20px;

	color: var(--sc-ink);
	font-family: var(--sc-sans);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	accent-color: var(--sc-accent);
}

.sc-root *,
.sc-root *::before,
.sc-root *::after { box-sizing: border-box; }

/* ---------- Reset inherited theme link/control colours ----------
   Bare <a> tags (card links, back links) would otherwise inherit the
   active theme's link colour — often a pink/magenta default (#c36).
   Force every anchor and native form control onto our palette. */
.sc-root a,
.sc-root a:link,
.sc-root a:visited,
.sc-root a:hover,
.sc-root a:active,
.sc-root a:focus { color: inherit; }
.sc-root a { text-decoration: none; }
.sc-root :is(input, select, textarea, button) { accent-color: var(--sc-accent); }

/* ---------- Neutralise the theme's native <button> skin ----------
   Many themes paint <button> with their own background/colour (often a
   pink/magenta default). Reset native button chrome for EVERY button in
   our widgets, but only the cosmetic properties our component classes
   re-declare — using a broad reset that our .sc-* classes then override.
   The reset is applied at low specificity so component classes win. */
.sc-root button {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	margin: 0;
	font-family: inherit;
	line-height: inherit;
	text-shadow: none;
}
/* Strip the theme's painted skin from any button that ISN'T one of our
   styled components (those bring their own background/colour/border). */
.sc-root button:not([class*="sc-"]) {
	background: transparent;
	color: inherit;
	border: 0;
	box-shadow: none;
	padding: 0;
	cursor: pointer;
}
.sc-root ::selection { background: var(--sc-accent); color: #fff; }
.sc-root :focus-visible { outline-color: var(--sc-accent); }

/* ---------- Typography primitives ---------- */
.sc-eyebrow {
	font-family: var(--sc-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--sc-muted);
	margin: 0 0 6px;
}
.sc-display {
	font-family: var(--sc-serif);
	font-style: italic;
	font-weight: 500;
	letter-spacing: -0.01em;
	margin: 0;
	line-height: 1.08;
	color: var(--sc-ink);
}
.sc-display--lg { font-size: clamp(2rem, 6vw, 3.4rem); }
.sc-display--rec { font-size: clamp(1.4rem, 3.5vw, 2rem); color: var(--sc-accent); }
.sc-body {
	font-size: 15px;
	color: var(--sc-ink-2);
	max-width: 46ch;
	margin: 10px 0 0;
}
.sc-meta-line { font-size: 13px; color: var(--sc-muted); margin: 4px 0 0; }

/* ---------- Surfaces ---------- */
.sc-card {
	background: var(--sc-card);
	border: 1px solid var(--sc-line);
	border-radius: var(--sc-radius);
	padding: 22px;
}
.sc-card--accent {
	background: var(--sc-accent-soft);
	border-color: transparent;
}
.sc-empty {
	color: var(--sc-muted);
	font-style: italic;
	text-align: center;
}
.sc-warn {
	background: #fff4e8;
	border: 1px solid #f0d7b8;
	color: #7a4a14;
	font-size: 13px;
	padding: 10px 14px;
	border-radius: 10px;
	margin-top: 14px;
}

/* ---------- Buttons ---------- */
.sc-root .sc-btn {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background: transparent;
	display: inline-block;
	font-family: var(--sc-sans);
	font-weight: 600;
	font-size: 14px;
	padding: 12px 22px;
	border-radius: 999px;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid var(--sc-ink);
}
.sc-btn--ghost { background: transparent; color: var(--sc-ink); }
.sc-btn--ghost:hover { background: var(--sc-ink); color: var(--sc-paper); }

/* ---------- Login ---------- */
.sc-login { max-width: 460px; margin: 0 auto; text-align: left; }
.sc-login .sc-display { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 6px; }
.sc-gbtn { margin-top: 20px; }
.sc-login-status { font-size: 13px; color: var(--sc-muted); margin-top: 12px; min-height: 1em; }
.sc-login-status.is-error { color: #b3261e; }

/* ---------- Dashboard ---------- */
.sc-dash-head { margin-bottom: 22px; }
.sc-statrow {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	padding: 0;
	overflow: hidden;
}
.sc-stat {
	padding: 20px 22px;
	border-right: 1px solid var(--sc-line);
}
.sc-stat:last-child { border-right: 0; }
.sc-stat-num {
	display: block;
	font-family: var(--sc-serif);
	font-style: italic;
	font-size: 2.2rem;
	line-height: 1;
	margin-top: 6px;
}

.sc-row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 30px 0 12px; }
.sc-row-head .sc-eyebrow { margin: 0; }
.sc-recent-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: var(--sc-gap);
}
.sc-recent-card { text-decoration: none; color: inherit; }
.sc-recent-meta { padding-top: 10px; }
.sc-recent-meta .sc-display { font-size: 1.15rem; margin: 4px 0 6px; }

/* ---------- Thumb (placeholder striped) ---------- */
.sc-thumb {
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	background-color: #ece4d6;
	background-size: cover;
	background-position: center;
	background-image:
		repeating-linear-gradient(45deg, #e7dece 0 10px, #efe8da 10px 20px);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}
.sc-thumb-tag {
	font-family: var(--sc-mono);
	font-size: 11px;
	color: var(--sc-muted);
	background: var(--sc-card);
	padding: 4px 10px;
	border-radius: 4px;
	letter-spacing: 0.05em;
}

/* ---------- Rating dots ---------- */
.sc-dots { display: inline-flex; gap: 5px; align-items: center; }
.sc-dot {
	width: 9px; height: 9px; border-radius: 50%;
	border: 1.5px solid var(--sc-ink);
	display: inline-block;
}
.sc-dot.is-on { background: var(--sc-ink); }

/* ---------- Journal ---------- */
.sc-journal-head { margin-bottom: 20px; }
.sc-journal-tools { display: flex; align-items: center; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.sc-journal-tools .sc-search { flex: 1; min-width: 220px; }
.sc-search {
	width: 100%;
	font-family: var(--sc-sans);
	font-size: 15px;
	padding: 14px 20px;
	border: 1px solid var(--sc-line);
	border-radius: 999px;
	background: var(--sc-card);
	color: var(--sc-ink);
}
.sc-search:focus { outline: none; border-color: var(--sc-ink); }

.sc-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.sc-root .sc-chip {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	font-family: var(--sc-sans);
	font-size: 14px;
	padding: 9px 18px;
	border-radius: 999px;
	border: 1px solid var(--sc-line);
	background: var(--sc-card);
	color: var(--sc-ink);
	cursor: pointer;
	transition: background .15s, color .15s;
}
.sc-chip:hover { border-color: var(--sc-ink); }
.sc-chip.is-active { background: var(--sc-ink); color: var(--sc-paper); border-color: var(--sc-ink); }

.sc-journal-items.is-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--sc-gap);
}
.sc-journal-items.is-list { display: flex; flex-direction: column; gap: 0; }
.sc-journal-items.is-list .sc-entry-card {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 18px;
	border-bottom: 1px solid var(--sc-line);
	padding: 18px 0;
}
.sc-journal-items.is-list .sc-thumb { aspect-ratio: auto; height: 100%; min-height: 90px; }

.sc-entry-card {
	text-decoration: none;
	color: inherit;
	background: var(--sc-card);
	border: 1px solid var(--sc-line);
	border-radius: var(--sc-radius);
	overflow: hidden;
	display: block;
	transition: transform .15s ease, box-shadow .15s ease;
}
.sc-journal-items.is-grid .sc-entry-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(26,23,20,0.08);
}
.sc-journal-items.is-list .sc-entry-card { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
.sc-entry-body { padding: 16px 18px; }
.sc-journal-items.is-list .sc-entry-body { padding: 0; }
.sc-entry-top { display: flex; justify-content: space-between; align-items: center; }
.sc-entry-top .sc-eyebrow { margin: 0; }
.sc-entry-body .sc-display { font-size: 1.4rem; margin: 8px 0 4px; }

.sc-taglist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sc-tag {
	font-family: var(--sc-mono);
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sc-ink-2);
	background: var(--sc-paper);
	border: 1px solid var(--sc-line);
	padding: 4px 9px;
	border-radius: 999px;
}
.sc-noresults { color: var(--sc-muted); font-style: italic; text-align: center; padding: 30px 0; }

/* ---------- My Bar ---------- */
.sc-bottle-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--sc-gap);
	margin-bottom: 26px;
}
.sc-bottle-card .sc-display { font-size: 1.25rem; margin: 4px 0; }
.sc-level {
	height: 4px;
	background: var(--sc-line);
	border-radius: 999px;
	margin: 14px 0 6px;
	overflow: hidden;
}
.sc-level-fill { display: block; height: 100%; background: var(--sc-ink); }
.sc-level-num { font-family: var(--sc-mono); font-size: 11px; color: var(--sc-muted); letter-spacing: 0.08em; }

.sc-recs { margin-top: 10px; }
.sc-recs .sc-display--rec { margin: 4px 0 18px; }
.sc-rec-list { list-style: none; margin: 0; padding: 0; }
.sc-rec {
	border-top: 1px solid rgba(181,99,42,0.25);
	padding: 14px 0;
	font-size: 15px;
	color: var(--sc-ink-2);
}
.sc-rec a { color: inherit; text-decoration: none; display: flex; justify-content: space-between; }
.sc-rec a:hover { color: var(--sc-accent); }
.sc-rec span[aria-hidden] { color: var(--sc-accent); }

/* ---------- Mobile-first refinements ---------- */
@media (max-width: 600px) {
	.sc-card { padding: 18px; }
	.sc-stat { padding: 16px; }
	.sc-stat-num { font-size: 1.8rem; }
	.sc-journal-items.is-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Log a Pour wizard
   ===================================================================== */
.sc-wizard-head { margin-bottom: 18px; }

.sc-steps {
	list-style: none; margin: 0 0 22px; padding: 0;
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
	background: var(--sc-line); border: 1px solid var(--sc-line); border-radius: 12px; overflow: hidden;
}
.sc-step-tab { background: var(--sc-paper); padding: 14px 16px; }
.sc-step-tab.is-active { background: var(--sc-card); }
.sc-step-tab.is-done .sc-step-name { color: var(--sc-ink); }
.sc-step-tab .sc-eyebrow { margin: 0 0 2px; }
.sc-step-name { font-family: var(--sc-sans); font-size: 14px; color: var(--sc-ink-2); }

.sc-wizard-layout { display: grid; grid-template-columns: 1fr; gap: var(--sc-gap); }
@media (min-width: 900px) {
	.sc-wizard-layout { grid-template-columns: 1fr 320px; align-items: start; }
	.sc-wizard-preview { position: sticky; top: 24px; }
}

.sc-panel { display: none; }
.sc-panel.is-active { display: block; }
.sc-panel-title { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 4px 0 6px; }

.sc-field-label {
	display: block; font-family: var(--sc-mono);
	font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--sc-muted); margin: 20px 0 8px;
}
.sc-input {
	width: 100%; font-family: var(--sc-sans); font-size: 15px;
	padding: 12px 14px; background: var(--sc-paper);
	border: 1px solid var(--sc-line); border-radius: 10px; color: var(--sc-ink);
}
.sc-input:focus { outline: none; border-color: var(--sc-ink); }
.sc-textarea { resize: vertical; min-height: 110px; }
.sc-field-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .sc-field-2col { grid-template-columns: 1fr; } }

.sc-chipset { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-root .sc-chipset--grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.sc-chipset--grid .sc-chip { width: 100%; }

.sc-photo { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: start; }
.sc-root .sc-photo-drop {
	aspect-ratio: 1/1; border: 1px dashed var(--sc-muted); border-radius: 10px;
	display: flex; align-items: center; justify-content: center; text-align: center;
	background-size: cover; background-position: center;
	font-family: var(--sc-mono); font-size: 11px; color: var(--sc-muted); padding: 8px;
}
.sc-photo-drop.has-image span { display: none; }
.sc-photo-status { font-size: 13px; color: var(--sc-muted); margin-top: 10px; }

/* segmented controls */
.sc-matrix-row { margin-top: 16px; }
.sc-root .sc-matrix-opts, .sc-score-opts {
	display: grid; gap: 8px; margin-top: 8px;
}
.sc-matrix-opts { grid-template-columns: repeat(4, 1fr); }
.sc-root .sc-matrix-opt, .sc-score-opt {
	font-family: var(--sc-sans); font-size: 14px; cursor: pointer;
	padding: 12px 8px; background: var(--sc-card);
	border: 1px solid var(--sc-line); border-radius: 8px; color: var(--sc-ink);
	transition: background .12s, color .12s;
}
.sc-matrix-opt:hover, .sc-score-opt:hover { border-color: var(--sc-ink); }
.sc-matrix-opt.is-active { background: var(--sc-ink); color: var(--sc-paper); border-color: var(--sc-ink); }

.sc-score-row { margin-top: 18px; }
.sc-score-opts { grid-template-columns: repeat(5, 1fr); max-width: 360px; }
.sc-score-opt.is-on { background: var(--sc-ink); color: var(--sc-paper); border-color: var(--sc-ink); }
.sc-score-hint { display: block; font-size: 12px; color: var(--sc-muted); margin-top: 8px; }

.sc-wizard-nav {
	display: flex; align-items: center; gap: 16px;
	margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--sc-line);
}
.sc-stepcount { font-family: var(--sc-mono); font-size: 12px; color: var(--sc-muted); margin-left: auto; }
.sc-btn--dark { background: var(--sc-ink); color: var(--sc-paper); border-color: var(--sc-ink); }
.sc-btn--dark:hover { opacity: .9; }
.sc-btn[disabled] { opacity: .4; cursor: not-allowed; }
.sc-wizard-nav [data-next], .sc-wizard-nav [data-save] { order: 3; }

.sc-wizard-foot { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.sc-root a.sc-link,
.sc-root .sc-link {
	background: none; border: 0; cursor: pointer; padding: 0;
	font-family: var(--sc-sans); font-size: 14px; color: var(--sc-ink-2);
	text-decoration: underline; text-underline-offset: 3px;
}
.sc-root a.sc-link:hover,
.sc-link:hover { color: var(--sc-ink); }
.sc-wizard-status { font-size: 13px; color: var(--sc-muted); }
.sc-wizard-status.is-error { color: #b3261e; }

/* preview */
.sc-preview-card { padding: 0; overflow: hidden; }
.sc-preview-body { padding: 16px 18px; }
.sc-preview-body .sc-display { font-size: 1.3rem; margin: 4px 0 8px; }
.sc-preview-foot { margin-top: 12px; text-align: center; }
.sc-thumb.has-image .sc-thumb-tag { display: none; }

/* =====================================================================
   Single entry detail
   ===================================================================== */
.sc-single { max-width: 680px; margin: 0 auto; }
.sc-single-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sc-single-topbar .sc-eyebrow { margin: 0; }

.sc-single-hero {
	width: 100%; aspect-ratio: 4 / 3; border-radius: var(--sc-radius);
	margin-bottom: 22px;
}
.sc-single-meta { margin-bottom: 6px; }
.sc-single-title { font-size: clamp(2.2rem, 8vw, 3.6rem); line-height: 1.02; }
.sc-single-made { margin-top: 8px; color: var(--sc-muted); }

.sc-score-cards {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0;
}
.sc-score-card { padding: 16px 18px; }
.sc-score-val {
	display: block; font-family: var(--sc-serif); font-style: italic;
	font-size: 2rem; line-height: 1; margin: 6px 0 10px;
}
.sc-score-of { font-size: 0.9rem; color: var(--sc-muted); font-style: normal; }

.sc-section-label { margin: 28px 0 12px; }

.sc-pillset { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-pill {
	font-family: var(--sc-sans); font-size: 13px;
	padding: 7px 15px; border-radius: 999px;
	background: var(--sc-card); border: 1px solid var(--sc-line); color: var(--sc-ink);
}

.sc-matrix--readonly { padding: 20px 22px; }
.sc-matrix--readonly .sc-matrix-row { margin-top: 18px; }
.sc-matrix--readonly .sc-matrix-row:first-child { margin-top: 0; }
.sc-matrix-rowhead { display: flex; align-items: baseline; justify-content: space-between; }
.sc-matrix-rowhead .sc-eyebrow { margin: 0; }
.sc-matrix-sel { font-family: var(--sc-serif); font-style: italic; font-size: 15px; color: var(--sc-ink); }
.sc-root .sc-matrix--readonly .sc-matrix-opt {
	text-align: center; cursor: default; font-size: 13px; padding: 10px 6px;
}
.sc-matrix--readonly .sc-matrix-opt:hover { border-color: var(--sc-line); }
.sc-matrix--readonly .sc-matrix-opt.is-active { border-color: var(--sc-ink); }

.sc-notes-card { padding: 22px; }
.sc-notes-quote {
	margin: 0; border: 0; padding: 0;
	font-family: var(--sc-serif); font-style: italic; font-size: 1.2rem;
	line-height: 1.5; color: var(--sc-ink-2);
}
.sc-notes-card .sc-taglist { margin-top: 16px; }

.sc-single-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.sc-btn--full { width: 100%; text-align: center; }

@media (max-width: 560px) {
	.sc-score-cards { gap: 8px; }
	.sc-score-card { padding: 12px; }
	.sc-score-val { font-size: 1.6rem; }
	.sc-matrix--readonly .sc-matrix-opts { grid-template-columns: repeat(4, 1fr); gap: 5px; }
	.sc-matrix--readonly .sc-matrix-opt { padding: 8px 3px; font-size: 11px; }
}

/* =====================================================================
   Stats / Year in Review
   ===================================================================== */
.sc-statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 26px; }
.sc-statgrid .sc-stat { border-right: 0; }
@media (max-width: 700px) { .sc-statgrid { grid-template-columns: repeat(2, 1fr); } }

.sc-breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-gap); margin-bottom: 26px; }
@media (max-width: 760px) { .sc-breakdown-grid { grid-template-columns: 1fr; } }
.sc-bar-row { display: grid; grid-template-columns: 110px 1fr 28px; align-items: center; gap: 12px; margin-top: 12px; }
.sc-bar-row:first-of-type { margin-top: 14px; }
.sc-bar-label { font-size: 14px; }
.sc-bar { height: 8px; background: var(--sc-line); border-radius: 999px; overflow: hidden; }
.sc-bar-fill { display: block; height: 100%; background: var(--sc-ink); }
.sc-bar-num { font-family: var(--sc-mono); font-size: 12px; color: var(--sc-muted); text-align: right; }

.sc-cadence { margin-bottom: 26px; }
.sc-cadence .sc-row-head { display: flex; justify-content: space-between; margin: 0 0 14px; }
.sc-cadence .sc-row-head .sc-eyebrow { margin: 0; }
.sc-cadence-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 120px; }
.sc-cadence-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.sc-cadence-bar { width: 100%; max-width: 22px; background: var(--sc-ink); border-radius: 3px; }
.sc-cadence-lbl { font-family: var(--sc-mono); font-size: 10px; color: var(--sc-muted); }

.sc-award-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sc-gap); }
@media (max-width: 760px) { .sc-award-grid { grid-template-columns: 1fr; } }
.sc-award .sc-display { font-size: 1.4rem; margin: 8px 0; }
.sc-award--dark { background: var(--sc-ink); border-color: var(--sc-ink); }
.sc-award--dark .sc-eyebrow, .sc-award--dark .sc-display { color: var(--sc-paper); }
.sc-award-desc { font-size: 13px; color: var(--sc-muted); margin-top: 6px; }
.sc-award--dark .sc-award-desc { color: rgba(243,238,229,0.72); }

/* =====================================================================
   Cocktail crawl
   ===================================================================== */
.sc-crawl-tabs { margin-bottom: 22px; }
.sc-crawl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sc-gap); }
.sc-bar-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sc-bar-badge {
	font-family: var(--sc-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
	padding: 4px 10px; border-radius: 999px; border: 1px solid var(--sc-line); color: var(--sc-muted); cursor: default;
}
.sc-bar-badge.is-on { background: var(--sc-ink); color: var(--sc-paper); border-color: var(--sc-ink); }
.sc-bar-count { font-family: var(--sc-mono); font-size: 12px; color: var(--sc-muted); }
.sc-bar-card .sc-display { font-size: 1.4rem; margin: 4px 0; }
.sc-bar-orderlbl { margin: 12px 0 2px; }
.sc-bar-order { font-family: var(--sc-serif); font-style: italic; }
.sc-bar-actions { display: flex; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--sc-line); }

/* =====================================================================
   Profile
   ===================================================================== */
.sc-profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.sc-avatar {
	width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto;
	background: var(--sc-accent); color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--sc-serif); font-style: italic; font-size: 1.4rem;
	background-size: cover; background-position: center;
}
.sc-profile-head .sc-display { margin: 2px 0 0; }
.sc-profile-tops { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-gap); margin-top: 24px; }
@media (max-width: 640px) { .sc-profile-tops { grid-template-columns: 1fr; } }
.sc-profile-foot { display: flex; align-items: center; gap: 16px; margin-top: 26px; }

/* =====================================================================
   Export & share
   ===================================================================== */
.sc-export-card { max-width: 640px; }
.sc-export-stats { display: flex; gap: 24px; margin: 14px 0 8px; font-size: 15px; }
.sc-export-stats strong { font-family: var(--sc-serif); font-style: italic; font-size: 1.4rem; margin-right: 4px; }
.sc-export-list { list-style: none; margin: 0; padding: 0; }
.sc-export-list li { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; border-top: 1px solid var(--sc-line); }
.sc-export-name { font-family: var(--sc-serif); font-style: italic; font-size: 1.1rem; }
.sc-export-meta { font-size: 12px; color: var(--sc-muted); flex: 1; }
.sc-export-list .sc-dots { margin-left: auto; }
.sc-export-bars { list-style: none; margin: 0; padding: 0; }
.sc-export-bars li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--sc-line); }
.sc-export-foot { margin-top: 20px; text-align: center; }
.sc-export-actions { display: flex; gap: 12px; margin-top: 20px; }

@media print {
	.sc-no-print { display: none !important; }
	.sc-export-card { border: 0; max-width: none; padding: 0; }
}

/* Wizard: span full width when the live preview is hidden */
@media (min-width: 900px) {
	.sc-wizard-layout:not(:has(.sc-wizard-preview)) { grid-template-columns: 1fr; }
}

/* =====================================================================
   My Bar — summary, tools, modal
   ===================================================================== */
.sc-mybar-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.sc-mybar-summary .sc-stat--wide { grid-column: span 1; }
.sc-stat-cats { font-size: 13px; color: var(--sc-ink); line-height: 1.6; margin-top: 4px; }
@media (max-width: 760px) { .sc-mybar-summary { grid-template-columns: repeat(2, 1fr); } }

.sc-mybar-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sc-mybar-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; flex: 1; }
.sc-mybar-tools .sc-search { max-width: 320px; }
.sc-select { padding: 10px 12px; border: 1px solid var(--sc-line); background: var(--sc-card); color: var(--sc-ink); border-radius: 6px; font-family: inherit; font-size: 14px; min-width: 160px; }
.sc-check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--sc-ink-2); cursor: pointer; }
.sc-check input { accent-color: var(--sc-ink); }

.sc-bottle-photo { aspect-ratio: 4 / 3; background-size: cover; background-position: center; border-radius: var(--sc-radius); margin: -16px -16px 12px; }
.sc-bottle-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc-pill { font-family: var(--sc-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.sc-pill--gold { background: var(--sc-accent); color: #fff; }
.sc-bottle-status { display: block; font-family: var(--sc-mono); font-size: 11px; color: var(--sc-muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 8px 0 6px; }
.sc-bottle-actions { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--sc-line); }
.sc-bottle-card.is-collectible { border-left: 3px solid var(--sc-accent); }

/* Modal */
.sc-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.sc-modal[hidden] { display: none; }
.sc-modal-backdrop { position: absolute; inset: 0; background: rgba(26,23,20,0.55); }
.sc-modal-panel { position: relative; background: var(--sc-card); border-radius: var(--sc-radius); max-width: 560px; width: 100%; max-height: 92vh; overflow-y: auto; padding: 24px; box-shadow: 0 30px 70px rgba(0,0,0,0.25); }
.sc-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--sc-line); }
.sc-modal-head .sc-display { margin: 0; font-size: 1.4rem; }
.sc-modal-foot { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--sc-line); }
.sc-modal-foot-actions { display: flex; gap: 10px; grid-column: 3; }
.sc-modal-foot .sc-wizard-status { grid-column: 1 / 3; font-size: 13px; }
.sc-link--danger { color: #a03b2a; }

/* Form fields */
.sc-bottle-form .sc-field { margin-bottom: 14px; }
.sc-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .sc-field-row { grid-template-columns: 1fr; } }
.sc-bottle-form input[type="text"], .sc-bottle-form input[type="date"], .sc-bottle-form select, .sc-bottle-form textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--sc-line); background: var(--sc-paper); color: var(--sc-ink);
	border-radius: 6px; font-family: inherit; font-size: 14px;
}
.sc-bottle-form textarea { resize: vertical; min-height: 80px; }
.sc-required { color: var(--sc-accent); }
.sc-field--inline { display: flex; align-items: center; }

/* =====================================================================
   Google sign-in button — plain HTML link, OAuth Code flow
   ===================================================================== */
.sc-root .sc-google-btn {
	display: inline-flex; align-items: center; gap: 12px;
	padding: 10px 18px 10px 14px;
	background: #fff; color: #1f1f1f;
	border: 1px solid #dadce0; border-radius: 999px;
	font-family: var(--sc-sans);
	font-size: 14px; font-weight: 500; letter-spacing: 0.01em;
	text-decoration: none; cursor: pointer;
	transition: box-shadow .15s ease, background .15s ease;
}
.sc-root .sc-google-btn:hover, .sc-google-btn:focus-visible {
	background: #f8f9fa; box-shadow: 0 1px 3px rgba(60,64,67,0.18);
	text-decoration: none;
}
.sc-google-g { width: 18px; height: 18px; flex: 0 0 auto; }

/* =====================================================================
   List view (data-layout="list" on any card grid)
   ===================================================================== */
[data-layout="list"].sc-bottle-grid,
[data-layout="list"].sc-crawl-grid,
[data-layout="list"].sc-recent-grid { display: block; }

[data-layout="list"] > .sc-bottle-card,
[data-layout="list"] > .sc-bar-card,
[data-layout="list"] > .sc-recent-card {
	display: grid;
	grid-template-columns: 56px 1.4fr 1fr auto auto;
	align-items: center;
	gap: 18px;
	padding: 14px 18px;
	margin: 0;
	border: 0;
	border-bottom: 1px solid var(--sc-line);
	background: transparent;
	border-radius: 0;
	box-shadow: none;
}
[data-layout="list"] > .sc-bottle-card:first-child,
[data-layout="list"] > .sc-bar-card:first-child,
[data-layout="list"] > .sc-recent-card:first-child {
	border-top: 1px solid var(--sc-line);
}
[data-layout="list"] .sc-bottle-photo,
[data-layout="list"] .sc-thumb {
	width: 56px; height: 56px; aspect-ratio: auto;
	margin: 0; border-radius: 6px; flex: 0 0 auto;
}
[data-layout="list"] .sc-display { font-size: 1.2rem; margin: 0; }
[data-layout="list"] .sc-meta-line,
[data-layout="list"] .sc-bottle-status,
[data-layout="list"] .sc-bar-orderlbl,
[data-layout="list"] .sc-bar-order,
[data-layout="list"] .sc-bottle-actions,
[data-layout="list"] .sc-recent-meta .sc-eyebrow {
	margin: 0;
}
[data-layout="list"] .sc-bottle-head { display: contents; }
[data-layout="list"] .sc-bottle-actions { padding: 0; border: 0; }
[data-layout="list"] .sc-bar-top { display: contents; }
[data-layout="list"] .sc-bar-actions { padding: 0; border: 0; gap: 12px; }

/* Wide layouts get more columns; mobile collapses everything back to rows. */
@media (max-width: 740px) {
	[data-layout="list"] > .sc-bottle-card,
	[data-layout="list"] > .sc-bar-card,
	[data-layout="list"] > .sc-recent-card {
		grid-template-columns: 44px 1fr;
		gap: 12px;
		padding: 12px 0;
	}
	[data-layout="list"] .sc-bottle-photo,
	[data-layout="list"] .sc-thumb { width: 44px; height: 44px; }
	[data-layout="list"] .sc-bottle-actions,
	[data-layout="list"] .sc-bar-actions,
	[data-layout="list"] .sc-dots,
	[data-layout="list"] .sc-bar-orderlbl,
	[data-layout="list"] .sc-bar-order { grid-column: 2; }
}

/* View toggle pill (My Bar tools) */
.sc-view-toggle {
	display: inline-flex; padding: 3px;
	background: var(--sc-card); border: 1px solid var(--sc-line); border-radius: 999px;
}
.sc-root .sc-view-btn {
	border: 0; background: transparent; cursor: pointer;
	padding: 6px 14px; border-radius: 999px;
	font-family: var(--sc-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--sc-muted);
}
.sc-view-btn.is-active { background: var(--sc-ink); color: var(--sc-paper); }

/* =====================================================================
   Wizard — mobile improvements
   ===================================================================== */
@media (max-width: 760px) {
	.sc-wizard-layout { grid-template-columns: 1fr; }
	.sc-wizard-preview { position: static !important; max-height: none; margin-top: 20px; }
	.sc-steps {
		overflow-x: auto; flex-wrap: nowrap;
		scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
		margin: 0 -16px 18px; padding: 0 16px 6px;
	}
	.sc-step-tab { scroll-snap-align: start; min-width: 42vw; flex: 0 0 auto; }
	.sc-panel-title { font-size: 1.5rem; line-height: 1.15; }
	.sc-matrix-grid { grid-template-columns: 1fr; }
	.sc-score-cards { grid-template-columns: 1fr; }
	.sc-wizard-foot {
		position: sticky; bottom: 0; z-index: 5;
		background: var(--sc-paper);
		margin: 16px -16px 0; padding: 12px 16px;
		border-top: 1px solid var(--sc-line);
		display: flex; gap: 10px; flex-wrap: wrap;
	}
	.sc-wizard-foot .sc-btn { flex: 1 1 auto; min-height: 44px; }
	.sc-photo-drop { min-height: 120px; }
	/* Forms get larger tap targets and 16px font (prevents iOS auto-zoom). */
	.sc-wizard input[type="text"],
	.sc-wizard input[type="date"],
	.sc-wizard select,
	.sc-wizard textarea {
		font-size: 16px; padding: 12px 14px; min-height: 44px;
	}
	.sc-field-label { font-size: 13px; margin-bottom: 6px; }
	.sc-chip { padding: 8px 14px; min-height: 36px; }
}

/* Modal — fill the screen on phones for breathing room. */
@media (max-width: 640px) {
	.sc-modal { padding: 0; }
	.sc-modal-panel {
		max-width: none !important; width: 100%; height: 100vh; max-height: 100vh;
		border-radius: 0;
	}
	.sc-modal-foot { grid-template-columns: 1fr; }
	.sc-modal-foot-actions { grid-column: 1; justify-content: stretch; }
	.sc-modal-foot-actions .sc-btn { flex: 1; min-height: 44px; }
}

/* =====================================================================
   Wizard mobile redesign (matches reference mockups: editorial, breathing,
   tile-based). Desktop view is unchanged.
   ===================================================================== */

/* Default-hide the mobile header on desktop. */
.sc-wizard-mhead, .sc-wizard-progress { display: none; }
.sc-photo-cta {
	display: inline-block;
	font-family: var(--sc-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
	padding: 8px 14px; background: var(--sc-paper); border: 1px solid var(--sc-line); border-radius: 6px;
	color: var(--sc-ink-2);
}

@media (max-width: 760px) {

	/* Mobile sticky header — close circle + label + segmented progress */
	.sc-wizard-mhead {
		display: flex; align-items: center; gap: 16px;
		position: sticky; top: 0; z-index: 6;
		background: var(--sc-paper);
		padding: 14px 0 8px;
	}
	.sc-wizard-mclose {
		display: inline-flex; align-items: center; justify-content: center;
		width: 36px; height: 36px; border-radius: 50%;
		background: #fff; color: var(--sc-ink); border: 1px solid var(--sc-line);
		font-size: 18px; line-height: 1; text-decoration: none; flex: 0 0 auto;
	}
	.sc-wizard-mlabel {
		flex: 1; margin: 0; text-align: center;
		font-family: var(--sc-mono); font-size: 11px; letter-spacing: 0.12em;
		color: var(--sc-muted); text-transform: uppercase;
	}
	.sc-wizard-mhead::after { content: ""; width: 36px; flex: 0 0 auto; } /* balance the × on the left */
	.sc-wizard-progress {
		display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px;
		position: sticky; top: 58px; z-index: 5;
		background: var(--sc-paper); padding: 0 0 18px;
	}
	.sc-wizard-seg { height: 2px; background: var(--sc-line); border-radius: 1px; }
	.sc-wizard-seg.is-active { background: var(--sc-ink); }

	/* Hide the desktop step tabs and the live preview on mobile. */
	.sc-steps, .sc-wizard-preview { display: none; }

	/* Card around the panel is just paper on mobile — full bleed feel. */
	.sc-wizard-main {
		background: transparent; box-shadow: none; border: 0; padding: 0;
	}
	.sc-wizard-head { margin-bottom: 18px; }
	.sc-wizard-head .sc-display { font-size: 2rem; line-height: 1.1; }

	/* Underlined inputs (no box) for the editorial look. */
	.sc-wizard .sc-input:not([type="date"]):not(select),
	.sc-wizard select.sc-input,
	.sc-wizard input[type="date"].sc-input {
		background: transparent; border: 0; border-bottom: 1px solid var(--sc-line);
		border-radius: 0; padding: 12px 0; font-size: 16px;
	}
	.sc-wizard .sc-input:focus { outline: none; border-bottom-color: var(--sc-ink); }
	.sc-wizard .sc-textarea {
		font-family: var(--sc-serif); font-style: italic; font-size: 18px;
		border: 0; border-bottom: 1px solid var(--sc-line); border-radius: 0;
		background: transparent; padding: 8px 0;
	}
	.sc-field-label {
		font-family: var(--sc-mono); font-size: 11px; letter-spacing: 0.14em;
		color: var(--sc-muted); text-transform: uppercase;
		margin: 22px 0 4px;
	}
	.sc-field-2col { display: block; }

	/* Photo drop — big, tappable, single target */
	.sc-photo { display: block; }
	.sc-root .sc-photo-drop {
		display: flex; align-items: center; justify-content: center;
		width: 100%; aspect-ratio: 1.2 / 1; min-height: 280px;
		background: rgba(26,23,20,0.06); border: 0; border-radius: 16px;
		cursor: pointer; padding: 0;
	}
	.sc-photo-drop.has-image { background-size: cover; background-position: center; }
	.sc-photo-drop.has-image .sc-photo-cta { background: rgba(255,255,255,0.92); }

	/* Spirit chips (Step 1) — pill style, wrapping */
	.sc-chipset { gap: 10px; }
	.sc-root .sc-chip {
		background: #fff; border: 1px solid var(--sc-line);
		border-radius: 999px; padding: 11px 18px;
		font-family: var(--sc-sans); font-size: 14px; color: var(--sc-ink);
		min-height: 40px;
	}
	.sc-chip.is-active { background: var(--sc-ink); color: var(--sc-paper); border-color: var(--sc-ink); }

	/* Flavour tiles (Step 2) — 3-col grid of card tiles with serif name + mono sub */
	.sc-flavour-grid {
		display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
		border: 1px solid var(--sc-line); border-radius: 12px; overflow: hidden; background: #fff;
	}
	.sc-root .sc-flavour-tile {
		display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
		text-align: left; gap: 6px; padding: 18px 16px; min-height: 90px;
		background: #fff; border: 0;
		border-right: 1px solid var(--sc-line); border-bottom: 1px solid var(--sc-line);
		border-radius: 0;
	}
	.sc-flavour-tile:nth-child(3n) { border-right: 0; }
	.sc-flavour-grid > .sc-flavour-tile:nth-last-child(-n+3) { border-bottom: 0; }
	.sc-flavour-tile.is-active { background: var(--sc-ink); color: var(--sc-paper); }
	.sc-flavour-tile.is-active .sc-flavour-ex { color: rgba(243,238,229,0.7); }
	.sc-flavour-name { font-family: var(--sc-serif); font-style: italic; font-size: 18px; line-height: 1.1; }
	.sc-flavour-ex {
		font-family: var(--sc-mono); font-size: 10px; letter-spacing: 0.08em;
		color: var(--sc-muted); text-transform: lowercase;
	}

	/* Matrix tiles (Step 3) — 4-column tiles per axis */
	.sc-matrix-sub {
		margin: 26px 0 4px; font-size: 11px;
	}
	.sc-matrix-row { margin-bottom: 16px; }
	.sc-matrix-row .sc-eyebrow { display: block; margin-bottom: 8px; }
	.sc-root .sc-matrix-opts {
		display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
		background: #fff; border: 1px solid var(--sc-line); border-radius: 10px; overflow: hidden;
	}
	.sc-root .sc-matrix-opt {
		background: #fff; border: 0; border-right: 1px solid var(--sc-line);
		padding: 16px 8px; font-family: var(--sc-sans); font-size: 14px;
		color: var(--sc-ink); border-radius: 0; min-height: 52px;
	}
	.sc-matrix-opt:last-child { border-right: 0; }
	.sc-matrix-opt.is-active { background: var(--sc-ink); color: var(--sc-paper); }

	/* Mood chips (Step 4) — pill, generous padding */
	.sc-chipset[data-chipset="mood"] { gap: 10px; }
	.sc-root .sc-chipset[data-chipset="mood"] .sc-chip {
		padding: 14px 22px; font-size: 15px; min-height: 44px;
	}

	/* Score tile rows (Step 4) — soft card containing label + 5 numbered tiles */
	.sc-scores { display: flex; flex-direction: column; gap: 14px; }
	.sc-score-row {
		display: block;
		background: var(--sc-card); border: 1px solid var(--sc-line);
		border-radius: 12px; padding: 18px;
	}
	.sc-score-row .sc-field-label { margin: 0 0 14px; font-family: var(--sc-sans); font-size: 14px; color: var(--sc-ink); letter-spacing: 0; text-transform: none; }
	.sc-score-hint { display: none; }
	.sc-score-opts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
	.sc-root .sc-score-opt {
		background: var(--sc-ink); color: var(--sc-paper);
		border: 0; border-radius: 8px;
		padding: 14px 0; font-family: var(--sc-sans); font-size: 15px; font-weight: 500;
		min-height: 48px;
	}
	.sc-score-opt:not(.is-active) { background: transparent; color: var(--sc-ink); border: 1px solid var(--sc-line); }

	/* Wizard footer (navigation) — keep the v2.4 sticky bottom-bar tweak */
}

/* =====================================================================
   Glass slider — horizontal scroll of silhouettes with name underneath
   ===================================================================== */
.sc-glass-slider {
	display: flex; gap: 14px;
	overflow-x: auto; scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding: 6px 2px 12px;
	margin: 0 -2px 12px;
}
.sc-glass-slider::-webkit-scrollbar { height: 4px; }
.sc-glass-slider::-webkit-scrollbar-thumb { background: var(--sc-line); border-radius: 4px; }
.sc-root .sc-glass-tile {
	display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
	gap: 8px; padding: 12px 10px 10px;
	min-width: 88px; flex: 0 0 auto;
	background: var(--sc-card); border: 1px solid var(--sc-line); border-radius: 12px;
	cursor: pointer; scroll-snap-align: start;
	color: var(--sc-ink);
}
.sc-glass-tile.is-active { background: var(--sc-ink); color: var(--sc-paper); border-color: var(--sc-ink); }
.sc-glass-svg { display: block; line-height: 0; color: inherit; }
.sc-glass-svg svg { display: block; }
.sc-glass-name {
	font-family: var(--sc-mono); font-size: 10px; letter-spacing: 0.08em;
	text-transform: uppercase; color: inherit; opacity: 0.85;
	text-align: center;
}

/* =====================================================================
   Bar rating section (Step 4)
   ===================================================================== */
.sc-section-label { margin: 26px 0 10px; }
.sc-bar-ratings { display: flex; flex-direction: column; gap: 22px; }
.sc-rating-row { display: block; }
.sc-rating-label {
	margin: 0 0 10px;
	font-family: var(--sc-sans); font-size: 14px; color: var(--sc-ink);
}
.sc-rating-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-root .sc-rating-chip {
	font-size: 13px; padding: 8px 14px;
}
.sc-recommend { display: flex; flex-wrap: wrap; gap: 8px; }

/* Mobile — make the glass tiles a touch larger and ensure smooth horizontal scroll */
@media (max-width: 760px) {
	.sc-glass-tile { min-width: 84px; padding: 14px 10px 12px; }
	.sc-glass-svg svg { width: 36px; height: 40px; }
	.sc-rating-chip { padding: 10px 16px; min-height: 38px; }
}

/* =====================================================================
   Flavour groups (Step 2) — main category header + sub-flavour chips
   ===================================================================== */
.sc-flavour-groups { display: flex; flex-direction: column; gap: 22px; }
.sc-flavour-group {
	background: #fff; border: 1px solid var(--sc-line); border-radius: 12px;
	padding: 16px 18px;
}
.sc-flavour-main {
	margin: 0 0 12px;
	font-family: var(--sc-mono); font-size: 11px; letter-spacing: 0.12em;
	color: var(--sc-muted); text-transform: uppercase;
}
.sc-flavour-subs { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-root .sc-flavour-sub {
	background: var(--sc-paper); border: 1px solid var(--sc-line);
	color: var(--sc-ink); padding: 8px 14px;
	font-family: var(--sc-sans); font-size: 13px;
	border-radius: 999px;
}
.sc-root .sc-flavour-sub.is-active {
	background: var(--sc-ink); color: var(--sc-paper); border-color: var(--sc-ink);
}

@media (max-width: 760px) {
	.sc-flavour-group { padding: 14px 16px; }
	.sc-flavour-sub { padding: 10px 16px; font-size: 14px; min-height: 36px; }
}

/* =====================================================================
   Glass picker — dropdown + live silhouette preview
   ===================================================================== */
.sc-glass-picker {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 16px;
	align-items: center;
	margin: 6px 0 8px;
}
.sc-glass-picker .sc-glass-select { width: 100%; }
.sc-glass-preview {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	min-width: 110px; min-height: 110px;
	padding: 12px 14px;
	background: var(--sc-card); border: 1px solid var(--sc-line);
	border-radius: 12px;
	color: var(--sc-ink);
}
.sc-glass-preview-hint {
	font-family: var(--sc-mono); font-size: 10px; letter-spacing: 0.08em;
	color: var(--sc-muted); text-align: center; text-transform: uppercase;
	line-height: 1.4; max-width: 14ch;
}
.sc-glass-preview-card {
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	margin: 0;
}
.sc-glass-preview-card svg { display: block; color: var(--sc-ink); }
.sc-glass-preview-name {
	font-family: var(--sc-mono); font-size: 10px; letter-spacing: 0.08em;
	text-transform: uppercase; color: var(--sc-muted);
	text-align: center;
}

@media (max-width: 600px) {
	.sc-glass-picker { grid-template-columns: 1fr; }
	.sc-glass-preview { min-height: 130px; }
}

/* =====================================================================
   CTA action cards (Dashboard repeater)
   ===================================================================== */
.sc-cta-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px; margin: 22px 0;
}
.sc-root .sc-cta-card {
	position: relative; display: flex; flex-direction: column; gap: 6px;
	padding: 18px 20px;
	background: var(--sc-card); border: 1px solid var(--sc-line);
	border-radius: 12px; color: var(--sc-ink); text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
a.sc-cta-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(26,23,20,0.06); }
.sc-cta-card .sc-eyebrow { margin: 0 0 4px; }
.sc-cta-label { font-family: var(--sc-serif); font-size: 1.2rem; font-style: italic; line-height: 1.15; }
.sc-cta-desc { font-size: 13px; color: var(--sc-muted); }
.sc-cta-icon {
	position: absolute; top: 14px; right: 16px;
	font-size: 18px; color: var(--sc-ink);
}

/* Login footnote */
.sc-login-foot { margin-top: 12px; font-size: 12px; color: var(--sc-muted); text-align: center; }
.sc-login-foot a { text-decoration: underline; }

/* =====================================================================
   Journal — clean tools row + filter drawer + icon buttons
   ===================================================================== */
.sc-journal-actions {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	margin-left: auto;
}
.sc-root .sc-icon-btn {
	-webkit-appearance: none; -moz-appearance: none; appearance: none;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 14px;
	background: #fff;
	border: 1px solid var(--sc-line);
	border-radius: 999px;
	color: var(--sc-ink);
	font-family: var(--sc-mono); font-size: 11px; letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}
.sc-root .sc-icon-btn:hover { border-color: var(--sc-ink); }
.sc-root .sc-icon-btn.is-active { background: var(--sc-ink); color: var(--sc-paper); border-color: var(--sc-ink); }
.sc-icon-btn svg { flex: 0 0 auto; opacity: 0.9; }
.sc-icon-btn[disabled] { opacity: 0.5; cursor: wait; }
.sc-filter-count {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 18px; height: 18px; padding: 0 5px;
	background: var(--sc-ink); color: var(--sc-paper);
	border-radius: 999px;
	font-family: var(--sc-mono); font-size: 10px; letter-spacing: 0;
}
.sc-icon-btn.is-active .sc-filter-count { background: var(--sc-paper); color: var(--sc-ink); }

.sc-spirit-chips { margin: 12px 0 0; }

/* Drawer */
.sc-filter-panel {
	margin: 14px 0 4px;
	padding: 18px 20px 12px;
	background: var(--sc-card);
	border: 1px solid var(--sc-line);
	border-radius: 12px;
	display: flex; flex-direction: column; gap: 14px;
}
.sc-filter-panel[hidden] { display: none !important; }
.sc-filter-row {
	display: grid;
	grid-template-columns: 80px 1fr;
	align-items: center; gap: 12px;
}
.sc-filter-row .sc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-filter-row-label { margin: 0; align-self: center; }
.sc-filter-row--input .sc-select { width: 100%; max-width: 360px; }
.sc-filter-footer {
	display: flex; justify-content: flex-end;
	padding-top: 4px; border-top: 1px solid var(--sc-line);
}

@media (max-width: 640px) {
	.sc-filter-row { grid-template-columns: 1fr; gap: 6px; }
	.sc-filter-row-label { margin-bottom: 2px; }
	.sc-journal-actions { width: 100%; justify-content: flex-start; }
	.sc-root .sc-icon-btn { padding: 8px 12px; }
}

/* =====================================================================
   PRINT — when the journal triggers Save-as-PDF
   ===================================================================== */
@media print {
	/* Hide everything outside the print target on the whole page.
	   This is the cleanest cross-theme way to print just our widget. */
	html.sc-printing body * { visibility: hidden !important; }
	html.sc-printing .sc-print-target,
	html.sc-printing .sc-print-target * { visibility: visible !important; }
	html.sc-printing .sc-print-target {
		position: absolute; inset: 0;
		left: 0; top: 0; width: 100%;
		background: #fff; color: #1a1714;
		padding: 24mm 18mm;
		font-size: 12pt;
	}

	/* Strip UI chrome that doesn't belong on paper. */
	.sc-print-target .sc-journal-tools,
	.sc-print-target .sc-chips,
	.sc-print-target .sc-filter-row,
	.sc-print-target .sc-export-bar,
	.sc-print-target .sc-view-toggle,
	.sc-print-target .sc-noresults { display: none !important; }

	/* Header reads more like a printed title page. */
	.sc-print-target .sc-journal-head .sc-eyebrow {
		font-size: 9pt; letter-spacing: 0.18em;
	}
	.sc-print-target .sc-journal-head .sc-display {
		font-size: 28pt; line-height: 1.05; margin: 6pt 0;
	}
	.sc-print-target .sc-journal-head .sc-body {
		font-size: 11pt; max-width: 60ch;
	}

	/* Force list-style rows in print regardless of toggle state, and let
	   the browser break entries across pages cleanly. */
	.sc-print-target .sc-journal-items {
		display: block !important; margin-top: 14pt;
	}
	.sc-print-target .sc-entry-card[style*="display: none"],
	.sc-print-target .sc-entry-card[style*="display:none"] { display: none !important; }
	.sc-print-target .sc-entry-card {
		display: grid !important;
		grid-template-columns: 24mm 1fr auto;
		gap: 10mm; padding: 6mm 0;
		border-top: 0.4pt solid #cdc5b6;
		border-radius: 0; background: transparent; box-shadow: none;
		text-decoration: none; color: inherit;
		page-break-inside: avoid; break-inside: avoid;
	}
	.sc-print-target .sc-entry-card:first-of-type { border-top: 0; }
	.sc-print-target .sc-thumb {
		width: 24mm; height: 24mm; aspect-ratio: auto;
		background-size: cover; background-position: center;
		border-radius: 2mm;
	}
	.sc-print-target .sc-thumb-tag {
		display: flex; align-items: center; justify-content: center;
		width: 100%; height: 100%;
		font-family: var(--sc-mono); font-size: 8pt; color: #8a8175;
		background: #f3eee5;
	}
	.sc-print-target .sc-entry-body { display: flex; flex-direction: column; gap: 2mm; }
	.sc-print-target .sc-entry-top { display: flex; gap: 6mm; align-items: baseline; }
	.sc-print-target .sc-display { font-size: 14pt; line-height: 1.15; margin: 0; }
	.sc-print-target .sc-meta-line { font-size: 10pt; color: #3a342d; margin: 0; }
	.sc-print-target .sc-taglist .sc-tag {
		display: inline-block; padding: 1pt 5pt; margin-right: 3pt;
		font-family: var(--sc-mono); font-size: 8pt; text-transform: uppercase;
		border: 0.4pt solid #cdc5b6; border-radius: 99pt;
	}
	.sc-print-target .sc-dots { font-family: var(--sc-mono); font-size: 10pt; }

	/* A small print-only signature appended after the list. */
	.sc-print-target .sc-journal-items::after {
		content: "Generated by Spirit & Crafts · " attr(data-print-stamp);
		display: block; margin-top: 10mm;
		font-family: var(--sc-mono); font-size: 8pt; color: #8a8175; text-align: right;
		page-break-inside: avoid;
	}

	@page { margin: 18mm 14mm; }
}

/* =====================================================================
   Flavour with main category prefix (everywhere flavour chips appear)
   ===================================================================== */
.sc-tag-main {
	font-family: var(--sc-mono); font-size: 10px;
	color: var(--sc-muted); text-transform: uppercase; letter-spacing: 0.06em;
}

/* Grouped flavour display (single-entry detail) */
.sc-flavour-grouped { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 12px; }
.sc-flavour-grouped-row {
	display: grid;
	grid-template-columns: 80px 1fr;
	align-items: baseline;
	gap: 14px;
}
.sc-flavour-grouped-main { margin: 0; }
.sc-flavour-extras { margin-top: 6px; }

@media (max-width: 600px) {
	.sc-flavour-grouped-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Square-cropped thumbnails on journal list rows (front-end). */
[data-layout="list"] .sc-thumb {
	width: 72px; height: 72px; aspect-ratio: 1; flex: 0 0 auto;
	background-size: cover; background-position: center;
	border-radius: 4px;
}
@media (max-width: 740px) {
	[data-layout="list"] .sc-thumb { width: 52px; height: 52px; }
}

/* =====================================================================
   Cocktail Crawl — stats strip · tools row · richer bar cards
   ===================================================================== */
.sc-crawl-summary {
	display: grid; gap: 12px; margin: 14px 0 18px;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.sc-crawl-tools {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	margin: 14px 0 12px;
}
.sc-crawl-tools .sc-search { flex: 1 1 220px; min-width: 180px; }
.sc-select-wrap {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 2px 12px 2px 4px;
	background: var(--sc-card); border: 1px solid var(--sc-line); border-radius: 999px;
}
.sc-select-wrap .sc-select-label { margin: 0; padding: 6px 4px 6px 10px; }
.sc-select-wrap .sc-select {
	border: 0; background: transparent; padding: 6px 10px 6px 0;
	font-family: var(--sc-sans); font-size: 13px;
}

/* Rich card rows */
.sc-bar-lastvisit,
.sc-bar-signature,
.sc-bar-rating {
	display: grid; grid-template-columns: 80px 1fr; align-items: baseline;
	gap: 12px; margin: 4px 0;
	font-family: var(--sc-sans); font-size: 13px; color: var(--sc-ink-2);
}
.sc-bar-lastvisit .sc-eyebrow,
.sc-bar-signature .sc-eyebrow,
.sc-bar-rating .sc-eyebrow { margin: 0; }
.sc-bar-recommend { margin-top: 8px; }
.sc-bar-recommend .sc-eyebrow { margin: 0 0 6px; }
.sc-bar-recommend .sc-pillset { gap: 6px; }

/* Grid vs list — cards in list layout are horizontal for readability. */
.sc-crawl-grid[data-layout="grid"] {
	display: grid; gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.sc-crawl-grid[data-layout="list"] { display: flex; flex-direction: column; gap: 10px; }
.sc-crawl-grid[data-layout="list"] .sc-bar-card { padding: 18px 22px; }

@media (max-width: 640px) {
	.sc-bar-lastvisit, .sc-bar-signature, .sc-bar-rating { grid-template-columns: 1fr; gap: 2px; }
	.sc-crawl-tools .sc-select-wrap { width: 100%; justify-content: space-between; }
}

/* =====================================================================
   Defensive: the browser's default `[hidden] { display:none }` gets
   trampled by aggressive theme button styles. Force it back for our
   scoped elements so nextBtn / saveBtn toggling works reliably.
   ===================================================================== */
.sc-root [hidden],
.sc-root button[hidden],
.sc-root .sc-btn[hidden] { display: none !important; }

/* =====================================================================
   Photo — camera + gallery button pair
   ===================================================================== */
.sc-photo-actions {
	display: flex; gap: 8px; flex-wrap: wrap;
	margin-top: 8px;
}
.sc-root .sc-photo-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 14px;
	font-family: var(--sc-mono); font-size: 11px; letter-spacing: 0.08em;
	text-transform: uppercase;
}
.sc-photo-btn svg { flex: 0 0 auto; opacity: 0.9; }
.sc-photo-drop { cursor: pointer; }
@media (max-width: 480px) {
	.sc-photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
	.sc-root .sc-photo-btn { justify-content: center; width: 100%; }
}

/* =====================================================================
   Wizard — validation errors, rounded matrix buttons, toggle, Other
   ===================================================================== */
.sc-req { color: #c0392b; font-weight: 600; }
.sc-field-error {
	margin: 4px 0 0; padding: 0;
	font-family: var(--sc-sans); font-size: 12px; color: #c0392b;
}
.sc-input--error {
	border-color: #c0392b !important;
	box-shadow: 0 0 0 1px rgba(192,57,43,0.2) !important;
}

/* Matrix buttons → rounded like sub-flavour chips */
.sc-root .sc-matrix-opt {
	-webkit-appearance: none; -moz-appearance: none; appearance: none;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 8px 16px;
	background: var(--sc-card); color: var(--sc-ink);
	border: 1px solid var(--sc-line); border-radius: 999px;
	font-family: var(--sc-sans); font-size: 13px;
	cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.sc-root .sc-matrix-opt:hover { border-color: var(--sc-ink); }
.sc-root .sc-matrix-opt.is-active {
	background: var(--sc-ink); color: var(--sc-paper); border-color: var(--sc-ink);
}

/* Other input (spirit, country, flavour) */
.sc-other-input {
	margin-top: 8px;
}
.sc-flavour-other-input {
	width: 100%; max-width: 280px;
	margin-top: 6px;
}

/* Favorite toggle (My Bar collectible style) */
.sc-toggle-label {
	display: inline-flex; align-items: center; gap: 10px;
	margin-top: 14px; cursor: pointer; user-select: none;
}
.sc-toggle {
	position: absolute; opacity: 0; width: 0; height: 0;
}
.sc-toggle-pill {
	position: relative;
	display: inline-block; width: 42px; height: 24px;
	background: var(--sc-line); border-radius: 12px;
	transition: background .2s ease;
}
.sc-toggle-pill::after {
	content: ''; position: absolute;
	top: 3px; left: 3px; width: 18px; height: 18px;
	background: #fff; border-radius: 50%;
	transition: transform .2s ease;
}
.sc-toggle:checked + .sc-toggle-pill { background: var(--sc-ink); }
.sc-toggle:checked + .sc-toggle-pill::after { transform: translateX(18px); }
.sc-toggle-text {
	font-family: var(--sc-mono); font-size: 12px; text-transform: uppercase;
	letter-spacing: 0.08em; color: var(--sc-ink-2);
}

/* Chip Other variant */
.sc-root .sc-chip--other {
	border-style: dashed;
}

/* =====================================================================
   Offline queue badge
   ===================================================================== */
.sc-offline-badge {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 14px;
	background: #fef3cd; color: #856404;
	border: 1px solid #ffc107;
	border-radius: 999px;
	font-family: var(--sc-mono); font-size: 11px; letter-spacing: 0.06em;
	text-transform: uppercase;
}
.sc-offline-badge[hidden] { display: none !important; }

/* =====================================================================
   File inputs: visually hidden but STILL RENDERED.
   A `display:none` / `[hidden]` file input cannot be opened via .click()
   in Safari and several Chrome builds — the browser refuses to show the
   picker for a non-rendered element. This keeps it in the layout tree at
   1x1px, clipped and off-screen, so programmatic .click() works everywhere.
   ===================================================================== */
.sc-root .sc-file-input {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Single-entry delete button placement */
.sc-entry-delete { display: block; width: 100%; text-align: center; margin-top: 10px; }

/* =====================================================================
   Access gate — sign-in prompt + bounce notice
   ===================================================================== */
.sc-signin-prompt {
	display: flex; flex-direction: column; align-items: center; gap: 14px;
	text-align: center; padding: 32px 24px;
}
.sc-signin-prompt p { margin: 0; }
.sc-gate-notice {
	margin: 0 0 14px;
	padding: 10px 16px;
	background: #fef3cd; color: #856404;
	border: 1px solid #ffc107; border-radius: 8px;
	font-family: var(--sc-sans); font-size: 13px; text-align: center;
}

/* =====================================================================
   Profile widget — field grid, hints, input prefix
   ===================================================================== */
.sc-profile-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px 20px;
	margin: 20px 0;
}
@media (max-width: 560px) {
	.sc-profile-grid { grid-template-columns: 1fr; }
}
.sc-profile .sc-field { margin: 0; }
.sc-field-hint {
	margin: 4px 0 0;
	font-family: var(--sc-sans); font-size: 12px; color: var(--sc-ink-2, #6b6357);
}
.sc-input-prefix {
	display: flex; align-items: center;
	border: 1px solid var(--sc-line); border-radius: 8px;
	overflow: hidden; background: var(--sc-card);
}
.sc-input-prefix > span {
	padding: 0 10px; font-family: var(--sc-mono); color: var(--sc-ink-2, #6b6357);
	border-right: 1px solid var(--sc-line); align-self: stretch; display: flex; align-items: center;
}
.sc-input-prefix .sc-input { border: 0; border-radius: 0; background: transparent; flex: 1; }
.sc-profile .sc-view-toggle { width: 100%; }
.sc-profile .sc-view-toggle .sc-view-btn { flex: 1; }

/* =====================================================================
   Geolocation status (wizard Step 1) — silent capture, tiny status line
   ===================================================================== */
.sc-geo-status {
	display: block;
	margin-top: 6px;
	font-family: var(--sc-mono); font-size: 11px; letter-spacing: 0.04em;
	color: var(--sc-ink-2, #6b6357);
}

/* =====================================================================
   Profile — danger zone (account deletion)
   ===================================================================== */
.sc-danger-zone {
	margin-top: 32px;
	padding: 18px 20px;
	border: 1px solid rgba(160, 59, 42, 0.35);
	border-radius: 10px;
	background: rgba(160, 59, 42, 0.04);
}
.sc-danger-copy {
	margin: 4px 0 14px;
	font-size: 13px;
	color: var(--sc-ink-2, #6b6357);
}
.sc-danger-confirm {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed rgba(160, 59, 42, 0.3);
}
.sc-danger-confirm .sc-input {
	max-width: 220px;
	margin: 8px 0 12px;
}
.sc-danger-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.sc-root .sc-btn--danger {
	background: #a03b2a;
	color: #fff;
	border-color: #a03b2a;
}
.sc-root .sc-btn--danger:hover { background: #8a3223; }
.sc-root .sc-btn--danger[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

/* =====================================================================
   Restored-account toast (shown after a cancelled deletion)
   ===================================================================== */
.sc-restored-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	z-index: 9999;
	max-width: calc(100vw - 32px);
	padding: 12px 20px;
	background: var(--sc-ink, #1a1714);
	color: var(--sc-paper, #f3eee5);
	border-radius: 999px;
	font-family: var(--sc-sans);
	font-size: 13px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.25);
	opacity: 1;
	transition: opacity 0.4s ease, transform 0.4s ease;
}
.sc-restored-toast.is-hiding {
	opacity: 0;
	transform: translateX(-50%) translateY(8px);
}
