:root {
  --dsg-ink: #10100f;
  --dsg-ink-soft: #292722;
  --dsg-gold: #c99a42;
  --dsg-gold-dark: #8b6527;
  --dsg-cream: #f6f1e7;
  --dsg-paper: #fffdf9;
  --dsg-line: rgba(16, 16, 15, .12);
  --dsg-muted: #706b62;
}

.dsg { position: fixed; right: 24px; bottom: 24px; z-index: 999999; color: var(--dsg-ink); font-family: inherit; }
.dsg[data-url-gate="1"] { display: none; }
.dsg[data-url-gate="1"].dsg--gate-passed { display: block; }
.dsg *, .dsg *::before, .dsg *::after { box-sizing: border-box; }
.dsg button { min-width: 0 !important; max-width: none !important; margin: 0 !important; box-shadow: none; text-transform: none; transform: none !important; transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease, box-shadow .15s ease !important; }
.dsg button:hover, .dsg button:focus, .dsg button:active { transform: none !important; }
.dsg__launcher { display: flex; align-items: center; gap: 10px; width: auto !important; height: auto !important; min-height: 48px; border: 1px solid rgba(201,154,66,.35); border-radius: 999px; padding: 13px 19px !important; background: var(--dsg-ink); color: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.22) !important; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; cursor: pointer; }
.dsg__launcher:hover, .dsg__launcher:focus-visible { background: var(--dsg-ink-soft); outline: 2px solid var(--dsg-gold); outline-offset: 3px; box-shadow: 0 12px 34px rgba(0,0,0,.22) !important; }
.dsg__launcher-icon { color: var(--dsg-gold); font-size: 17px; }
.dsg--open .dsg__launcher { pointer-events: none; opacity: 0; }

.dsg__panel { position: absolute; right: 0; bottom: 0; display: grid; grid-template-rows: auto minmax(130px, 1fr) auto auto auto auto; width: min(410px, calc(100vw - 28px)); height: min(590px, calc(100vh - 48px)); overflow: hidden; border: 1px solid rgba(201,154,66,.4); border-radius: 20px; background: var(--dsg-cream); box-shadow: 0 26px 80px rgba(0,0,0,.28); transition: height .18s ease; }
.dsg--fresh .dsg__panel { height: min(475px, calc(100vh - 48px)); }
.dsg__panel[hidden] { display: none; }

