/* Thrift for Good prototype. Tokens are set from app.js (palette + season). */
:root {
  --page: #F4F0EA;
  --card: #FFFFFF;
  --muted: #EBE5DC;
  --border: #E0D8CC;
  --action: #1A7068;
  --action-hover: #155C55;
  --on-action: #FFFFFF;
  --selected: #E2F4F1;
  --deep: #3D1A18;
  --on-deep: #FFFFFF;
  --on-deep-2: #D8C6C1;
  --footer: #3D1A18;
  --on-footer: #FFFFFF;
  --on-footer-2: #D8C6C1;
  --txt: #24201F;
  --txt2: #6A6764;
  --heart: #C24226;
  --season-bg: #FCE7D4;
  --season-accent: #A3480F;
  --r-container: 28px;
  --r-card: 20px;
  --r-media: 16px;
  --r-thumb: 12px;
  --ring: 0 0 0 8px rgb(61 41 20 / .07), 0 10px 32px rgb(61 41 20 / .08);
  --serif: "Crimson Pro", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --vh: 100vh;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--txt);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 18px; height: 18px; }
svg.i.xs { width: 16px; height: 16px; }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: 0; }

/* ---------- Stage / phone frame ---------- */
#stage { min-height: 100vh; }
#frame, #scroller { min-height: 100vh; }
html.phone body { background: #2B2725; }
html.phone #stage { display: flex; align-items: center; justify-content: center; padding: 32px 0; min-height: 100vh; }
html.phone #frame {
  width: 393px; height: min(852px, calc(100vh - 64px)); min-height: 0;
  border-radius: 48px; overflow: hidden; transform: translateZ(0);
  background: var(--page); box-shadow: 0 0 0 10px #111, 0 30px 80px rgb(0 0 0 / .5);
}
html.phone #scroller { height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
html.phone #scroller::-webkit-scrollbar { display: none; }
#app { background: var(--page); min-height: var(--vh); transition: background-color .3s; }

/* ---------- Shared bits ---------- */
.wrap { max-width: 1440px; margin: 0 auto; padding: 32px 64px 80px; display: flex; flex-direction: column; gap: 72px; }
.m .wrap { padding: 0 0 24px; gap: 24px; }
.inset { padding: 0 20px; }
.container { border-radius: var(--r-container); box-shadow: var(--ring); overflow: hidden; }
.m .container { box-shadow: 0 0 0 6px rgb(61 41 20 / .07), 0 6px 20px rgb(61 41 20 / .08); }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--action); margin: 0; }
.m .eyebrow { font-size: 12px; }
.h-xl { font-family: var(--serif); font-weight: 600; font-size: 60px; line-height: 62px; margin: 0; }
.h-lg { font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1.1; margin: 0; }
.h-md { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.1; margin: 0; }
.m .h-xl { font-size: 36px; line-height: 38px; }
.m .h-lg { font-size: 30px; }
.body { font-size: 18px; line-height: 27px; color: var(--txt2); margin: 0; }
.m .body { font-size: 15px; line-height: 22px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px; font-size: 15px; font-weight: 500; white-space: nowrap; transition: background-color .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); }
.btn-outline { border: 1px solid var(--action); color: var(--action); background: var(--card); }
.btn-outline:hover { background: var(--selected); }
.btn-pill { border-radius: 999px; }
.btn-block { width: 100%; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: 15px; font-weight: 500; white-space: nowrap; }
.pill.on { background: var(--selected); border-color: var(--action); color: var(--action); }
.pill .n { color: var(--txt2); font-weight: 400; font-size: 13px; }
.pill.on .n { color: var(--action); }

