/* SeekySense demos: one stylesheet, mobile first, light and dark. */
:root {
	--bg: #f6f7fb;
	--surface: #ffffff;
	--surface-2: #f0f2f8;
	--text: #141826;
	--muted: #5b6275;
	--border: #dfe3ee;
	--accent: #4f46e5;
	--accent-2: #7c3aed;
	--accent-soft: #eef0ff;
	--on-accent: #ffffff;
	--good: #0f8a5f;
	--good-soft: #e3f6ee;
	--warn: #a15c00;
	--warn-soft: #fff3df;
	--bad: #c0263b;
	--bad-soft: #fde8eb;
	--shadow: 0 1px 2px rgba(20, 24, 38, .06), 0 6px 24px rgba(20, 24, 38, .06);
	--radius: 14px;
	--radius-s: 10px;
	--header-h: 56px;
	--gutter: 16px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0e1118;
		--surface: #171b25;
		--surface-2: #1f2430;
		--text: #e8ebf3;
		--muted: #9aa3b8;
		--border: #2b3140;
		--accent: #8b85ff;
		--accent-2: #b48cff;
		--accent-soft: #23234a;
		--on-accent: #0e1118;
		--good: #4cd3a0;
		--good-soft: #12312a;
		--warn: #f2b45c;
		--warn-soft: #362812;
		--bad: #ff7d8e;
		--bad-soft: #3a1820;
		--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 24px rgba(0, 0, 0, .3);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0e1118;
	--surface: #171b25;
	--surface-2: #1f2430;
	--text: #e8ebf3;
	--muted: #9aa3b8;
	--border: #2b3140;
	--accent: #8b85ff;
	--accent-2: #b48cff;
	--accent-soft: #23234a;
	--on-accent: #0e1118;
	--good: #4cd3a0;
	--good-soft: #12312a;
	--warn: #f2b45c;
	--warn-soft: #362812;
	--bad: #ff7d8e;
	--bad-soft: #3a1820;
	--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 24px rgba(0, 0, 0, .3);
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); overflow-x: hidden; }
img, video, canvas { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.5rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--muted); }
code, kbd { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- header */
.app-header { position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center; gap: 10px; padding: 0 var(--gutter); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.app-brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 700; white-space: nowrap; }
.app-brand svg { flex: none; }
.app-brand span.page { font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.app-header .spacer { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .8rem; border: 1px solid var(--border); white-space: nowrap; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.chip[data-state="ready"] .dot { background: var(--good); }
.chip[data-state="loading"] .dot { background: var(--warn); animation: pulse 1s infinite alternate; }
.chip[data-state="error"] .dot { background: var(--bad); }
@keyframes pulse { to { opacity: .3; } }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }

/* ---------------------------------------------------------------- layout */
.page { max-width: 1160px; margin: 0 auto; padding: 16px var(--gutter) 96px; }
.page-intro { margin: 8px 0 16px; }
.page-intro p { color: var(--muted); max-width: 70ch; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.cols { display: grid; gap: 16px; }
@media (min-width: 900px) {
	.cols.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.cols.side { grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
	.cols.side > aside { position: sticky; top: calc(var(--header-h) + 16px); }
	h1 { font-size: 1.9rem; }
}

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; touch-action: manipulation; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .88rem; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
input[type="text"], input[type="search"], input[type="number"], select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
textarea { min-height: 120px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 32px; }
label.field { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 4px; }
.field-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.field-row output { font-family: var(--mono); font-size: .85rem; color: var(--muted); min-width: 3.5em; text-align: right; }

.searchbar { position: sticky; top: calc(var(--header-h) + 8px); z-index: 20; display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.searchbar input { border: 0; min-height: 44px; padding: 0 8px; background: transparent; }
.searchbar input:focus { outline: none; }
.searchbar:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }

.pills { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.pill .lang { font-size: .72rem; font-weight: 700; color: var(--muted); margin-right: 6px; text-transform: uppercase; }

.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--text); font-size: .92rem; }
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--bad-soft); }
.notice.good { background: var(--good-soft); }
.notice > :last-child { margin-bottom: 0; }

details.how { border: 1px dashed var(--border); border-radius: var(--radius-s); padding: 0 14px; background: var(--surface); }
details.how summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
details.how[open] { padding-bottom: 12px; }
details.how ol, details.how ul { margin: 0; padding-left: 1.2em; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 32px 12px; }
.score { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; }

table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.data th { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
mark { background: color-mix(in srgb, var(--warn) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------------------------------------------------------------- sheets (menu, consent, filters) */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 88vh; border-radius: 20px 20px 0 0; background: var(--surface); color: var(--text); box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); }
.sheet::backdrop { background: rgba(10, 12, 20, .5); }
.sheet[open] { animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: .6; } }
.sheet .sheet-head { position: sticky; top: 0; display: flex; align-items: center; gap: 8px; padding: 10px 8px 6px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.sheet .sheet-head h2 { margin: 0; flex: 1; font-size: 1.05rem; }
.sheet .sheet-body { padding: 16px; overflow: auto; max-height: calc(88vh - 60px); }
@media (min-width: 700px) {
	.sheet { margin: auto; border-radius: 20px; }
}
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a { display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 8px 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.nav-list a:hover, .nav-list a[aria-current="page"] { background: var(--surface-2); }
.nav-list a .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.nav-list a small { display: block; }

/* ---------------------------------------------------------------- progress dock */
.dock { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; width: min(560px, calc(100vw - 2 * var(--gutter))); padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 40px rgba(0, 0, 0, .2); font-size: .9rem; }
.dock[hidden] { display: none; }
.dock .bar { margin-top: 8px; height: 8px; }
.toast { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: .9rem; box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- WebGPU guide */
.gpu-guide { border: 1px solid var(--border); border-left: 4px solid var(--warn); }
.gpu-guide h2 { display: flex; gap: 8px; align-items: center; }
.gpu-guide ul { padding-left: 1.2em; margin: 8px 0 0; }
.gpu-guide li { margin-bottom: 8px; }
.flag-box { display: flex; gap: 8px; align-items: center; margin: 8px 0; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--surface-2); font-family: var(--mono); font-size: .85rem; overflow-x: auto; }
.flag-box code { background: none; padding: 0; white-space: nowrap; flex: 1; }
.gpu-guide.highlight { border-left-color: var(--accent); }

/* ---------------------------------------------------------------- gallery */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.demo-card { display: flex; flex-direction: column; gap: 8px; color: var(--text); text-decoration: none; transition: transform .15s; }
.demo-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.demo-card .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.demo-card p { color: var(--muted); font-size: .92rem; margin: 0; flex: 1; }
.demo-card.flagship { grid-column: 1 / -1; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.status-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.status-grid > div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.status-grid b { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- shoes */
.products { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.product { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.product .photo { position: relative; aspect-ratio: 1; background: #fff; }
.product .photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product .photo .badge { position: absolute; top: 8px; left: 8px; }
.product .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product .brand { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.product .name { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.product .price { font-weight: 700; }
.product .price s { color: var(--muted); font-weight: 400; font-size: .85em; margin-left: 4px; }
.product .meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.product .variants { display: flex; gap: 4px; margin-top: 4px; overflow-x: auto; scrollbar-width: none; }
.product .variants button { flex: none; width: 40px; height: 40px; padding: 0; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; overflow: hidden; }
.product .variants button[aria-pressed="true"] { outline: 2px solid var(--accent); }
.product .variants img { width: 100%; height: 100%; object-fit: contain; }
.product .actions { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; }
.product .explain { font-size: .78rem; color: var(--muted); }
.query-image { display: flex; gap: 12px; align-items: center; }
.query-image img { width: 72px; height: 72px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--border); }
.facet { margin-bottom: 14px; }
.facet h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.facet .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.facet .pill { min-height: 34px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); vertical-align: -1px; margin-right: 4px; }
.only-mobile { display: initial; }
.only-desktop { display: none; }
@media (min-width: 900px) { .only-mobile { display: none !important; } .only-desktop { display: initial; } }

/* ---------------------------------------------------------------- ranking lab */
.lab-cols { display: grid; gap: 12px; grid-auto-flow: column; grid-auto-columns: minmax(78%, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.lab-cols > .card { scroll-snap-align: start; padding: 12px; }
@media (min-width: 1000px) { .lab-cols { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; } }
.hit { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.hit:last-child { border-bottom: 0; }
.hit .rank { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); font-size: .74rem; font-weight: 700; margin-right: 6px; }
.hit.rel .rank { background: var(--good-soft); color: var(--good); }
.hit .t { font-weight: 600; }
.hit .d { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.metric { font-family: var(--mono); font-size: .85rem; }

/* ---------------------------------------------------------------- docs / pdf */
.doc-view { max-height: 70vh; overflow: auto; border-radius: var(--radius-s); background: var(--surface-2); padding: 8px; }
.doc-page { position: relative; margin: 0 auto 12px; background: #fff; box-shadow: var(--shadow); }
.doc-page canvas { display: block; width: 100%; height: auto; }
.doc-page .hl { position: absolute; background: rgba(255, 196, 0, .35); border-radius: 2px; mix-blend-mode: multiply; pointer-events: none; }
.doc-page .pno { position: absolute; top: 6px; right: 8px; font-size: .72rem; color: #555; background: rgba(255, 255, 255, .8); padding: 0 6px; border-radius: 6px; }
.passage { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.passage:hover { border-color: var(--accent); }
.passage .src { font-size: .78rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.answer { line-height: 1.6; }
.answer sup a { text-decoration: none; font-weight: 700; padding: 0 2px; }

/* ---------------------------------------------------------------- BI */
.treemap { display: flex; flex-wrap: wrap; gap: 4px; min-height: 220px; }
.treemap > button { position: relative; flex-grow: 1; min-width: 90px; min-height: 64px; padding: 8px 10px; border: 0; border-radius: 10px; color: #fff; text-align: left; font: inherit; cursor: pointer; overflow: hidden; }
.treemap > button b { display: block; font-size: .9rem; line-height: 1.2; }
.treemap > button span { font-size: .78rem; opacity: .9; }
.treemap > button[aria-pressed="true"] { outline: 3px solid var(--text); outline-offset: 1px; }
.scatter { width: 100%; aspect-ratio: 4 / 3; background: var(--surface-2); border-radius: var(--radius-s); display: block; touch-action: pan-y; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .82rem; }

/* ---------------------------------------------------------------- jobs */
.job { display: grid; gap: 4px; }
.job .head { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.job .why { font-size: .85rem; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 8px; margin-top: 4px; }
.skills { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------------------------------------------------------------- video */
.player { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; }
.moments { display: grid; gap: 10px; }
.moment { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.moment:hover { border-color: var(--accent); }
.moment img { width: 128px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #000; }
.moment .tc { font-family: var(--mono); font-weight: 700; }
.moment .alts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.timeline { position: relative; height: 34px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.timeline i { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--accent); }
.timeline b { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.filmstrip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; scroll-snap-type: x proximity; }
.filmstrip button { flex: none; width: 112px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; scroll-snap-align: start; font: inherit; color: inherit; overflow: hidden; }
.filmstrip img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.filmstrip span { display: block; font-size: .72rem; font-family: var(--mono); padding: 2px 4px; }

/* ---------------------------------------------------------------- crop dialog (assets/sdk/image-input.js) */
.seekysense-crop { border: 0; border-radius: 16px; padding: 16px; width: min(960px, calc(100vw - 16px)); max-width: none; background: var(--surface); color: var(--text); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.seekysense-crop::backdrop { background: rgba(10, 12, 20, .65); }
.seekysense-crop h2 { margin: 0 0 4px; font-size: 1.05rem; }
.seekysense-crop__help { margin: 0 0 12px; color: var(--muted); font-size: .88rem; }
.seekysense-crop__stage { position: relative; margin: 0 auto; user-select: none; -webkit-user-select: none; touch-action: none; }
.seekysense-crop__canvas { display: block; width: 100%; height: 100%; }
.seekysense-crop__rect { position: absolute; border: 2px solid #fff; outline: 1px solid rgba(0, 0, 0, .6); box-shadow: 0 0 0 9999px rgba(10, 12, 20, .5); cursor: move; touch-action: none; }
.seekysense-crop__handle { position: absolute; width: 26px; height: 26px; background: #fff; border: 2px solid #1e293b; border-radius: 50%; }
.seekysense-crop__handle[data-h="nw"] { left: -14px; top: -14px; cursor: nwse-resize; }
.seekysense-crop__handle[data-h="ne"] { right: -14px; top: -14px; cursor: nesw-resize; }
.seekysense-crop__handle[data-h="sw"] { left: -14px; bottom: -14px; cursor: nesw-resize; }
.seekysense-crop__handle[data-h="se"] { right: -14px; bottom: -14px; cursor: nwse-resize; }
.seekysense-crop__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.seekysense-crop__actions .seekysense-btn { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.seekysense-crop__actions .seekysense-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 520px) { .seekysense-crop__actions .seekysense-btn { flex: 1 1 100%; } }

.app-footer { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter) 32px; color: var(--muted); font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Cards laid out by a grid never stack: no vertical rhythm margin. */
.cols > .card + .card, .lab-cols > .card + .card, .gallery > .card + .card, .products > .card + .card { margin-top: 0; }
.flag-box { flex-wrap: wrap; }
.flag-box code { white-space: normal; word-break: break-all; min-width: 0; }

/* Benefit callout and KPI tiles */
.benefit { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); font-size: .95rem; max-width: 80ch; }
.benefit b { color: var(--accent); }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 800px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 1.35rem; letter-spacing: -.01em; }
.kpi small { color: var(--muted); font-size: .8rem; }
.gbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 6px 4px; border-radius: 8px; cursor: pointer; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; width: 100%; }
.gbar:hover, .gbar[aria-pressed="true"] { background: var(--surface-2); }
.gbar .bar { grid-column: 1 / -1; height: 8px; }
.heat td { width: 7%; height: 28px; border-radius: 4px; }
.heat th { font-weight: 600; font-size: .78rem; color: var(--muted); white-space: nowrap; padding: 2px 6px; text-align: left; }
.heat { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 560px; }
.trend svg { width: 100%; height: auto; display: block; }
.match-tag { font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }

/* Business app */
.erp-menu summary { min-height: 44px; display: flex; gap: 8px; align-items: center; cursor: pointer; }
.erp-menu details { margin: 4px 0; }
.erp-menu details summary { min-height: 36px; font-weight: 600; font-size: .92rem; }
.erp-menu ul { list-style: none; margin: 0 0 6px; padding-left: 12px; }
.erp-menu li button { width: 100%; text-align: left; min-height: 36px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: .9rem; cursor: pointer; }
.erp-menu li button:hover, .erp-menu li button[aria-current="true"] { background: var(--accent-soft); color: var(--accent); }
.erp-menu .sec { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 6px 0 2px 8px; }
@media (min-width: 900px) { #tree-wrap:not([open]) { } }
.erp-screen { border-left: 4px solid var(--accent); }
.crumb { font-size: .82rem; color: var(--muted); }
.result-btn { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.result-btn:hover { border-color: var(--accent); }
.status { font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.status.Paid { background: var(--good-soft); color: var(--good); }
.status.Overdue { background: var(--bad-soft); color: var(--bad); }
.status.Sent { background: var(--accent-soft); color: var(--accent); }
.status.Draft { background: var(--surface-2); color: var(--muted); }
@media (max-width: 760px) {
	table.grid thead { display: none; }
	table.grid, table.grid tbody, table.grid tr, table.grid td { display: block; width: 100%; }
	table.grid tr { padding: 10px 6px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
	table.grid td { border: 0; padding: 0; }
	table.grid td.c-desc { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; }
	table.grid td.c-amount { text-align: right; font-weight: 700; }
	table.grid td.c-due { font-size: .8rem; color: var(--muted); }
}
.app-footer p { margin: 0 0 6px; }
.app-footer .credits { font-size: .76rem; opacity: .85; }

/* Home */
.hero { padding: 20px 0 8px; }
.hero h1 { font-size: 2rem; letter-spacing: -.02em; background: linear-gradient(90deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.06rem; color: var(--muted); max-width: 62ch; }
@media (min-width: 900px) { .hero h1 { font-size: 2.8rem; } }
.values { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 12px 0 16px; }
.values > div { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.values b { display: block; margin-bottom: 4px; }
.values p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Language switcher: discreet, top right */
.lang { position: relative; flex: none; }
.lang-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; min-width: 44px; padding: 0 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .03em; cursor: pointer; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--border); background: var(--surface-2); color: var(--text); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 150px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.lang-menu button { display: block; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--surface-2); }
.lang-menu button[aria-current="true"] { color: var(--accent); font-weight: 700; }
.chip .txt { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .app-header { gap: 4px; padding: 0 10px; } .app-brand > span:first-of-type { display: none; } }
.app-footer .company { font-size: .8rem; }

/* Restaurant */
.resto-hero { margin: 8px 0 14px; padding: 20px 18px; border-radius: var(--radius); background: linear-gradient(135deg, #5b1a2a, #8a2c3c 60%, #b5804a); color: #fff; }
.resto-hero h1 { color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; letter-spacing: .01em; margin: 0 0 6px; }
.resto-hero p { color: rgba(255, 255, 255, .88); margin: 0; max-width: 62ch; }
.resto-kicker { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; opacity: .8; margin-bottom: 4px !important; }
.wine-cta { display: flex; gap: 12px; align-items: center; width: 100%; margin: 4px 0 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px dashed #8a2c3c; background: color-mix(in srgb, #8a2c3c 8%, var(--surface)); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.wine-cta small { color: var(--muted); }
.wine-cta-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #8a2c3c; color: #fff; }
.scroll-seg { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; }
.scroll-seg::-webkit-scrollbar { display: none; }
.scroll-seg button { flex: none; }
.course-title { font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.menu-list { display: grid; gap: 10px; }
@media (min-width: 760px) { .menu-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .menu-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mi { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px; text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.mi.no-photo { grid-template-columns: minmax(0, 1fr); }
.mi .ph { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.mi.wine .ph { object-fit: contain; background: #fff; }
.mi .nm { font-weight: 700; line-height: 1.25; }
.mi .ds { color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0 4px; }
.mi .ft { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mi .pr { font-weight: 700; margin-left: auto; white-space: nowrap; }
.tag { font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--good-soft); color: var(--good); white-space: nowrap; }
.tag.health { background: var(--warn-soft); color: var(--warn); }
.tag.kind { background: var(--surface-2); color: var(--muted); }
.detail-photo { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.detail-photo.wine { object-fit: contain; background: #fff; }
.pairing { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--border); margin-top: 8px; cursor: pointer; background: var(--surface); width: 100%; font: inherit; color: inherit; text-align: left; }
.pairing img { width: 48px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; }