.dsg__header { display: grid; grid-template-columns: 42px minmax(0,1fr) 32px 32px; gap: 8px; align-items: center; min-height: 82px; padding: 15px 16px; background: var(--dsg-ink); color: #fff; }
.dsg__mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(201,154,66,.7); border-radius: 50%; color: var(--dsg-gold); font-family: Georgia, serif; font-size: 13px; letter-spacing: .08em; }
.dsg__heading { min-width: 0; }
.dsg__header strong, .dsg__header small { display: block; }
.dsg__header strong { color: var(--dsg-gold); font-family: Georgia, 'Times New Roman', serif; font-size: 18px; font-weight: 600; letter-spacing: .01em; }
.dsg__header small { margin-top: 4px; overflow: hidden; color: rgba(255,255,255,.68); font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.dsg__reset, .dsg__close { display: grid; place-items: center; width: 32px !important; min-width: 32px !important; max-width: 32px !important; height: 32px !important; min-height: 32px; border: 0; border-radius: 50%; padding: 0 !important; background: rgba(255,255,255,.07); color: #fff; box-shadow: none !important; font: inherit; line-height: 1; cursor: pointer; }
.dsg__reset { font-size: 17px; }
.dsg__close { font-size: 22px; }
.dsg__reset:hover, .dsg__reset:focus-visible, .dsg__close:hover, .dsg__close:focus-visible { background: rgba(201,154,66,.18); outline: 1px solid var(--dsg-gold); }

.dsg__messages { overflow-y: auto; padding: 18px 16px 8px; scrollbar-color: rgba(139,101,39,.55) transparent; scrollbar-width: thin; }
.dsg__messages::-webkit-scrollbar { width: 5px; }
.dsg__messages::-webkit-scrollbar-track { background: transparent; }
.dsg__messages::-webkit-scrollbar-thumb { border-radius: 10px; background: rgba(139,101,39,.5); }
.dsg__message { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 17px; }
.dsg__message--user { align-items: flex-end; }
.dsg__bubble { max-width: 94%; color: #27241f; font-size: 14px; line-height: 1.55; }
.dsg__message--assistant .dsg__bubble { padding: 0 3px; }
.dsg__message--assistant .dsg__bubble strong { color: #171511; font-weight: 750; }
.dsg__message--user .dsg__bubble { max-width: 86%; border-radius: 15px 15px 4px 15px; padding: 10px 13px; background: var(--dsg-ink); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.dsg__message--loading .dsg__bubble { color: var(--dsg-muted); font-style: italic; }
.dsg__bullet { display: inline-block; position: relative; padding-left: 13px; }
.dsg__bullet::before { position: absolute; left: 0; color: var(--dsg-gold-dark); content: '•'; }

.dsg__order-result { display: grid; gap: 8px; width: 100%; margin-top: 9px; }
.dsg__order-result > p { margin: 0; color: var(--dsg-muted); font-size: 11px; line-height: 1.45; }
.dsg__tracking-item { display: grid; gap: 3px; border: 1px solid rgba(139,101,39,.2); border-radius: 11px; padding: 10px 11px; background: var(--dsg-paper); }
.dsg__tracking-item strong { color: #544732; font-size: 10px; }
.dsg__tracking-item a, .dsg__tracking-item span { width: fit-content; color: var(--dsg-gold-dark); font-size: 12px; font-weight: 750; }
.dsg__tracking-item a:hover, .dsg__tracking-item a:focus-visible { color: #5d4119; text-decoration-thickness: 2px; outline: none; }

.dsg__sources { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--dsg-line); }
.dsg__sources-label { width: 100%; color: var(--dsg-muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dsg__sources a { border: 1px solid rgba(139,101,39,.32); border-radius: 999px; padding: 4px 8px; background: rgba(255,255,255,.7); color: var(--dsg-gold-dark); font-size: 11px; font-weight: 700; line-height: 1.25; text-decoration: none; }
.dsg__sources a:hover, .dsg__sources a:focus-visible { border-color: var(--dsg-gold); background: #fff; color: #5d4119; outline: none; }

.dsg__products { display: grid; gap: 8px; width: 100%; margin-top: 12px; }
.dsg__product { display: grid; grid-template-columns: 62px minmax(0,1fr) auto; gap: 11px; align-items: center; min-height: 76px; border: 1px solid var(--dsg-line); border-radius: 12px; padding: 7px 9px 7px 7px; background: var(--dsg-paper); color: var(--dsg-ink); box-shadow: 0 3px 10px rgba(31,27,20,.04); transition: border-color .15s ease, box-shadow .15s ease; }
.dsg__product:hover { border-color: rgba(201,154,66,.8); box-shadow: 0 7px 18px rgba(31,27,20,.08); }
.dsg__product-image, .dsg__product-info { color: inherit; text-decoration: none; }
.dsg__product-image:focus-visible, .dsg__product-info:focus-visible { border-radius: 6px; outline: 2px solid var(--dsg-gold); outline-offset: 2px; }
.dsg__product img { width: 62px; height: 62px; border-radius: 8px; object-fit: contain; background: #fff; }
.dsg__product-info { min-width: 0; }
.dsg__product em, .dsg__product strong, .dsg__product small { display: block; }
.dsg__product em { margin-bottom: 3px; overflow: hidden; color: var(--dsg-gold-dark); font-size: 9px; font-style: normal; font-weight: 750; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.dsg__product strong { display: -webkit-box; overflow: hidden; font-size: 13px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.dsg__product small { margin-top: 5px; color: var(--dsg-gold-dark); font-size: 12px; font-weight: 750; }
.dsg__product-arrow { color: var(--dsg-gold); font-size: 19px; font-weight: 500; }
.dsg__select { align-self: center; width: auto !important; height: auto !important; border: 1px solid rgba(139,101,39,.28); border-radius: 9px; padding: 7px 8px !important; background: #f8efd9; color: #60461d; font: inherit; font-size: 9px; font-weight: 800; line-height: 1.15; cursor: pointer; }
.dsg__select:hover, .dsg__select:focus-visible { border-color: var(--dsg-gold); background: var(--dsg-gold); color: var(--dsg-ink); outline: none; }
.dsg__select.is-selected { border-color: #6a8561; background: #edf4ea; color: #395333; }

.dsg__selection { margin: 0 12px 8px; overflow: hidden; border: 1px solid rgba(139,101,39,.2); border-radius: 12px; background: rgba(255,253,249,.92); box-shadow: 0 3px 10px rgba(31,27,20,.04); }
.dsg__selection[hidden] { display: none; }
.dsg__selection-toggle { display: grid; grid-template-columns: minmax(0,1fr) auto 18px; gap: 8px; align-items: center; width: 100% !important; min-height: 39px; border: 0; padding: 8px 10px !important; background: transparent; color: #2a241b; font: inherit; text-align: left; cursor: pointer; }
.dsg__selection-toggle:hover, .dsg__selection-toggle:focus-visible { background: #faf5eb; outline: none; }
.dsg__selection-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.dsg__selection-title > span { color: var(--dsg-gold-dark); font-size: 15px; }
.dsg__selection-title strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dsg__selection-count { color: var(--dsg-gold-dark); font-size: 10px; font-weight: 700; }
.dsg__selection-chevron { color: #817563; font-size: 13px; text-align: center; transition: transform .15s ease; }
.dsg__selection:not(.is-expanded) .dsg__selection-chevron { transform: rotate(180deg); }
.dsg__selection-body[hidden] { display: none; }
.dsg__selection-body { border-top: 1px solid rgba(16,16,15,.07); padding-top: 3px; }
.dsg__selection-list { display: grid; max-height: 92px; overflow-y: auto; padding: 0 7px 5px; }
.dsg__selection-item { display: grid; grid-template-columns: minmax(0,1fr) auto 24px; gap: 6px; align-items: center; min-height: 30px; border-top: 1px solid rgba(16,16,15,.07); padding: 3px 4px; color: #4a4031; font-size: 10px; }
.dsg__selection-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsg__selection-item button { display: grid; place-items: center; width: 22px !important; min-width: 22px !important; height: 22px !important; border: 0; border-radius: 50%; padding: 0 !important; background: transparent; color: #766b5b; font: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.dsg__selection-item button:hover, .dsg__selection-item button:focus-visible { background: #f0e5d0; color: var(--dsg-ink); outline: none; }
.dsg__quantity { display: grid; grid-template-columns: 22px 22px 22px; align-items: center; border: 1px solid rgba(139,101,39,.2); border-radius: 999px; background: #faf6ee; }
.dsg__quantity span { text-align: center; font-size: 10px; font-weight: 750; }
.dsg__quantity button { border-radius: 999px; font-size: 13px; }
.dsg__selection-checkout { width: calc(100% - 14px) !important; height: auto !important; min-height: 34px; margin: 0 7px 7px !important; border: 1px solid rgba(139,101,39,.35); border-radius: 9px; padding: 8px 10px !important; background: #f5ead4; color: #5b431f; font: inherit; font-size: 10px; font-weight: 750; line-height: 1.2; cursor: pointer; }
.dsg__selection-checkout:hover, .dsg__selection-checkout:focus-visible { border-color: var(--dsg-gold); background: var(--dsg-gold); color: var(--dsg-ink); outline: none; }
.dsg__selection-checkout:disabled { cursor: wait; opacity: .65; }

.dsg__suggestions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; padding: 7px 14px 11px; }
.dsg__suggestions[hidden] { display: none; }
.dsg__suggestions button { width: 100% !important; height: auto !important; min-height: 38px; border: 1px solid rgba(139,101,39,.28); border-radius: 12px; padding: 7px 10px !important; background: rgba(255,253,249,.65); color: #4a4031; font: inherit; font-size: 11px; line-height: 1.25; white-space: normal; cursor: pointer; }
.dsg__suggestions button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.dsg__suggestions button:hover { border-color: var(--dsg-gold); background: var(--dsg-paper); }

.dsg__form { display: grid; grid-template-columns: minmax(0,1fr) 44px; gap: 8px; padding: 11px 12px 7px; border-top: 1px solid var(--dsg-line); background: var(--dsg-paper); }
.dsg__form textarea { width: 100%; max-height: 82px; resize: none; border: 1px solid rgba(16,16,15,.18); border-radius: 12px; padding: 11px 12px; background: #fff; color: var(--dsg-ink); font: inherit; font-size: 13px; line-height: 1.35; }
.dsg__form textarea:focus { border-color: var(--dsg-gold); outline: 2px solid rgba(201,154,66,.14); }
.dsg__form button { display: grid; place-items: center; width: 44px !important; min-width: 44px !important; max-width: 44px !important; height: 44px !important; min-height: 44px; border: 0; border-radius: 12px; padding: 0 !important; background: var(--dsg-gold); color: var(--dsg-ink); box-shadow: none !important; font: inherit; font-size: 21px; font-weight: 700; line-height: 1; cursor: pointer; }
.dsg__form button:hover { background: #d6aa56; }
.dsg__form button:disabled { opacity: .5; cursor: wait; }
.dsg__disclaimer { margin: 0; padding: 4px 12px 10px; background: var(--dsg-paper); color: #8a8277; text-align: center; font-size: 9px; letter-spacing: .01em; }

@media (max-width: 520px) {
  .dsg { right: 12px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .dsg__panel { position: fixed; inset: 8px; width: auto; height: auto; border-radius: 16px; }
  .dsg__launcher { padding: 12px 15px !important; }
  .dsg__header { min-height: 76px; }
  .dsg__mark { width: 38px; height: 38px; }
  .dsg__header { grid-template-columns: 38px minmax(0,1fr) 30px 30px; gap: 6px; padding-inline: 12px; }
  .dsg__header strong { font-size: 16px; }
  .dsg__header small { font-size: 10px; }
  .dsg__select { max-width: 62px; padding-inline: 6px !important; }
  .dsg--fresh .dsg__panel { height: auto; }
  .dsg--open { right: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: no-preference) {
  .dsg__panel { animation: dsg-in .2s cubic-bezier(.2,.8,.2,1); transform-origin: bottom right; }
  @keyframes dsg-in { from { opacity: 0; transform: translateY(9px) scale(.985); } }
}