/* ---------- Header (desktop) ---------- */
.dh { position: sticky; top: 0; z-index: 30; background: var(--card); border-bottom: 1px solid var(--border); }
.dh-in { max-width: 1440px; margin: 0 auto; height: 80px; padding: 0 64px; display: flex; align-items: center; gap: 40px; }
.dh-logo img { height: 44px; width: auto; }
.dh-nav { display: flex; gap: 28px; flex: 1; }
.dh-right { display: flex; gap: 28px; }
.dh a.lnk { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.dh a.lnk.on { color: var(--action); border-bottom-color: var(--action); }
.dh a.lnk:hover { color: var(--action); }

/* ---------- Header (mobile) ---------- */
.mh { padding: 12px 20px 8px; display: flex; align-items: center; }
.mh img { height: 46px; width: auto; }

/* ---------- Tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: max(env(safe-area-inset-bottom), 8px); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 2px; font-size: 11px; font-weight: 500; color: var(--txt2); }
.tab.on { color: var(--action); }
.tab.on::before { content: ""; position: absolute; top: -1px; width: 32px; height: 3px; border-radius: 0 0 3px 3px; background: var(--action); }
.tab svg.i { width: 24px; height: 24px; }
.tab-space { height: 84px; }

/* ---------- Footer (desktop) ---------- */
.foot { background: var(--footer); color: var(--on-footer); }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 48px 64px; display: flex; gap: 64px; }
.foot-brand { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.foot-brand img { height: 52px; width: auto; align-self: flex-start; }
.foot p, .foot li { color: var(--on-footer-2); font-size: 14px; margin: 0; }
.foot h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--on-footer); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.foot li b { color: var(--on-footer); font-weight: 500; display: block; }
.foot a:hover { text-decoration: underline; }
.m .foot-in { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; padding: 32px 20px 108px; }
.m .foot-brand { grid-column: 1 / -1; gap: 8px; }
.m .foot-brand img { height: 46px; }
.m .foot p, .m .foot li { font-size: 13px; }

