/* fmshop — Instagram-style fashion storefront template */
.fm { background: #fff; padding-bottom: calc(64px + var(--safe-b)); }
.wrap { padding: 0 14px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 0; background: none; border-radius: 50%; position: relative; color: var(--ink); }
.icon-btn svg, .tabbar svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 10px 0 6px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.wordmark { font-weight: 900; font-size: 22px; letter-spacing: -.5px; text-decoration: none; padding-inline-start: 6px; max-width: 55vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; }
.cart-count { position: absolute; top: 4px; left: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; font-style: normal; display: grid; place-items: center; line-height: 1; }
.cart-count[hidden] { display: none; }

/* profile header */
.profile { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "av st" "in in" "ac ac"; gap: 14px 22px; align-items: center; padding: 18px 16px 6px; max-width: 935px; margin: 0 auto; }
.avatar-ring { grid-area: av; width: 92px; height: 92px; border-radius: 50%; padding: 3px; background: conic-gradient(from 210deg, var(--accent), #c9a27e, var(--accent)); }
.avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #fff; background: var(--bg-2); }
.avatar.mono { display: grid; place-items: center; font-size: 36px; font-weight: 900; }
.pstats { grid-area: st; display: flex; gap: 26px; justify-content: center; }
.pstats div { display: grid; text-align: center; line-height: 1.35; }
.pstats b { font-size: 19px; font-weight: 800; } .pstats span { color: var(--ink-2); font-size: 13px; }
.pinfo { grid-area: in; } .pinfo h1 { margin: 0; font-size: 16px; font-weight: 800; }
.bio { margin: 2px 0 0; white-space: pre-line; font-size: 14px; color: var(--ink-2); }
.pactions { grid-area: ac; display: flex; gap: 8px; }
.pactions .btn { flex: 1; border-radius: 10px; min-height: 36px; }
@media (min-width: 760px) {
  .profile { grid-template-columns: 180px 1fr; grid-template-areas: "av st" "av in" "av ac"; padding-top: 34px; gap: 10px 40px; }
  .avatar-ring { width: 150px; height: 150px; justify-self: center; } .pstats { justify-content: flex-start; } .pactions { max-width: 420px; }
}

/* highlights (categories) */
.highlights { display: flex; gap: 14px; overflow-x: auto; padding: 14px 16px 12px; scrollbar-width: none; max-width: 935px; margin: 0 auto; scroll-snap-type: x proximity; }
.highlights::-webkit-scrollbar { display: none; }
.hl { flex: none; display: grid; justify-items: center; gap: 5px; width: 68px; text-decoration: none; font-size: 12px; text-align: center; scroll-snap-align: start; }
.hl > span:last-child { max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-img { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); padding: 3px; display: grid; place-items: center; overflow: hidden; background: #fff; }
.hl-img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.hl-img b { font-size: 22px; } .hl-img.all svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.hl.on .hl-img { border: 2px solid var(--ink); }

.gridbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--line); max-width: 935px; margin: 0 auto; }
.gb-title { font-weight: 800; }
.gridbar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* grid: Instagram 3-up squares, portrait crop for fashion */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; max-width: 935px; margin: 0 auto; }
@media (min-width: 760px) { .grid { gap: 6px; } }
.tile { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--bg-2); display: block; text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
@media (hover: hover) { .tile:hover img { transform: scale(1.04); } }
.noimg { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; text-align: center; font-weight: 800; font-size: 13px; color: var(--ink-2); }
.noimg.big { position: static; aspect-ratio: 4/5; font-size: 20px; }
.multi { position: absolute; top: 8px; left: 8px; width: 16px; height: 16px; border: 2px solid #fff; border-radius: 3px; box-shadow: 3px -3px 0 -1px rgba(255,255,255,.85); filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.tile-price { position: absolute; bottom: 6px; right: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 800; color: var(--ink); }
.tile-price s { color: var(--ink-3); font-weight: 500; margin-left: 4px; font-size: 11px; }
.soldout { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.55); font-weight: 800; }
.grid-ad { grid-column: 1 / -1; padding: 6px 0; }
.more { text-align: center; padding: 18px; }
.empty { text-align: center; padding: 50px 20px; color: var(--ink-2); }

/* ads */
.ad { display: flex; align-items: center; gap: 12px; position: relative; text-decoration: none; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.ad img { width: 84px; height: 84px; object-fit: cover; flex: none; }
.ad-body { display: grid; padding: 10px 0; padding-inline-end: 44px; line-height: 1.6; } .ad-body small { color: var(--ink-2); }
.ad-tag { position: absolute; top: 8px; left: 10px; font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.ad-banner { margin: 10px auto; max-width: 935px; }
.ad-banner img { width: 120px; height: 90px; }
.ad-strip { border-radius: 0; border-inline: 0; } .ad-strip img { width: 56px; height: 56px; }
.ad-card { margin: 0 2px; }

/* PDP */
.pdp { max-width: 1040px; margin: 0 auto; }
@media (min-width: 900px) { .pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; padding: 24px 20px; } }
.gallery { position: relative; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4/5; background: var(--bg-2); }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
@media (min-width: 900px) { .slides { border-radius: var(--r); } }
.dots { display: flex; gap: 5px; justify-content: center; padding: 10px 0 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background .2s, width .2s; }
.dots i.on { background: var(--accent); width: 16px; border-radius: 3px; }
.offtag { position: absolute; top: 12px; right: 12px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 13px; padding: 2px 10px; border-radius: 999px; }
.pdp-body { padding: 14px 16px 0; }
.crumb { font-size: 13px; color: var(--ink-3); text-decoration: none; }
.ptitle { font-size: 22px; font-weight: 900; line-height: 1.45; margin: 2px 0 8px; letter-spacing: -.3px; }
.pprice { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; }
.pprice b { font-size: 24px; font-weight: 900; } .pprice s { color: var(--ink-3); } .pprice span { color: var(--ink-2); font-size: 14px; }
.opt { border: 0; padding: 0; margin: 0 0 16px; }
.opt legend { font-weight: 700; margin-bottom: 8px; font-size: 14px; } .opt .picked { color: var(--ink-2); font-weight: 500; }
.stock-note { color: var(--warn); font-weight: 700; font-size: 14px; min-height: 1.2em; margin: 0 0 8px; }
.pdesc { white-space: pre-line; color: var(--ink-2); line-height: 2; border-top: 1px solid var(--line); padding-top: 14px; }
.attrs { display: grid; gap: 0; margin: 14px 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.attrs div { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); } .attrs div:last-child { border: 0; }
.attrs dt { color: var(--ink-3); } .attrs dd { margin: 0; font-weight: 600; }
.related { max-width: 935px; margin: 20px auto 0; } .related h2 { font-size: 16px; padding: 0 14px; }

.buybar { position: fixed; z-index: 45; inset-inline: 0; bottom: calc(60px + var(--safe-b)); display: flex; gap: 10px; padding: 10px 14px; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.buybar .btn { flex: 1; }
.buybar.static { position: sticky; bottom: calc(60px + var(--safe-b)); margin: 0 -16px; }
@media (min-width: 900px) { .buybar:not(.static) { position: sticky; bottom: 0; max-width: 1040px; margin: 0 auto; border-radius: var(--r) var(--r) 0 0; } }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; }
.qty button { width: 42px; height: 44px; border: 0; background: none; font-size: 20px; }
.qty output { min-width: 22px; text-align: center; font-weight: 800; }

/* tab bar */
.tabbar { position: fixed; z-index: 50; inset-inline: 0; bottom: 0; height: calc(60px + var(--safe-b)); padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); }
.tabbar > * { display: grid; place-items: center; align-content: center; gap: 0; border: 0; background: none; text-decoration: none; font-size: 11px; color: var(--ink-3); position: relative; }
.tabbar .on { color: var(--ink); } .tabbar .on svg { stroke-width: 2.3; }
.tabbar .cart-count { top: 6px; left: calc(50% - 22px); }
@media (min-width: 900px) { .tabbar { display: none; } .fm { padding-bottom: 0; } .buybar.static { bottom: 0; } }

/* pages */
.page { max-width: 720px; margin: 0 auto; padding: 16px; }
.page-title { font-size: 22px; font-weight: 900; margin: 4px 0 14px; letter-spacing: -.3px; }
.box { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0 0 14px; background: #fff; }
fieldset.box { min-width: 0; } .box legend { font-weight: 800; padding: 0 6px; }
.box h2 { font-size: 16px; margin: 0 0 12px; }
.skeleton { height: 92px; border-radius: var(--r); background: linear-gradient(90deg, var(--bg-2), #fff, var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite; margin-bottom: 10px; }
.skeleton.sm { height: 56px; }
@keyframes sk { to { background-position: -200% 0; } }

.cart-line { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line img, .cart-line .ph { width: 76px; aspect-ratio: 4/5; object-fit: cover; border-radius: 10px; background: var(--bg-2); }
.cart-line b { display: block; line-height: 1.5; } .cart-line small { display: block; color: var(--ink-3); }
.cart-line .err { color: var(--err); font-size: 13px; font-weight: 700; }
.cart-line .qty { margin-top: 6px; width: max-content; } .cart-line .qty button { width: 34px; height: 34px; }
.cart-line .lp { font-weight: 800; text-align: left; }
.rm { border: 0; background: none; color: var(--ink-3); font-size: 13px; padding: 4px 0; }

.totals { margin: 0; } .totals div { display: flex; justify-content: space-between; padding: 6px 0; } .totals dt { color: var(--ink-2); } .totals dd { margin: 0; font-weight: 700; }
.totals .grand { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; font-size: 17px; } .totals .grand dd { font-weight: 900; }

.radio-list { display: grid; gap: 8px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.radio-card input { margin-top: 5px; accent-color: var(--accent); width: 18px; height: 18px; }
.radio-card span { display: grid; flex: 1; } .radio-card small { color: var(--ink-3); line-height: 1.7; }
.radio-card .cost { font-weight: 800; white-space: nowrap; }
.radio-card.disabled { opacity: .45; cursor: default; }

/* order page */
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .order-head .page-title { margin-bottom: 0; }
.track { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 0; margin: 18px 0 20px; counter-reset: s; }
.track li { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); position: relative; text-align: center; }
.track li span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: #fff; z-index: 1; }
.track li::before { content: ""; position: absolute; top: 6px; left: 50%; width: 100%; height: 2px; background: var(--line); }
.track li:first-child::before { display: none; }
.track li.done span { background: var(--ok); border-color: var(--ok); } .track li.done::before, .track li.now::before { background: var(--ok); }
.track li.now span { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.track li.done, .track li.now { color: var(--ink); font-weight: 700; }
.pay-box h2 { font-size: 16px; line-height: 1.8; } .num-big { font-size: 20px; font-weight: 900; }
.accounts { display: grid; gap: 10px; margin-bottom: 20px; }
.acc-card { border-radius: var(--r); padding: 14px; background: var(--bg-2); display: grid; gap: 8px; }
.acc-top { display: flex; justify-content: space-between; }
.copyable > span:first-child { display: grid; line-height: 1.5; }
.alert { padding: 12px 14px; border-radius: var(--r); line-height: 1.9; margin: 0 0 14px; }
.alert.err { background: var(--err-bg); color: var(--err); } .alert.warn { background: var(--warn-bg); color: var(--warn); } .alert.info { background: var(--info-bg); color: var(--info); border: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-2); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.seg button { border: 0; background: none; border-radius: 999px; min-height: 38px; font-weight: 700; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.drop { display: grid; place-items: center; min-height: 140px; border: 1.5px dashed var(--line); border-radius: var(--r); cursor: pointer; text-align: center; padding: 10px; overflow: hidden; }
.drop-empty { display: grid; color: var(--ink-2); font-weight: 600; } .drop-empty small { color: var(--ink-3); font-weight: 400; }
.drop-preview { max-height: 260px; border-radius: 10px; }
.drop.pdf .drop-empty { color: var(--ok); }
.lines { list-style: none; padding: 0; margin: 0 0 8px; }
.lines li { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lines img, .lines .ph { width: 52px; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; background: var(--bg-2); }
.lines div { display: grid; line-height: 1.6; }
.center { text-align: center; }

.me { display: flex; align-items: center; justify-content: space-between; } .me div { display: grid; }
.sec { font-size: 16px; margin: 18px 0 8px; }
.orders { list-style: none; padding: 0; margin: 0; }
.orders a { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.orders a > span { display: grid; gap: 2px; } .orders .end { justify-items: end; }

.site-foot { border-top: 1px solid var(--line); margin-top: 30px; }
.foot-inner { max-width: 935px; margin: 0 auto; padding: 20px 16px 26px; font-size: 14px; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; } .foot-links a { color: var(--ink-2); }
.made { font-size: 12px; } .made a { color: var(--ink-3); }

/* search sheet */
.search-form { display: flex; gap: 8px; } .search-form .input { flex: 1; }
.cat-list { list-style: none; padding: 0; margin: 0; } .cat-list a { display: flex; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.cat-list .sub a { padding-inline-start: 20px; color: var(--ink-2); }
.prose { white-space: pre-line; line-height: 2; color: var(--ink-2); }

/* ===== v1.2 ===== */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.cat-head { max-width: 935px; margin: 0 auto; padding: 16px 16px 4px; }
.cat-head h1 { margin: 4px 0 2px; font-size: 24px; font-weight: 900; letter-spacing: -.3px; }
.cat-desc { color: var(--ink-2); margin: 4px 0 0; max-width: 60ch; }
.gridbar h2.gb-title { font-size: 15px; margin: 0; }
.more a.btn { text-decoration: none; }

.wish { position: absolute; bottom: 12px; left: 12px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.wish svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
.wish.on svg { fill: var(--accent); stroke: var(--accent); }
.wish.pop { animation: pop .35s ease; } @keyframes pop { 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .wish.pop { animation: none; } }

/* footer */
.site-foot { background: var(--bg-2); border-top: 0; }
.foot-inner { display: grid; gap: 22px; grid-template-columns: 1fr; padding: 28px 16px 18px; }
@media (min-width: 760px) { .foot-inner { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.foot-brand .wordmark { font-size: 20px; padding: 0; } .foot-brand p { color: var(--ink-2); margin: 6px 0 10px; font-size: 14px; line-height: 1.9; }
.foot-contact { list-style: none; padding: 0; margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); } .foot-contact a { text-decoration: none; }
.foot-social { display: flex; gap: 8px; flex-wrap: wrap; }
.foot-social a { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: #fff; text-decoration: none; border: 1px solid var(--line); }
.foot-col h2 { font-size: 14px; margin: 0 0 8px; font-weight: 800; }
.foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.foot-col a { color: var(--ink-2); text-decoration: none; font-size: 14px; } .foot-col a:hover { color: var(--ink); text-decoration: underline; }
.foot-badges { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.foot-badges img { background: #fff; border-radius: 10px; padding: 4px; }
.foot-bottom { max-width: 935px; margin: 0 auto; padding: 12px 16px 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); }
.foot-bottom a { color: var(--ink-3); }

/* account */
.me-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin: 6px 0 16px; }
.me-av { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 26px; font-weight: 900; }
.me-av img { width: 100%; height: 100%; object-fit: cover; }
.me-id { display: grid; } .me-id h1 { margin: 0; font-size: 19px; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg-2); border-radius: var(--r); padding: 12px 6px; margin-bottom: 14px; text-align: center; }
.me-stats div { display: grid; line-height: 1.5; } .me-stats b { font-size: 17px; } .me-stats span { font-size: 12px; color: var(--ink-2); }
.seg-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.seg-tabs a { flex: none; padding: 10px 6px; text-decoration: none; color: var(--ink-3); font-weight: 700; font-size: 14px; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.seg-tabs a.on { color: var(--ink); border-color: var(--ink); }
.orders a { gap: 12px; } .orders img, .orders .ph { width: 48px; height: 60px; object-fit: cover; border-radius: 8px; background: var(--bg-2); flex: none; }
.orders .mid { flex: 1; }
.auth-box { text-align: center; padding: 24px 18px; }
.codes { display: grid; gap: 10px; }
.coupon { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r); border: 1.5px dashed var(--accent); background: #fff; }
.coupon > div { display: grid; }
.bale-cta { display: grid; text-decoration: none; background: #eaf6f8; border-color: #c7e6ec; } .bale-cta small { color: var(--ink-2); }
.addr-card { position: relative; }
.addr-card .acts { display: flex; gap: 6px; margin-top: 8px; }

/* checkout */
.code-row { display: flex; gap: 8px; } .code-row .input { flex: 1; }
.code-msg { margin: 8px 0 0; font-size: 13.5px; min-height: 1.2em; }
.code-msg.ok { color: var(--ok); } .code-msg.err { color: var(--err); } .code-msg.hint { color: var(--warn); }
.totals .disc dd, .totals .disc dt { color: var(--ok); }
.hint-bar { background: var(--warn-bg); color: var(--warn); border-radius: var(--r-sm); padding: 8px 12px; font-size: 13.5px; margin-bottom: 8px; }

/* blog */
.posts { display: grid; gap: 22px; }
@media (min-width: 700px) { .posts { grid-template-columns: 1fr 1fr; } .post-card.lead { grid-column: 1 / -1; } }
.post-card a { text-decoration: none; display: block; }
.post-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--r); background: var(--bg-2); }
.post-card h2, .post-card h3 { margin: 10px 0 4px; font-size: 18px; line-height: 1.6; font-weight: 800; }
.post-card.lead h2 { font-size: 24px; } .post-card p { margin: 0 0 4px; color: var(--ink-2); font-size: 14.5px; }
.posts.mini { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } .posts.mini h3 { font-size: 15px; }
.pager { display: flex; gap: 8px; justify-content: center; padding: 20px 0; }
.article { max-width: 720px; }
.art-title { font-size: clamp(24px, 6vw, 34px); line-height: 1.5; font-weight: 900; margin: 8px 0 6px; letter-spacing: -.4px; }
.art-meta { margin: 0 0 16px; font-size: 13.5px; }
.art-cover { width: 100%; border-radius: var(--r); margin-bottom: 18px; aspect-ratio: 16/10; object-fit: cover; }
.prose-body { font-size: 16.5px; line-height: 2.15; color: #2c2824; }
.prose-body h2 { font-size: 21px; margin: 28px 0 8px; line-height: 1.6; } .prose-body h3 { font-size: 18px; margin: 22px 0 6px; }
.prose-body img { border-radius: var(--r); margin: 12px 0; }
.prose-body blockquote { margin: 16px 0; padding: 4px 16px; border-inline-start: 3px solid var(--accent); color: var(--ink-2); }
.prose-body a { color: var(--accent); }
.prose-body code { background: var(--bg-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; } .tags .chip { text-decoration: none; min-height: 32px; font-size: 13px; }

/* category sheet tree */
.cat-list .d1 a { padding-inline-start: 18px; color: var(--ink-2); } .cat-list .d2 a { padding-inline-start: 32px; color: var(--ink-2); font-size: 14px; }
.cat-list .d3 a, .cat-list .d4 a { padding-inline-start: 44px; color: var(--ink-3); font-size: 13.5px; }
.cat-list button.tog { border: 0; background: none; color: var(--ink-3); font-size: 18px; width: 36px; }
.foot-licenses { max-width: 935px; margin: 0 auto; padding: 4px 16px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lic { width: 100px; min-height: 100px; border-radius: 14px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; padding: 6px; }
.lic img { max-width: 88px; max-height: 88px; object-fit: contain; }
.lic-slot { border-style: dashed; text-decoration: none; text-align: center; color: var(--ink-3); font-size: 12px; line-height: 1.6; align-content: center; }
.lic-slot b { color: var(--ink-2); font-size: 13px; display: block; }

/* ===== v1.3: hero slider ===== */
.hero-slider { position: relative; max-width: 1200px; margin: 6px auto 4px; }
.hs-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.hs-track::-webkit-scrollbar { display: none; }
.hs-slide { position: relative; flex: none; width: 100%; scroll-snap-align: center; aspect-ratio: 16/7; overflow: hidden; display: block; text-decoration: none; color: inherit; background: var(--bg-2); }
@media (max-width: 700px) { .hs-slide { aspect-ratio: 4/5; } }
@media (min-width: 900px) { .hero-slider { padding: 0 16px; } .hs-track { border-radius: var(--r-lg); } }
.hs-slide picture, .hs-slide img { width: 100%; height: 100%; }
.hs-slide img { object-fit: cover; }
.hs-copy { position: absolute; inset: auto 0 0 0; padding: 22px 20px 34px; display: grid; gap: 6px; justify-items: start; }
.hs-slide.tone-light .hs-copy { color: #fff; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0)); }
.hs-slide.tone-dark .hs-copy { color: var(--ink); background: linear-gradient(to top, rgba(255,255,255,.75), rgba(255,255,255,0)); }
@media (min-width: 701px) {
  .hs-copy { inset: 0 auto 0 0; width: min(46%, 460px); align-content: center; padding: 30px 40px; background: none !important; }
  .hs-slide.pos-right .hs-copy { inset: 0 0 0 auto; }
  .hs-slide.pos-center .hs-copy { inset: 0; width: auto; justify-items: center; text-align: center; }
  .hs-slide.tone-light .hs-copy { text-shadow: 0 1px 12px rgba(0,0,0,.35); }
}
.hs-title { margin: 0; font-size: clamp(22px, 4.6vw, 40px); font-weight: 900; line-height: 1.35; letter-spacing: -.4px; }
.hs-text { margin: 0; font-size: clamp(14px, 1.8vw, 17px); line-height: 1.9; max-width: 34em; }
.hs-btn { margin-top: 6px; background: #fff; color: var(--ink); }
.tone-dark .hs-btn { background: var(--ink); color: #fff; }
.hs-dots { position: absolute; bottom: 12px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.hs-dots button { pointer-events: auto; width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(255,255,255,.55); transition: width .25s, background .25s; }
.hs-dots button[aria-selected="true"] { width: 22px; background: #fff; }
.hs-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); font-size: 24px; display: none; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.hs-nav.prev { right: 28px; } .hs-nav.next { left: 28px; }
@media (hover: hover) and (min-width: 900px) { .hero-slider:hover .hs-nav { display: grid; } }

/* ===== category display styles ===== */
.cat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px 14px; max-width: 935px; margin: 0 auto; }
@media (min-width: 700px) { .cat-cards { grid-template-columns: repeat(4, 1fr); } }
.cc { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--bg-2); text-decoration: none; display: block; }
.cc img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
@media (hover: hover) { .cc:hover img { transform: scale(1.05); } }
.cc-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; font-weight: 900; color: var(--ink-3); }
.cc-name { position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px; color: #fff; font-weight: 800; background: linear-gradient(to top, rgba(0,0,0,.6), transparent); }
.cc:not(:has(img)) .cc-name { color: var(--ink); background: none; }
.cat-tiles { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 12px 14px; max-width: 935px; margin: 0 auto; scroll-snap-type: x proximity; }
.cat-tiles::-webkit-scrollbar { display: none; }
.ct { flex: none; width: 70%; max-width: 300px; aspect-ratio: 16/10; border-radius: var(--r); overflow: hidden; position: relative; background: var(--bg-2); text-decoration: none; scroll-snap-align: start; }
.ct img { width: 100%; height: 100%; object-fit: cover; }
.ct span { position: absolute; inset: auto 0 0 0; padding: 20px 14px 12px; display: grid; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.6), transparent); }
.ct:not(:has(img)) span { color: var(--ink); background: none; }
.ct b { font-size: 17px; } .ct small { opacity: .85; }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px 14px; max-width: 935px; margin: 0 auto; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips a { flex: none; padding: 7px 16px; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; font-weight: 600; font-size: 14px; background: #fff; }
.cat-chips a.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ===== reviews & share ===== */
.ptitle-row { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.share-btn { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; margin-top: 2px; }
.share-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
.stars { --r: 0; --s: 18px; display: inline-block; width: calc(var(--s) * 5); height: var(--s); vertical-align: middle;
  background: linear-gradient(90deg, #f2a900 calc(var(--r) / 5 * 100%), #e2dcd5 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") 0 0 / var(--s) var(--s) repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") 0 0 / var(--s) var(--s) repeat-x; }
[dir="rtl"] .stars { transform: scaleX(-1); }
.stars.sm { --s: 14px; }
.rating-line { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; margin: -2px 0 10px; font-size: 14px; }
.reviews { max-width: 720px; margin: 24px auto 0; padding: 0 16px; }
.rv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rv-head h2 { font-size: 18px; margin: 0; }
.rv-summary { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 16px; margin: 12px 0; background: var(--bg-2); border-radius: var(--r); }
.rv-score { display: grid; justify-items: center; gap: 2px; } .rv-score b { font-size: 34px; line-height: 1.2; }
.rv-bars { display: grid; gap: 4px; } .rv-bars div { display: grid; grid-template-columns: 14px 1fr 26px; gap: 8px; align-items: center; font-size: 12.5px; }
.rv-bars i { height: 7px; border-radius: 9px; background: #e6e0d9; overflow: hidden; } .rv-bars em { display: block; height: 100%; background: #f2a900; border-radius: 9px; }
.rv-list { list-style: none; padding: 0; margin: 0; }
.rv { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rv-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; } .rv-top time { margin-inline-start: auto; font-size: 12.5px; }
.rv p { margin: 6px 0 0; line-height: 2; color: #34302b; white-space: pre-line; }
.rv-pending { opacity: .75; }
.rv-reply { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); font-size: 14px; } .rv-reply p { margin: 2px 0 0; }
.rate-pick { display: flex; gap: 6px; direction: ltr; justify-content: center; margin: 4px 0 14px; flex-direction: row-reverse; }
.rate-pick button { border: 0; background: none; font-size: 38px; line-height: 1; color: #e2dcd5; padding: 2px; cursor: pointer; }
.rate-pick button.on { color: #f2a900; }
.rate-hint { text-align: center; color: var(--ink-2); min-height: 1.6em; margin: -6px 0 10px; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.share-grid a, .share-grid button { display: grid; justify-items: center; gap: 6px; text-decoration: none; border: 0; background: none; font-size: 12.5px; color: var(--ink-2); }
.share-grid span { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); font-weight: 900; font-size: 15px; color: var(--ink); }
.cc-more { border: 1.5px dashed var(--line); background: #fff; cursor: pointer; font: inherit; }
.cc-more .cc-name { color: var(--ink); background: none; }
.gw-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 2px solid var(--accent); }
.gw-box > div { display: grid; gap: 2px; }
.alert.ok-alert { background: var(--ok-bg); color: var(--ok); }

/* ===== v1.4: stories & highlights ===== */
button.avatar-ring { border: 0; cursor: pointer; font: inherit; }
.avatar-ring.plain { background: var(--line); }
.avatar-ring.has-story { background: conic-gradient(from 200deg, #f9ce34, #ee2a7b, #6228d7, #f9ce34); padding: 3.5px; }
.avatar-ring.has-story.seen { background: #d6d0c9; }
.avatar-ring.has-story:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.hls { grid-column: 1 / -1; display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 8px 0 2px; margin: 0 -2px; }
.hls::-webkit-scrollbar { display: none; }
.hlb { flex: none; display: grid; justify-items: center; gap: 5px; width: 70px; border: 0; background: none; font: inherit; font-size: 12px; cursor: pointer; padding: 0; }
.hlb > span:last-child { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hlb-img { width: 66px; height: 66px; border-radius: 50%; padding: 3px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; }
.hlb-img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.hlb-img b { font-size: 22px; }
.st-ov { position: fixed; inset: 0; z-index: 200; background: rgba(10,10,10,.96); display: grid; place-items: center; }
.st-box { position: relative; width: min(100vw, calc(100dvh * 9 / 16)); height: 100dvh; max-height: 100dvh; background: #000; overflow: hidden; touch-action: none; user-select: none; }
@media (min-width: 700px) { .st-box { height: min(92dvh, 860px); border-radius: 14px; } }
.st-bars { position: absolute; top: 10px; inset-inline: 10px; z-index: 3; display: flex; gap: 4px; }
.st-bars i { flex: 1; height: 2.5px; background: rgba(255,255,255,.35); border-radius: 3px; overflow: hidden; }
.st-bars b { display: block; height: 100%; width: 0; background: #fff; }
.st-head { position: absolute; top: 20px; inset-inline: 12px; z-index: 3; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.st-av { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #333; display: grid; place-items: center; font-weight: 800; }
.st-av img { width: 100%; height: 100%; object-fit: cover; }
.st-time { opacity: .8; font-size: 12px; }
.st-x { margin-inline-start: auto; width: 40px; height: 40px; border: 0; background: none; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; }
.st-media { position: absolute; inset: 0; display: grid; place-items: center; }
.st-media img, .st-media video { width: 100%; height: 100%; object-fit: cover; }
.st-tap { position: absolute; top: 70px; bottom: 110px; width: 40%; z-index: 2; border: 0; background: none; cursor: pointer; }
.st-tap.prev { right: 0; } .st-tap.next { left: 0; }
.st-foot { position: absolute; inset: auto 0 0 0; z-index: 3; padding: 40px 16px calc(22px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(0,0,0,.65), transparent); color: #fff; display: grid; gap: 10px; justify-items: center; text-align: center; }
.st-foot p { margin: 0; line-height: 1.9; font-size: 15px; white-space: pre-line; }
.st-link { background: #fff; color: #111; text-decoration: none; padding: 10px 22px; border-radius: 999px; font-weight: 800; font-size: 14px; }

/* ===== v1.4: category navigation without page loads ===== */
.gridbar { position: sticky; top: 56px; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); flex-wrap: wrap; row-gap: 6px; }
.gb-chips { flex-basis: 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; scroll-snap-type: x proximity; }
.gb-chips::-webkit-scrollbar { display: none; }
.gb-chips a { flex: none; scroll-snap-align: start; padding: 5px 14px; border-radius: 999px; background: var(--bg-2); text-decoration: none; font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: background .15s, color .15s; }
.gb-chips a.on { background: var(--ink); color: #fff; }
.navbar-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 300; background: var(--accent); transform-origin: right; transform: scaleX(0); opacity: 0; pointer-events: none; }
.navbar-progress.go { opacity: 1; transition: transform 8s cubic-bezier(.1,.7,.1,1); transform: scaleX(.85); }
.navbar-progress.done { opacity: 0; transform: scaleX(1); transition: transform .2s, opacity .3s .1s; }
body.navigating #grid, body.navigating .empty { opacity: .45; transition: opacity .15s; }
@media (prefers-reduced-motion: reduce) { .navbar-progress.go { transition: none; } }

/* two-pane category browser */
.sheet.sheet-tall { height: 86dvh; display: flex; flex-direction: column; }
@media (min-width: 720px) { .sheet.sheet-tall { width: min(720px, 94vw); height: min(78dvh, 640px); } }
.cb { flex: 1; min-height: 0; display: grid; grid-template-columns: 34% 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cb-roots { overflow-y: auto; background: var(--bg-2); display: grid; align-content: start; }
.cb-roots button { display: flex; align-items: center; gap: 8px; padding: 12px 10px; border: 0; background: none; text-align: right; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); border-inline-start: 3px solid transparent; cursor: pointer; }
.cb-roots button.on { background: #fff; color: var(--ink); border-color: var(--accent); }
.cb-ri { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; }
.cb-ri.ph, .cb-ti.ph { display: grid; place-items: center; font-weight: 900; color: var(--ink-3); }
.cb-pane { overflow-y: auto; padding: 10px; }
.cb-all { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); text-decoration: none; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px 10px; }
.cb-item { display: grid; gap: 6px; align-content: start; }
.cb-tile { display: grid; justify-items: center; gap: 6px; text-decoration: none; text-align: center; font-size: 13px; }
.cb-tile b { font-weight: 600; line-height: 1.5; }
.cb-ti { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; background: var(--bg-2); }
.cb-tile.on .cb-ti { outline: 2px solid var(--accent); outline-offset: 2px; }
.cb-sub { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.cb-sub a { font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); }
.cb-sub a.on { border-color: var(--ink); color: var(--ink); }
