html.ks-open { overflow: hidden; }
#ks-dialog, #ks-status { font-family: Inter,sans-serif; color:#371535; }
#ks-dialog { box-sizing:border-box; position:fixed; inset:0 0 0 auto; padding:0; margin:0; width:min(100%, 500px); height:100%; height:100dvh; max-width:100%; max-height:100dvh; overflow:auto; overscroll-behavior:contain; background:#fbf8f1; border:none; box-shadow:-8px 0 50px #27111f28; text-align:left; font-size:16px; line-height:1.4; }
#ks-dialog[open] { animation:ks-enter .25s ease-out; }
#ks-dialog::backdrop { background:rgb(28 14 23 / .44); }
.ks-panel, .ks-panel * { box-sizing:border-box; }
.ks-panel { padding:clamp(20px,5vw,36px); padding-bottom:max(36px,env(safe-area-inset-bottom)); }
.ks-head { display:flex; position:static; justify-content:space-between; align-items:flex-start; gap:10px; margin:0 0 26px; background:none; padding:0; border:none; }
.ks-head h2 { font-family:inherit; font-size:clamp(32px,5vw,44px); line-height:1.05; font-weight:700; color:#371535; letter-spacing:-.055em; margin:0; }
.ks-head h2:focus { outline:none; }
.ks-panel h3 { font-family:inherit; font-size:24px; margin:.6em 0 .3em; color:inherit; }
.ks-close,.ks-qty button,.ks-btn { appearance:none; border:0; font:inherit; color:inherit; line-height:1.2; cursor:pointer; }
.ks-close { display:grid; place-items:center; flex-shrink:0; border:1px solid #d9cfce; width:40px; height:40px; background:transparent; border-radius:50%; font-size:27px; }
.ks-btn { background:transparent; }
.ks-primary { display:block; width:100%; padding:15px 19px; border-radius:32px; background:#371535; color:#fff9f0; font-weight:650; margin-top:16px; }
.ks-primary:hover { background:#572450; }
.ks-back,.ks-text { padding:5px 0; color:#542650; font-size:13px; text-decoration:underline; text-underline-offset:3px; }
.ks-back { margin-bottom:8px; text-decoration:none; }
.ks-head .ks-back-top { flex:none; min-height:44px; padding:8px 0 8px 6px; margin:0; font-size:clamp(17px,4.6vw,21px); font-weight:650; }
.ks-panel button:focus-visible,.ks-panel input:focus-visible,.ks-panel select:focus-visible,.ks-panel textarea:focus-visible,.ks-order summary:focus-visible { outline:3px solid #8148ac; outline-offset:3px; }
.ks-item { display:flex; gap:14px; align-items:center; border-bottom:1px solid #ddd3cf; padding:14px 0; }
.ks-thumb { width:72px; height:86px; object-fit:cover; border-radius:9px; flex-shrink:0; }
.ks-grow { min-width:0; flex:1; overflow-wrap:anywhere; }
.ks-item strong,.ks-cost strong { font-weight:650; }
.ks-item small,.ks-order small { display:block; margin-top:3px; color:#685465; font-size:13px; }
.ks-qty { display:inline-flex; border:1px solid #d5c8cc; border-radius:99px; align-items:center; margin-top:8px; gap:4px; font-size:14px; }
.ks-qty button { min-width:31px; height:30px; border-radius:50%; background:transparent; font-size:19px; }
.ks-qty button:disabled { opacity:.38; }
.ks-end { display:grid; justify-items:end; gap:8px; white-space:nowrap; }
.ks-list { margin:5px 0 20px; }
.ks-cost { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin:8px 0; }
.ks-cost strong { white-space:nowrap; }
.ks-total { margin-top:16px; padding-top:14px; border-top:1px solid #d7c9ce; font-size:20px; }
.ks-note,.ks-blank p { color:#685465; font-size:14px; line-height:1.5; margin:12px 0; }
.ks-blank { margin:48px auto 36px; text-align:center; }
.ks-flower { font-size:76px; color:#845294; }
.ks-form,.ks-field { display:grid; gap:8px; }
.ks-form { gap:16px; }
.ks-address-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.ks-consent { display:flex; align-items:flex-start; gap:9px; font-size:14px; cursor:pointer; }
.ks-consent input { flex:none; width:18px; height:18px; margin:1px 0 0; accent-color:#371535; }
.ks-legal-links { display:flex; gap:6px 15px; flex-wrap:wrap; margin-top:-8px; font-size:13px; }
.ks-legal-links a { text-decoration:underline; text-underline-offset:3px; }
.ks-field,.ks-photos legend { font-size:14px; font-weight:650; }
.ks-field small { font-weight:400; color:#685465; }
.ks-field input,.ks-field textarea,.ks-field select { padding:12px 14px; width:100%; background:#fffdf9; color:#371535; border:1px solid #c9bac3; border-radius:10px; font:400 16px/1.4 inherit; font-family:inherit; font-size:16px; }
.ks-field textarea { resize:vertical; min-height:60px; }
.ks-form .ks-primary { margin-top:0; }
.ks-paycard { display:grid; gap:28px; background:#d9b9fa; padding:22px; border-radius:18px; }
.ks-paycard span { font-size:12px; letter-spacing:.12em; }
.ks-paycard strong { font-family:monospace; font-size:21px; }
.ks-details { background:#f0eae3; padding:14px 16px; border-radius:12px; margin:18px 0; overflow-wrap:anywhere; }
.ks-details p { margin:4px 0; }
.ks-tabs,.ks-links { display:flex; gap:14px; }
.ks-tabs { gap:6px; border-bottom:1px solid #d9cdd3; padding-bottom:12px; }
.ks-tabs .ks-btn { border-radius:24px; padding:9px 16px; }
.ks-tabs .ks-selected,.ks-success { background:#d4f573; }
.ks-success { padding:10px 15px; border-radius:22px; display:inline-block; font-weight:650; }
.ks-order { border-bottom:1px solid #d9cdd3; padding:16px 0; }
.ks-order summary { cursor:pointer; font-weight:650; }
.ks-photos { padding:0; margin:0; border:0; display:grid; grid-template-columns:repeat(6,1fr); gap:5px; }
.ks-photos legend { margin-bottom:8px; }
.ks-photos label { display:block; cursor:pointer; position:relative; }
.ks-photos input { position:absolute; opacity:0; }
.ks-photos img { display:block; width:100%; aspect-ratio:3 / 4; object-fit:cover; border-radius:6px; }
.ks-photos input:checked + img,.ks-photos input:focus-visible + img { outline:3px solid #8049a3; outline-offset:-3px; }
#ks-status { position:fixed; z-index:100; bottom:max(22px,env(safe-area-inset-bottom)); left:50%; transform:translate(-50%,12px); padding:12px 20px; background:#371535; color:#fff9f0; border-radius:24px; font-size:14px; box-shadow:0 4px 18px #0002; opacity:0; transition:opacity .18s,transform .18s; pointer-events:none; width:max-content; max-width:90vw; text-align:center; }
#ks-status.ks-visible { opacity:1; transform:translate(-50%,0); }
@keyframes ks-enter { from { transform:translateX(24px); opacity:.4; } }
@media (prefers-reduced-motion:reduce) { #ks-dialog[open],#ks-status { animation:none; transition:none; } }
.ks-history { margin-top:28px; padding-top:16px; border-top:1px solid var(--line); }
.ks-history h3 { margin:0 0 10px; font-size:20px; letter-spacing:-.02em; }
.ks-history-order { overflow-wrap:anywhere; }
.ks-history-status { display:inline-block; margin-inline-start:8px; padding:3px 7px; border-radius:5px; color:#243614; background:#e4edce; font-size:12px; font-weight:600; }
.ks-history-status[data-closed="true"] { color:var(--ink); background:var(--panel); border:1px solid var(--line); }
.ks-history-order ul { margin:8px 0 0; padding-inline-start:20px; }

#ks-dialog[data-view="cart"] { background:var(--basket-bg); }

#ks-address-suggestions:not(:empty) {
  display: grid;
  max-height: 13rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #bac8bf;
  border-radius: 12px;
  background: white;
}
#ks-address-suggestions button {
  padding: .7rem .9rem;
  min-height: 44px;
  background: transparent;
  border: 0;
  color: #193529;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
#ks-address-suggestions button:is(:hover,:focus-visible) { background: #eaf1ec; }
