/* Kabul Roma Design v6: an iOS 27 inspired light language for the web, on top of v5. Not a native implementation.
   Glass is a navigation layer only: nav, desktop header, scrim. Content stays opaque. No Apple assets. */
@import url("../v5/design.css");

/* ---------- tokens ---------- */
/* #0066cc carries white text at 5.6:1; #007aff (4:1) is kept for the focus ring, where 3:1 is enough. */
html:root body{
  --lapis:#0066cc;--lapis-2:#0056b3;--lapis-soft:#e8f1fc;
  --krd-accent:#0066cc;--krd-accent-2:#0056b3;--krd-on-accent:#fff;--krd-control:#808086;
  --krd-terracotta:#0066cc;--krd-apricot:#fff;--krd-apricot-2:#f7f7f9;--krd-footer:#ececf0;
  --saffron:#0066cc;--saffron-soft:#ececf0;
  --bg:#f5f5f7;--surface:#ececf0;--surface-2:#e2e2e8;--raised:#fff;--line:#d9d9de;--line-2:#b8b8bf;
  --fg:#1d1d1f;--muted:#5f5f66;
  --r-sm:14px;--r-md:20px;--r-lg:28px;
  --shadow-sm:0 1px 2px rgba(29,29,31,.06);--shadow:0 2px 8px rgba(29,29,31,.06);--shadow-lg:0 12px 32px rgba(29,29,31,.12);
  --krd-hover:180ms;--krd-press:180ms;--krd-overlay:260ms;
  --krd6-card:#eeeff2;--krd6-focus:#007aff;
  --krd6-edge:1px solid #fff;--krd6-edge-low:rgba(60,60,67,.14);
}
html:root :focus-visible{outline-color:var(--krd6-focus)}