/* ---------- Hero finder ---------- */
.finder { position: relative; border-radius: var(--r-container); height: 560px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; padding: 0 120px; isolation: isolate; }
.m .finder { height: 440px; padding: 0 20px; gap: 24px; }
.finder-bg { position: absolute; inset: 0; z-index: -2; border-radius: inherit; background-size: cover; background-position: center; transition: opacity .8s; }
.finder::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgb(0 0 0 / .42); }
.sentence { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; font-family: var(--serif); font-weight: 600; font-size: 48px; line-height: 1; text-align: center; }
.m .sentence { font-size: 28px; gap: 10px; }
.dd { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--txt); border-radius: 999px; padding: 18px 16px 18px 22px; font-family: var(--serif); font-weight: 600; font-size: inherit; line-height: .62; }
.m .dd { padding: 11px 12px 11px 14px; }
.dd svg.i { width: 24px; height: 24px; stroke-width: 2.25; }
.m .dd svg.i { width: 18px; height: 18px; }
.dd.open { box-shadow: 0 0 0 3px var(--action); }
.finder-cta { height: 50px; padding: 0 28px; border-radius: 999px; background: var(--action); color: var(--on-action); font-size: 17px; font-weight: 500; }
.finder-cta:hover { background: var(--action-hover); }
.finder-cap { position: absolute; left: 32px; bottom: 26px; font-size: 14px; }
.m .finder-cap { left: 24px; bottom: 22px; font-size: 13px; }
.dots { position: absolute; right: 32px; bottom: 30px; display: flex; gap: 6px; }
.m .dots { right: 24px; bottom: 26px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / .5); }
.dots i.on { background: #fff; }
.opt-panel { position: absolute; z-index: 5; left: 50%; top: calc(50% + 84px); transform: translateX(-50%); width: min(720px, calc(100% - 64px)); background: var(--card); color: var(--txt); border-radius: var(--r-card); box-shadow: 0 20px 50px rgb(0 0 0 / .25); padding: 24px; text-align: left; }
.opt-panel h3, .sheet h3 { margin: 0 0 16px; font-family: var(--serif); font-size: 26px; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.opt-x { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.opt-x:hover { background: var(--muted); }

/* ---------- Just hit the racks ---------- */
.racks { background: var(--deep); color: var(--on-deep); display: flex; gap: 48px; padding: 24px 24px 24px 56px; align-items: center; }
.racks .eyebrow { color: var(--deep-eyebrow); }
.racks .body { color: var(--on-deep-2); }
.racks-copy { width: 440px; flex: none; display: flex; flex-direction: column; gap: 16px; }
.racks-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.racks .pill { background: transparent; border-color: var(--deep-line); color: var(--deep-link); }
.racks .pill.solid { background: var(--deep-btn); border-color: var(--deep-btn); color: var(--deep-btn-txt); }
.mosaic { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mosaic a { aspect-ratio: 1 / 1.22; border-radius: var(--r-media); overflow: hidden; background: var(--muted); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.mosaic a:hover img { transform: scale(1.04); }
.m .racks { flex-direction: column; align-items: stretch; padding: 24px 20px 20px; gap: 12px; }
.m .racks-copy { width: auto; gap: 12px; }
.m .racks-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -20px; padding-right: 20px; }
.m .racks .pill { height: 38px; }
.m .mosaic { gap: 6px; margin-top: 4px; }
.m .mosaic a { aspect-ratio: 1 / 1.15; }

/* ---------- Seasonal ---------- */
.season { background: var(--season-bg); padding: 48px 56px; display: flex; flex-direction: column; gap: 28px; transition: background-color .3s; }
.season .eyebrow { color: var(--season-accent); }
.season-head { display: flex; align-items: flex-end; gap: 24px; }
.season-head > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.btn-season { background: var(--season-accent); color: #fff; }
.btn-season:hover { filter: brightness(.92); }
.season-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.m .season { padding: 24px 0 24px 20px; gap: 12px; }
.m .season-head { flex-direction: column; align-items: stretch; padding-right: 20px; }
.m .season-grid { display: flex; overflow-x: auto; gap: 12px; padding-right: 20px; scrollbar-width: none; }
.m .season-grid .card { width: 172px; flex: none; }
.m .season .btn-season { margin-right: 20px; }

/* ---------- Product card ---------- */
.card { position: relative; background: var(--card); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.card-img { position: relative; aspect-ratio: 4 / 5; background: var(--muted); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-info { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.card-name { font-size: 14px; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.card-size { font-size: 13px; color: var(--txt2); }
.price { font-size: 16px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; margin-top: 4px; }
.price s { font-size: 13px; font-weight: 400; color: var(--txt2); }
.no-photo { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--txt2); font-size: 13px; text-align: center; padding: 12px; }
.save { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: var(--card); display: grid; place-items: center; color: var(--txt); box-shadow: 0 1px 4px rgb(0 0 0 / .12); }
.save svg.i { width: 20px; height: 20px; }

/* Save: pop and sparkles */
.save.saved svg, .save-lbl.saved svg { fill: var(--heart); stroke: var(--heart); }
.save.pop svg, .save-lbl.pop svg { animation: pop .35s ease-out; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.spark { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: var(--heart); pointer-events: none; animation: spark .5s ease-out forwards; }
@keyframes spark { 0% { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; } 100% { transform: rotate(var(--a)) translateY(-20px) scale(.3); opacity: 0; } }

/* ---------- Categories ---------- */
.cats { display: flex; flex-direction: column; gap: 24px; align-items: center; }
.cat-grid { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cat { position: relative; aspect-ratio: 328 / 400; border-radius: var(--r-card); overflow: hidden; background: var(--muted); }
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cat:hover img { transform: scale(1.04); }
.cat-lbl { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--txt); border-radius: 999px; padding: 8px 12px 8px 14px; font-size: 14px; font-weight: 500; }
.cat-lbl .n { color: var(--txt2); font-size: 12px; font-weight: 400; }
.m .cats { padding: 0 20px; gap: 12px; }
.m .cat-grid { grid-template-columns: 1fr 1fr; gap: 13px; }
.m .cat { aspect-ratio: 170 / 210; }
.m .cat-lbl { left: 10px; bottom: 10px; font-size: 13px; padding: 6px 10px 6px 12px; }
.m .cats .btn { width: 100%; }

/* ---------- Story ---------- */
.story { background: var(--card); display: flex; gap: 48px; align-items: center; padding: 24px 24px 24px 56px; }
.story-copy { width: 440px; flex: none; display: flex; flex-direction: column; gap: 16px; }
.story-copy .btn { align-self: flex-start; margin-top: 8px; }
.story-photo { flex: 1; height: 560px; border-radius: var(--r-card); overflow: hidden; }
.story-photo img { width: 100%; height: 100%; object-fit: cover; }
.m .story { flex-direction: column; align-items: stretch; padding: 24px 20px 20px; gap: 12px; }
.m .story-copy { width: auto; gap: 12px; }
.m .story-copy .btn { margin-top: 4px; }
.m .story-photo { flex: none; height: 380px; }

/* ---------- Stores ---------- */
.stores { display: flex; gap: 56px; }
.stores-copy { width: 360px; flex: none; display: flex; flex-direction: column; gap: 14px; }
.zip { display: flex; gap: 8px; }
.zip input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--border); border-radius: 10px; padding: 0 14px; background: var(--card); }
.zip input:focus { outline: 2px solid var(--action); outline-offset: 0; }
.loc { display: inline-flex; gap: 6px; align-items: center; color: var(--action); font-size: 14px; font-weight: 500; }
.store-cards { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.store-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.store-card.closest { border: 2px solid var(--action); }
.store-card .ph { height: 150px; background: var(--muted); position: relative; }
.store-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--action); color: var(--on-action); font-size: 12px; font-weight: 500; border-radius: 999px; padding: 3px 10px; }
.store-card .in { padding: 14px 16px 16px; font-size: 13px; color: var(--txt2); display: flex; flex-direction: column; gap: 3px; }
.store-card .row { display: flex; justify-content: space-between; align-items: baseline; }
.store-card b { color: var(--txt); font-size: 16px; font-weight: 500; }
.open { color: var(--action); }
.m .stores { flex-direction: column; gap: 0; background: var(--card); }
.m .stores-copy { width: auto; padding: 24px 20px 8px; gap: 12px; }
.m .store-list { padding: 4px 0 8px; }
.store-row { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); align-items: center; }
.store-row:last-child { border-bottom: 0; }
.store-row img { width: 64px; height: 64px; border-radius: var(--r-thumb); object-fit: cover; }
.store-row .t { flex: 1; font-size: 13px; color: var(--txt2); display: flex; flex-direction: column; gap: 2px; }
.store-row .t b { color: var(--txt); font-size: 15px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.store-row .badge { position: static; font-size: 11px; padding: 2px 8px; }
.store-row .mi { font-size: 13px; color: var(--txt2); }

/* ---------- Shop ---------- */
.shop-head { display: flex; flex-direction: column; gap: 6px; }
.shop-head p { margin: 0; color: var(--txt2); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.m .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 20px; }
.m .filters::-webkit-scrollbar { display: none; }
.filters .pill { height: 38px; padding: 0 12px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.m .grid { grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px; }
.m .shop-head { padding: 8px 20px 0; }
.empty { text-align: center; padding: 64px 20px; color: var(--txt2); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty .h-md { color: var(--txt); }
.popover { position: absolute; z-index: 20; top: 46px; min-width: 260px; background: var(--card); border-radius: var(--r-card); box-shadow: 0 16px 40px rgb(0 0 0 / .16); padding: 8px; }
.opt-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 10px; font-size: 15px; text-align: left; }
.opt-row:hover { background: var(--muted); }
.opt-row .n { margin-left: auto; color: var(--txt2); font-size: 13px; }
.box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border); display: grid; place-items: center; flex: none; }
.opt-row.on .box { background: var(--action); border-color: var(--action); color: var(--on-action); }
.box svg.i { width: 14px; height: 14px; stroke-width: 3; }
.pop-foot { display: flex; gap: 8px; padding: 8px 4px 4px; border-top: 1px solid var(--border); margin-top: 6px; }
.pop-foot .btn { flex: 1; height: 40px; }

/* ---------- Item detail ---------- */
.item-d { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.item-photo { border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 5; background: var(--muted); position: sticky; top: 112px; }
.item-photo img { width: 100%; height: 100%; object-fit: cover; }
.item-info { display: flex; flex-direction: column; gap: 16px; }
.crumb { font-size: 14px; color: var(--txt2); display: flex; gap: 6px; align-items: center; }
.crumb a:hover { color: var(--action); }
.big-price { font-size: 24px; font-weight: 600; display: flex; gap: 10px; align-items: baseline; }
.big-price s { font-size: 16px; font-weight: 400; color: var(--txt2); }
.info-box { background: var(--card); border-radius: var(--r-card); padding: 14px 16px; display: flex; gap: 12px; align-items: center; font-size: 15px; }
.info-box svg.i { color: var(--action); }
.info-box .t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.info-box small { color: var(--txt2); font-size: 13px; }
.about h3 { font-family: var(--serif); font-size: 22px; margin: 8px 0 4px; }
.about .r { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.about .r span:first-child { color: var(--txt2); }
.actions { display: flex; gap: 12px; }
.actions .btn-primary { flex: 1; }
.save-lbl { position: relative; width: 108px; }
.save-lbl.saved { color: var(--heart); border-color: var(--heart); }
.pay-note { font-size: 13px; color: var(--txt2); margin: 0; }

/* Mobile item: photo + sheet */
.mi-photo { position: relative; height: var(--photo-h); transition: height .35s cubic-bezier(.2,.8,.2,1); background: var(--muted); }
.mi-photo img { width: 100%; height: 100%; object-fit: cover; }
.mi-photo .dots { right: auto; left: 50%; transform: translateX(-50%); bottom: 44px; }
.mi-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 25; display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.mi-nav .sp { flex: 1; }
.float-btn { height: 40px; min-width: 40px; border-radius: 999px; background: var(--card); color: var(--txt); display: inline-flex; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 2px 8px rgb(0 0 0 / .12); font-size: 15px; font-weight: 500; }
.float-btn.back { padding: 0 14px 0 8px; color: var(--action); }
.mi-sheet { position: relative; margin-top: -28px; background: var(--page); border-radius: var(--r-container) var(--r-container) 0 0; padding-bottom: 130px; min-height: 60vh; }
.grabber { display: flex; justify-content: center; padding: 10px 0 2px; cursor: grab; touch-action: none; }
.grabber i { width: 40px; height: 5px; border-radius: 3px; background: rgb(106 103 100 / .35); }
.mi-sheet .ttl { padding: 14px 20px 4px; display: flex; flex-direction: column; gap: 6px; }
.mi-sheet .ttl h1 { font-size: 28px; line-height: 30px; }
.mi-sheet .boxes { padding: 16px 20px 8px; display: flex; flex-direction: column; gap: 8px; }
.mi-sheet .about { padding: 8px 20px; }
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--border); padding: 12px 20px max(env(safe-area-inset-bottom), 14px); display: flex; flex-direction: column; gap: 8px; }

/* ---------- Sheets & dialogs ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .4); animation: fade .2s; }
.sheet { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: var(--r-container) var(--r-container) 0 0; padding: 8px 20px max(env(safe-area-inset-bottom), 24px); max-height: 85%; overflow-y: auto; animation: up .28s cubic-bezier(.2,.8,.2,1); }
.sheet .grabber { padding: 4px 0 14px; }
.dialog { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100% - 40px)); background: var(--card); border-radius: var(--r-container); padding: 24px; animation: fade .2s; max-height: 90vh; overflow-y: auto; }
.sheet-photo { height: 150px; border-radius: var(--r-card); overflow: hidden; margin-bottom: 16px; }
.sheet-photo img { width: 100%; height: 100%; object-fit: cover; }
.line { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; padding: 6px 0; }
.line svg.i { color: var(--txt2); }
.line small { display: block; color: var(--txt2); font-size: 13px; }
.note { background: var(--muted); border-radius: var(--r-media); padding: 12px 14px; font-size: 14px; color: var(--txt2); margin: 10px 0 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Search / Saved / Account ---------- */
.search-bar { display: flex; align-items: center; gap: 10px; height: 48px; border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; background: var(--card); }
.search-bar input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; min-width: 0; }
.search-bar:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px var(--selected); }
.page-pad { padding: 8px 20px 0; display: flex; flex-direction: column; gap: 16px; }
.sugg { display: flex; flex-wrap: wrap; gap: 8px; }
.signin { background: var(--card); border-radius: var(--r-container); padding: 32px; max-width: 440px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.signin input { height: 48px; border: 1px solid var(--border); border-radius: 10px; padding: 0 14px; background: var(--card); }
.m .signin { padding: 24px 20px; }

/* ---------- Palette panel ---------- */
.pal-fab { position: fixed; z-index: 90; right: 20px; bottom: 20px; height: 48px; padding: 0 18px 0 14px; border-radius: 999px; background: #24201F; color: #fff; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; box-shadow: 0 8px 24px rgb(0 0 0 / .3); }
.pal-fab .sw { display: flex; }
.pal-fab .sw i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #24201F; margin-left: -4px; }
html.mobile-real .pal-fab { bottom: 92px; right: 12px; height: 44px; padding: 0 14px 0 12px; }
html.mobile-real .pal-fab.on-item { bottom: 128px; }
.pal { position: fixed; z-index: 100; top: 16px; right: 16px; bottom: 16px; width: 380px; background: #fff; color: #24201F; border-radius: 24px; box-shadow: 0 24px 64px rgb(0 0 0 / .35); display: flex; flex-direction: column; overflow: hidden; font-family: var(--sans); }
.pal.anim { animation: fade .2s; }
html.mobile-real .pal { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 88vh; border-radius: 24px 24px 0 0; }
html.mobile-real .pal.anim { animation: up .28s cubic-bezier(.2,.8,.2,1); }
.pal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.pal-h h2 { margin: 0; font-size: 20px; font-weight: 600; }
.pal-b { overflow-y: auto; padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 18px; }
.pal-b p.hint { margin: 0; font-size: 13px; color: #6A6764; }
.pal-sec h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #6A6764; text-transform: uppercase; letter-spacing: .04em; }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1.5px solid #E6E1D8; border-radius: 14px; text-align: left; margin-bottom: 8px; background: #fff; }
.pal-item:hover { border-color: #BDB5A8; }
.pal-item.on { border-color: #24201F; }
.pal-item .nm { flex: 1; font-size: 15px; font-weight: 500; }
.pal-item .nm small { display: block; font-size: 12px; font-weight: 400; color: #6A6764; }
.strip { display: flex; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); }
.strip i { width: 16px; height: 32px; }
.pal-del { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #6A6764; }
.pal-del:hover { background: #F4F0EA; color: #B0442E; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid #E0D8CC; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: #24201F; color: #fff; border-color: #24201F; }
.seg button i { width: 10px; height: 10px; border-radius: 50%; }
.ed { display: flex; flex-direction: column; gap: 10px; }
.ed label.f { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.ed label.f span { flex: 1; }
.ed label.f small { display: block; color: #6A6764; font-size: 12px; }
.ed input[type=color] { width: 44px; height: 32px; border: 1px solid #E0D8CC; border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
.ed input[type=text] { height: 40px; border: 1px solid #E0D8CC; border-radius: 10px; padding: 0 12px; width: 100%; }
.ed code { font-size: 12px; color: #6A6764; width: 64px; text-align: right; }
.pal-btns { display: flex; gap: 8px; }
.pal-btns button { flex: 1; height: 42px; border-radius: 10px; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pb-dark { background: #24201F; color: #fff; }
.pb-line { border: 1px solid #E0D8CC; }
.pb-line:hover { background: #F4F0EA; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%); background: #24201F; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; animation: fade .2s; }
