/* sst-site-calendar 2026-10-06 — header Calendar button + popover.
   z-index 65: above the sticky header (20) and Coupons/Points popovers (60),
   below the SP nav drawer (70), cart drawer (80), language menu (90) and the
   SP purchase bar (1000). Not modal: no backdrop, page stays usable. */
:root {
  --sst-cal-bg: var(--sst-paper, #ffffff);
  --sst-cal-ink: var(--sst-ink, #121212);
  --sst-cal-muted: var(--sst-muted, #5f5f5f);
  --sst-cal-line: var(--sst-line, #e3e3e3);
  --sst-cal-hover: #f3f3f4;
  --sst-cal-sel-bg: #121212;
  --sst-cal-sel-ink: #ffffff;
  --sst-cal-today: var(--sst-accent, #9e2c5f);
  --sst-cal-dot-new: #d0342c;
  --sst-cal-ended: #8a8a8f;
  --sst-cal-shadow: 0 14px 40px rgba(0, 0, 0, .16), 0 2px 8px rgba(0, 0, 0, .08);
  --sst-cal-sale: #c62828;
  --sst-cal-coupon: #b45309;
  --sst-cal-campaign: #9e2c5f;
  --sst-cal-preorder: #6d28d9;
  --sst-cal-release: #1d4ed8;
  --sst-cal-ship_start: #15803d;
  --sst-cal-no_shipping: #0e7490;
  --sst-cal-notice: #475569;
}
html[data-sst-theme="dark"] {
  --sst-cal-bg: var(--sst-surface, #1a1a1c);
  --sst-cal-ink: var(--sst-ink, #e8e8e8);
  --sst-cal-muted: var(--sst-muted, #a3a3a8);
  --sst-cal-line: #34343a;
  --sst-cal-hover: #26262a;
  --sst-cal-sel-bg: #e8e8e8;
  --sst-cal-sel-ink: #121212;
  --sst-cal-today: var(--sst-accent-text, #e58bb5);
  --sst-cal-dot-new: #f87171;
  --sst-cal-ended: #75757d;
  --sst-cal-shadow: 0 14px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .04);
  --sst-cal-sale: #f87171;
  --sst-cal-coupon: #fbbf24;
  --sst-cal-campaign: #e58bb5;
  --sst-cal-preorder: #a78bfa;
  --sst-cal-release: #60a5fa;
  --sst-cal-ship_start: #4ade80;
  --sst-cal-no_shipping: #22d3ee;
  --sst-cal-notice: #94a3b8;
}

/* ---- header button (a <button>, so undo UA button chrome) ----
   Only the family and line height are inherited. Size / weight / letter-spacing / padding
   stay with the theme's .sst-icon-link (13px / 500 / .3px), exactly as on the <a> icons;
   a `font: inherit` here would replace them and widen the PC header. */
.sst-icon-link.sst-icon-link--calendar {
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  font-family: inherit;
  line-height: inherit;
  text-transform: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.sst-icon-link--calendar svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sst-icon-link--calendar[aria-expanded="true"] { color: var(--sst-accent, #9e2c5f); }
.sst-icon-link--calendar:focus-visible { outline: 2px solid var(--sst-focus, #2563eb); outline-offset: 2px; }
.sst-cal-dot {
  position: absolute;
  top: 2px;
  left: 20px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--sst-cal-dot-new);
  box-shadow: 0 0 0 2px var(--sst-paper, #fff);
  font-style: normal;
  pointer-events: none;
}
.sst-cal-dot[hidden] { display: none !important; }
@media (max-width: 900px) {
  .sst-cal-dot { left: 19px; top: 4px; }
}

/* ---- panel ---- */
.sst-cal {
  position: fixed;
  z-index: 65;
  top: 64px;
  left: 10px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 360px;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 80px);
  border: 1px solid var(--sst-cal-line);
  border-radius: 14px;
  color: var(--sst-cal-ink);
  background: var(--sst-cal-bg);
  box-shadow: var(--sst-cal-shadow);
  overflow: hidden;
  transform-origin: var(--sst-cal-ox, 90%) 0;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  -webkit-text-size-adjust: 100%;
}
.sst-cal[hidden] { display: none !important; }
.sst-cal:focus { outline: none; }
.sst-cal *, .sst-cal *::before, .sst-cal *::after { box-sizing: border-box; }
.sst-cal.is-open { animation: sst-cal-in 260ms cubic-bezier(.2, .9, .25, 1) both; }
.sst-cal.is-closing { animation: sst-cal-out 160ms cubic-bezier(.4, 0, 1, 1) both; pointer-events: none; }
@keyframes sst-cal-in {
  0% { opacity: 0; transform: translateY(-10px) scale(.55, .35); }
  62% { opacity: 1; transform: translateY(2px) scale(1.025, 1.04); }
  100% { opacity: 1; transform: none; }
}
@keyframes sst-cal-out {
  0% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-8px) scale(.8, .6); }
}
@media (prefers-reduced-motion: reduce) {
  .sst-cal.is-open, .sst-cal.is-closing { animation: none; }
}

.sst-cal__head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 6px 4px 14px;
}
.sst-cal__title { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.3; letter-spacing: 0; color: var(--sst-cal-ink); }
.sst-cal button { font: inherit; color: inherit; }
.sst-cal__close,
.sst-cal__step {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
}
.sst-cal__close svg, .sst-cal__step svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sst-cal__close:hover, .sst-cal__step:hover:not(:disabled) { background: var(--sst-cal-hover); }
.sst-cal__step:disabled { opacity: .3; cursor: default; }
.sst-cal__close:focus-visible, .sst-cal__step:focus-visible, .sst-cal__day:focus-visible, .sst-cal-item__link:focus-visible {
  outline: 2px solid var(--sst-focus, #2563eb);
  outline-offset: 1px;
}
.sst-cal__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 8px 12px;
}
.sst-cal__nav { display: flex; align-items: center; gap: 4px; padding: 0 0 6px; }
.sst-cal__month { flex: 1 1 auto; min-width: 0; text-align: center; }
.sst-cal__month-name { display: block; font-size: 15px; font-weight: 750; line-height: 1.3; }
.sst-cal__note { display: block; color: var(--sst-cal-muted); font-size: 11.5px; line-height: 1.35; }

.sst-cal__grid { display: grid; gap: 0; }
.sst-cal__row { display: grid; grid-template-columns: repeat(7, minmax(40px, 1fr)); }
.sst-cal__dow { padding: 2px 0 4px; color: var(--sst-cal-muted); font-size: 11.5px; font-weight: 700; text-align: center; }
.sst-cal__cell { display: flex; min-width: 0; padding: 0; }
.sst-cal__day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 40px;
  height: 44px;
  margin: 0;
  padding: 5px 0 0;
  border: 0;
  border-radius: 9px;
  background: none;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.sst-cal__day:hover { background: var(--sst-cal-hover); }
.sst-cal__num { font-size: 14px; font-weight: 600; line-height: 20px; }
.sst-cal__day.is-past .sst-cal__num { color: var(--sst-cal-muted); font-weight: 500; }
.sst-cal__day.is-today .sst-cal__num {
  min-width: 24px;
  border-radius: 999px;
  color: var(--sst-cal-today);
  font-weight: 800;
  box-shadow: inset 0 0 0 1.5px var(--sst-cal-today);
}
.sst-cal__day.is-selected { background: var(--sst-cal-sel-bg); color: var(--sst-cal-sel-ink); }
.sst-cal__day.is-selected .sst-cal__num { color: var(--sst-cal-sel-ink); }
.sst-cal__day.is-selected.is-today .sst-cal__num { box-shadow: inset 0 0 0 1.5px var(--sst-cal-sel-ink); }
.sst-cal__marks { display: flex; gap: 3px; align-items: center; justify-content: center; height: 10px; margin-top: 3px; }
.sst-cal__mark {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--sst-cal-notice);
  font-style: normal;
}
.sst-cal__mark.is-span { width: 11px; border-radius: 3px; }
.sst-cal__mark.is-ended { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--sst-cal-ended); }
.sst-cal__day.is-selected .sst-cal__mark { box-shadow: 0 0 0 1.5px var(--sst-cal-sel-bg), 0 0 0 2.5px var(--sst-cal-sel-ink); }
.sst-cal__day.is-selected .sst-cal__mark.is-ended { box-shadow: inset 0 0 0 1.5px var(--sst-cal-sel-ink); }
.sst-cal__more { font-size: 10px; font-style: normal; font-weight: 800; line-height: 1; }
.sst-cal__mark[data-type="sale"] { background: var(--sst-cal-sale); }
.sst-cal__mark[data-type="coupon"] { background: var(--sst-cal-coupon); }
.sst-cal__mark[data-type="campaign"] { background: var(--sst-cal-campaign); }
.sst-cal__mark[data-type="preorder"] { background: var(--sst-cal-preorder); }
.sst-cal__mark[data-type="release"] { background: var(--sst-cal-release); }
.sst-cal__mark[data-type="ship_start"] { background: var(--sst-cal-ship_start); }
.sst-cal__mark[data-type="no_shipping"] { background: var(--sst-cal-no_shipping); }
.sst-cal__mark[data-type="notice"] { background: var(--sst-cal-notice); }

.sst-cal__empty, .sst-cal__none { margin: 10px 6px 2px; color: var(--sst-cal-muted); font-size: 13px; text-align: center; }
.sst-cal__detail { padding: 0 6px; }
.sst-cal__date { margin: 12px 0 6px; padding-top: 10px; border-top: 1px solid var(--sst-cal-line); color: var(--sst-cal-ink); font-size: 13px; font-weight: 750; line-height: 1.35; letter-spacing: 0; }
.sst-cal__items { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sst-cal-item { margin: 0; padding: 10px 12px; border: 1px solid var(--sst-cal-line); border-radius: 10px; overflow-wrap: anywhere; }
.sst-cal-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 3px; }
.sst-cal-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--sst-cal-ink); font-size: 12px; font-weight: 750; letter-spacing: .01em; }
.sst-cal-item__ended { padding: 1px 7px; border-radius: 999px; color: var(--sst-cal-muted); background: var(--sst-cal-hover); font-size: 11px; font-weight: 700; }
.sst-cal-item__title { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.4; }
.sst-cal-item__when, .sst-cal-item__local { margin: 3px 0 0; font-size: 12.5px; line-height: 1.4; }
.sst-cal-item__local { color: var(--sst-cal-muted); }
.sst-cal-item__body { margin: 6px 0 0; color: var(--sst-cal-ink); font-size: 13px; line-height: 1.5; white-space: pre-line; }
.sst-cal-item__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 8px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--sst-btn-label, #fff) !important;
  background: var(--sst-accent, #9e2c5f);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none !important;
}
.sst-cal-item__link:hover { background: var(--sst-accent-dark, #7a2149); }
.sst-cal-item.is-ended .sst-cal-item__title,
.sst-cal-item.is-ended .sst-cal-item__when,
.sst-cal-item.is-ended .sst-cal-item__body,
.sst-cal-item.is-ended .sst-cal-chip { color: var(--sst-cal-muted); }

@media (max-width: 900px) {
  .sst-cal { border-radius: 12px; }
  .sst-cal__day { height: 46px; }
}