/* ---------- icons: 1.8 at 24px, a little heavier when small so the optical weight holds ---------- */
html:root .ctl svg,html:root .navbtn svg,html:root .x svg,html:root .search .clear svg,html:root .arr{stroke-width:2}
html:root .x svg{width:20px;height:20px}
html:root .search .clear svg{width:16px;height:16px}
html:root .copybtn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding-inline:12px;border:0;border-radius:999px;background:var(--surface);font-size:var(--t-meta);font-weight:500}
/* A mask rather than a node: the label can be rewritten without losing the icon. */
html:root .copybtn::before{content:"";flex:0 0 auto;width:16px;height:16px;background:currentColor;-webkit-mask:var(--krd6-copy) center/contain no-repeat;mask:var(--krd6-copy) center/contain no-repeat;--krd6-copy:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8.5' y='8.5' width='12' height='12' rx='2.5'/%3E%3Cpath d='M15.5 5.5A2 2 0 0 0 13.5 3.5H6A2.5 2.5 0 0 0 3.5 6v7.5a2 2 0 0 0 2 2'/%3E%3C/svg%3E")}

/* ---------- pills ---------- */
html:root .slide .cta,html:root .btn,html:root .cartbtn,html:root .krd-allcats,html:root .cat,html:root .chip,html:root .chip:hover,html:root .seg button,html:root .search input,html:root .qty,html:root .ctl,html:root .ctl:not([data-q="0"]),html:root .ctl button,html:root .card .ctl button,html:root .krd-skip{border-radius:999px}
html:root .cartbtn{box-shadow:none}
html:root .search input{background:#fff;box-shadow:inset 0 0 0 1px var(--line-2)}
html:root .krd-allcats{background:#fff;box-shadow:inset 0 0 0 1px var(--line)}
html:root .navbtn,html:root .navbtn:hover:not([disabled]),html:root .x,html:root .x:hover{border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1px var(--line)}
html:root .ctl:not(.off){background:#fff}
html:root .slide .eyebrow::before{display:none}
html:root input[type="checkbox"],html:root input[type="radio"]{accent-color:#0066cc}

/* ---------- cards: opaque; blending keeps photos whole while their baked-in white takes the card color ---------- */
html:root .card,html:root .card:hover{padding:8px 8px 10px;border-radius:24px;background:var(--krd6-card);box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}
html:root .card .thumb,html:root .card .thumb.krd-cutout-thumb{border-radius:18px;background:none}
html:root .card .thumb img{object-fit:contain}
html:root .card .thumb:not(.krd-cutout-thumb) img,html:root .modal .pic img{mix-blend-mode:multiply}
html:root .modal .pic{background:var(--krd6-card)}
html:root .tile,html:root .tile:hover,html:root .krd-promo,html:root .krd-promo:hover,html:root .t-tea,html:root .t-tea:hover,html:root .fact,html:root .fact + .fact,html:root .fact:nth-child(n+3),html:root .store-info{border:var(--krd6-edge);border-bottom-color:var(--krd6-edge-low);border-radius:24px;background:#fff;box-shadow:var(--shadow-sm)}
html:root .facts{gap:8px}
html:root .fact,html:root .fact + .fact,html:root .fact:nth-child(n+3){padding:12px}
html:root .suggest{border-radius:24px;background:#fff;box-shadow:var(--shadow-lg)}

/* ---------- legal links ---------- */
html:root .kr-resi-links a,html:root .kr-resi-links a[data-kr-link=withdraw]{color:#0066cc}
html:root footer li button:focus-visible{border-radius:999px}

/* ---------- header and bottom nav: opaque by default, glass only where it works ---------- */
html:root header.top{background:#fff;border-bottom:1px solid var(--krd6-edge-low)}
html:root header.top.scrolled{box-shadow:none;border-bottom-color:var(--krd6-edge-low)}
html:root nav.bottom button{transition:background-color var(--krd-hover) var(--ease),color var(--krd-hover) var(--ease),transform var(--krd-hover) var(--ease)}
@media (max-width:640px){
  /* Static: a sticky header would cover forms once the keyboard is open. */
  html:root header.top{position:static}
  /* Above the nav, its gap and the safe area, so it never covers a CTA or the footer. */
  html:root body{padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))}
  html:root nav.bottom{inset:auto max(12px,env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));padding:4px;border:var(--krd6-edge);border-bottom-color:var(--krd6-edge-low);border-radius:999px;background:#fff;box-shadow:var(--shadow-lg)}
  html:root nav.bottom .row{gap:2px}
  html:root nav.bottom button{justify-content:center;min-height:52px;padding:4px 2px;gap:1px;border-radius:999px}
  html:root nav.bottom button svg,html:root nav.bottom button[aria-current="true"] svg{width:24px;height:24px}
  html:root nav.bottom button[aria-current="true"]{background:#0066cc;color:#fff}
  html:root nav.bottom button:active{transform:scale(.96)}
  html:root nav.bottom button:focus-visible{border-radius:999px}
  html:root nav.bottom .dot2{top:2px;box-shadow:0 0 0 2px #fff}
  html:root .toast{bottom:calc(88px + env(safe-area-inset-bottom,0px))}
  html:root .grid{gap:16px 12px}
  html:root .track{gap:12px}
}
@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  html:root nav.bottom{background:rgba(255,255,255,.8);-webkit-backdrop-filter:saturate(1.6) blur(20px);backdrop-filter:saturate(1.6) blur(20px)}
  html:root .scrim{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
  @media (min-width:641px){
    html:root header.top{background:rgba(255,255,255,.8);-webkit-backdrop-filter:saturate(1.6) blur(20px);backdrop-filter:saturate(1.6) blur(20px)}
  }
}

/* ---------- overlays: opaque sheets; the handle is drawing only and takes no input ---------- */
html:root .scrim{background:rgba(29,29,31,.24)}
html:root .modal .box{border-radius:28px;background:#fff}
html:root .x.close{box-shadow:inset 0 0 0 1px var(--line),var(--shadow-sm)}
html:root .drawer{border-start-start-radius:28px;border-end-start-radius:28px;overflow:hidden}
html:root .line{border-radius:20px;background:#fff}
html:root .note,html:root .summary{border-radius:20px;background:#fff}
html:root .field input,html:root .field textarea{min-height:48px;border-radius:14px}
html:root .radio2 button{border-radius:20px}
@media (max-width:640px){
  html:root .modal .box{border-radius:30px 30px 0 0}
  html:root .modal .box::before{content:"";position:absolute;top:8px;inset-inline-start:calc(50% - 18px);z-index:1;width:36px;height:5px;border-radius:999px;background:var(--line-2);pointer-events:none}
  html:root .drawer{top:max(12px,env(safe-area-inset-top,0px));padding-top:0;border-radius:30px 30px 0 0}
}

/* ---------- hover and progressive shape ---------- */
@media (hover:hover){
  html:root .navbtn:hover:not([disabled]),html:root .x:hover,html:root .krd-allcats:hover,html:root .tile:hover{background:#f7f7f9}
  html:root .kr-resi-links a:hover,html:root .kr-resi-links a[data-kr-link=withdraw]:hover{color:#0056b3}
}
@supports (corner-shape:squircle){
  html:root .card,html:root .tile,html:root .fact,html:root .modal .box,html:root .drawer{corner-shape:squircle}
}

/* ---------- user preferences ---------- */
/* Positive reduce query: Safari lacks this feature, and a no-preference gate would lose the glass on iOS. */
@media (prefers-reduced-transparency:reduce){
  html:root nav.bottom,html:root header.top{background:#fff;-webkit-backdrop-filter:none;backdrop-filter:none}
  html:root .scrim{background:rgba(29,29,31,.5);-webkit-backdrop-filter:none;backdrop-filter:none}
}
@media (prefers-reduced-motion:reduce){
  html:root nav.bottom button,html:root .scrim,html:root .drawer,html:root .drawer:not(.on),html:root .modal .box,html:root .toast{transition:none}
  html:root nav.bottom button:active{transform:none}
}
@media (forced-colors:active){
  html:root .card .thumb img,html:root .modal .pic img{mix-blend-mode:normal}
  html:root .card,html:root .fact,html:root .tile,html:root .modal .box,html:root .drawer,html:root nav.bottom{border:1px solid CanvasText}
  html:root .btn,html:root .cat,html:root .chip,html:root .seg button,html:root .ctl,html:root .qty,html:root .x,html:root .navbtn,html:root .copybtn,html:root .search input{border:1px solid ButtonText}
  html:root nav.bottom button[aria-current="true"]{forced-color-adjust:none;background:Highlight;color:HighlightText}
  html:root .copybtn::before{background:ButtonText}
}
