/* MyBots 2.0.0 — Pocket design system. Values = design/tokens.json (Hermes Pocket's own tokens,
   structure and feel only; no colours sampled from Cadu). Scope: everything lives under .mybots.
   Theme: [data-theme="light"|"dark"] on .mybots or an ancestor; without it, prefers-color-scheme decides.
   --mb-accent is a TEXT colour (links, eyebrow, current tab). Shapes use --mb-accent-fill; the primary
   button is the pale --mb-capsule tint with --mb-accent-ink. Never put text on --mb-accent-fill.
   Deprecated v1 aliases live at the end of this file until the pages move (redesign Tasks 2-4). */

/* Self-hosted Pretendard Variable 1.3.9 (OFL 1.1, design/assets/fonts/OFL.txt). */
@font-face {
  font-family: "Pretendard Variable";
  src: url("/assets/fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 45 920;
  font-display: swap;
}

/* ---------- Light (default): Pocket "paper" + Blue ---------- */
.mybots {
  --mb-backdrop-1: #f1eef6;
  --mb-backdrop-2: #f8f4ec;
  --mb-backdrop-3: #faeee6;
  --mb-canvas: #f8f4ec;
  --mb-surface: #fffcf7;
  --mb-surface-elevated: #f8f4ed; /* sheet */
  --mb-fill: #ece6db;
  --mb-fill-strong: #ded8cd;
  --mb-sidebar: #f0e8da;
  --mb-scrim: rgb(0 0 0 / 18%);
  --mb-ink: #1d1b19;
  --mb-muted: #66615a;
  --mb-line: rgb(29 27 25 / 9%);
  --mb-control-line: #8c857a;
  --mb-accent: #1b5fc8; /* text, links, eyebrow, current tab */
  --mb-accent-fill: #2f80ed; /* rings, toggles, check dots, large shapes only */
  --mb-accent-soft: #d8e1ec;
  --mb-accent-select: #eaf0f6;
  --mb-capsule: #c5d9f4;
  --mb-capsule-hover: #b4cff3;
  --mb-accent-ink: #1d1b19; /* label on the primary capsule */
  --mb-on-accent: #ffffff; /* icons on --mb-accent-fill shapes (non-text, 3:1) */
  --mb-accent-hover: var(--mb-capsule-hover);
  --mb-focus: #1b5fc8;
  --mb-success: #186e37;
  --mb-success-soft: #e0eedf;
  --mb-warning: #9a4a06;
  --mb-warning-soft: #fae8d7;
  --mb-danger: #b0262d;
  --mb-danger-soft: #fbe9e4;
  --mb-info: #1b5fc8;
  --mb-info-soft: #e6edf6;
  --mb-toggle-on: #2f80ed;
  --mb-toggle-off: #8c857a;
  --mb-code-surface: #ece6db;
  --mb-code-ink: #1d1b19;
  --mb-group: color-mix(in srgb, var(--mb-surface) 55%, var(--mb-fill));
  --mb-glass: color-mix(in srgb, var(--mb-surface) 78%, transparent);
  --mb-topbar-glass: color-mix(in srgb, var(--mb-canvas) 72%, transparent);
  --mb-backdrop: linear-gradient(
    135deg,
    var(--mb-backdrop-1) 0%,
    var(--mb-backdrop-2) 50%,
    var(--mb-backdrop-3) 100%
  );

  /* spacing (Pocket 4/8/12/16/20/24 + web section steps) */
  --mb-spacing-xs: 4px;
  --mb-spacing-sm: 8px;
  --mb-spacing-smd: 12px;
  --mb-spacing-md: 16px;
  --mb-spacing-mdl: 20px;
  --mb-spacing-lg: 24px;
  --mb-spacing-xl: 32px;
  --mb-spacing-2xl: 48px;
  --mb-spacing-3xl: 64px;
  --mb-spacing-section: 80px;
  --mb-spacing-section-mobile: 48px;
  /* stepped at 768 / 1200 by the `mb` container (see Responsive layer) */
  --mb-gutter: 16px;
  --mb-space-section: 48px;
  --mb-bot-avatar: 40px;

  /* radius */
  --mb-radius-control: 10px;
  --mb-radius-select: 14px;
  --mb-radius-card: 16px;
  --mb-radius-modal: 26px;
  --mb-radius-pill: 999px;
  --mb-radius-avatar: 12px;

  /* controls */
  --mb-control-circle: 36px;
  --mb-target-min: 44px;
  --mb-control-capsule: 46px;
  --mb-control-capsule-lg: 52px;
  --mb-control-field: 48px;
  --mb-control-segment: 36px;
  --mb-topbar-height: 64px;
  --mb-tabbar-height: 64px;
  --mb-sidebar-width: 264px;
  --mb-sheet-max: 560px;
  --mb-reading-width: 720px;
  --mb-max-width: 1200px;

  /* shadow */
  --mb-shadow-none: none;
  --mb-shadow-soft: 0 1px 4px rgb(0 0 0 / 8%);
  --mb-shadow-capsule: 0 6px 18px rgb(47 128 237 / 18%);
  --mb-shadow-float: 0 8px 28px rgb(29 27 25 / 10%);
  --mb-shadow-raised: 0 18px 48px rgb(0 0 0 / 16%);

  /* motion */
  --mb-duration-fast: 160ms;
  --mb-duration-base: 260ms;
  --mb-ease: cubic-bezier(0.2, 0, 0, 1);

  /* type */
  --mb-font:
    "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, sans-serif;
  --mb-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --mb-type-display: 800 30px/1.18 var(--mb-font);
  --mb-type-title: 800 27px/1.2 var(--mb-font);
  --mb-type-heading: 700 20px/1.3 var(--mb-font);
  --mb-type-lead: 16px;

  color-scheme: light;
  font-family: var(--mb-font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--mb-ink);
  background: var(--mb-canvas);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Dark: Pocket "gray" + Blue ---------- */
.mybots[data-theme="dark"],
[data-theme="dark"] .mybots {
  --mb-backdrop-1: #1b2029;
  --mb-backdrop-2: #1e1f23;
  --mb-backdrop-3: #2b1f1f;
  --mb-canvas: #1e1f23;
  --mb-surface: #26282d;
  --mb-surface-elevated: #2f3135;
  --mb-fill: #2e3036;
  --mb-fill-strong: #3c3e43;
  --mb-sidebar: #17181b;
  --mb-scrim: rgb(0 0 0 / 45%);
  --mb-ink: #f1f1f3;
  --mb-muted: #a9a9b0;
  --mb-line: rgb(241 241 243 / 12%);
  --mb-control-line: #7c7e86;
  --mb-accent: #7db5ff;
  --mb-accent-fill: #2f80ed;
  --mb-accent-soft: #233c60;
  --mb-accent-select: #2a3546;
  --mb-capsule: #294163;
  --mb-capsule-hover: #294976;
  --mb-accent-ink: #f1f1f3;
  --mb-focus: #7db5ff;
  --mb-success: #6fd58f;
  --mb-success-soft: #32443d;
  --mb-warning: #ffae68;
  --mb-warning-soft: #493d36;
  --mb-danger: #ff9c96;
  --mb-danger-soft: #44383c;
  --mb-info: #7db5ff;
  --mb-info-soft: #343f4f;
  --mb-toggle-on: #2f80ed;
  --mb-toggle-off: #7c7e86;
  --mb-code-surface: #17181b;
  --mb-code-ink: #f1f1f3;
  --mb-group: color-mix(in srgb, var(--mb-surface) 70%, var(--mb-fill));
  --mb-shadow-float: 0 8px 28px rgb(0 0 0 / 40%);
  --mb-shadow-capsule: 0 6px 20px rgb(47 128 237 / 22%);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  .mybots:not([data-theme="light"]):not([data-theme="light"] *) {
    --mb-backdrop-1: #1b2029;
    --mb-backdrop-2: #1e1f23;
    --mb-backdrop-3: #2b1f1f;
    --mb-canvas: #1e1f23;
    --mb-surface: #26282d;
    --mb-surface-elevated: #2f3135;
    --mb-fill: #2e3036;
    --mb-fill-strong: #3c3e43;
    --mb-sidebar: #17181b;
    --mb-scrim: rgb(0 0 0 / 45%);
    --mb-ink: #f1f1f3;
    --mb-muted: #a9a9b0;
    --mb-line: rgb(241 241 243 / 12%);
    --mb-control-line: #7c7e86;
    --mb-accent: #7db5ff;
    --mb-accent-fill: #2f80ed;
    --mb-accent-soft: #233c60;
    --mb-accent-select: #2a3546;
    --mb-capsule: #294163;
    --mb-capsule-hover: #294976;
    --mb-accent-ink: #f1f1f3;
    --mb-focus: #7db5ff;
    --mb-success: #6fd58f;
    --mb-success-soft: #32443d;
    --mb-warning: #ffae68;
    --mb-warning-soft: #493d36;
    --mb-danger: #ff9c96;
    --mb-danger-soft: #44383c;
    --mb-info: #7db5ff;
    --mb-info-soft: #343f4f;
    --mb-toggle-on: #2f80ed;
    --mb-toggle-off: #7c7e86;
    --mb-code-surface: #17181b;
    --mb-code-ink: #f1f1f3;
    --mb-group: color-mix(in srgb, var(--mb-surface) 70%, var(--mb-fill));
    --mb-shadow-float: 0 8px 28px rgb(0 0 0 / 40%);
    --mb-shadow-capsule: 0 6px 20px rgb(47 128 237 / 22%);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
.mybots *,
.mybots *::before,
.mybots *::after {
  box-sizing: border-box;
}
.mybots :where(button, input, select, textarea) {
  font: inherit;
  color: inherit;
}
.mybots :where(a) {
  color: var(--mb-accent);
  text-underline-offset: 3px;
}
.mybots
  :where(
    a,
    button,
    input,
    select,
    textarea,
    summary,
    [tabindex]
  ):focus-visible {
  outline: 3px solid var(--mb-focus);
  outline-offset: 2px;
}
.mybots :where(h1, h2, h3, p) {
  margin: 0;
}
.mybots .mb-backdrop {
  background: var(--mb-backdrop);
  background-attachment: fixed;
  min-height: 100dvh;
}

.mybots [hidden] {
  display: none !important;
}
/* Hangul labels: drop Latin caps tracking */
.mybots .mb-ko {
  letter-spacing: 0 !important;
  text-transform: none !important;
}
/* ---------- Type ---------- */
.mybots .mb-display {
  font: var(--mb-type-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
  word-break: keep-all;
}
.mybots .mb-title {
  font: var(--mb-type-title);
  letter-spacing: -0.022em;
  text-wrap: balance;
  word-break: keep-all;
}
.mybots .mb-heading {
  font: var(--mb-type-heading);
  letter-spacing: -0.015em;
  word-break: keep-all;
}
.mybots .mb-lead {
  font-size: var(--mb-type-lead);
  line-height: 1.6;
  color: var(--mb-muted);
  word-break: keep-all;
}
.mybots .mb-caption {
  font-size: 13px;
  line-height: 1.45;
  color: var(--mb-muted);
}
.mybots .mb-mono {
  font-family: var(--mb-font-mono);
  font-size: 13px;
}
.mybots .mb-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mb-accent);
}
.mybots .mb-eyebrow--mixed {
  letter-spacing: 0.1em;
} /* Latin + Hangul in one line */
.mybots .mb-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mb-muted);
  margin: 0 0 var(--mb-spacing-sm);
}
.mybots .mb-section-label--ko {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.mybots .mb-section-label--rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--mb-line);
}
.mybots .mb-section-label .mb-count {
  letter-spacing: 0.08em;
}

/* ---------- CircleIconButton ---------- */
.mybots .mb-circle {
  inline-size: var(--mb-target-min);
  block-size: var(--mb-target-min);
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--mb-ink);
  text-decoration: none;
  flex: none;
}
.mybots .mb-circle::before {
  content: "";
  grid-area: 1 / 1;
  inline-size: var(--mb-control-circle);
  block-size: var(--mb-control-circle);
  border-radius: 50%;
  background: var(--mb-glass);
  box-shadow:
    var(--mb-shadow-soft),
    inset 0 0 0 1px var(--mb-line);
  transition: background var(--mb-duration-fast) var(--mb-ease);
}
.mybots .mb-circle > * {
  grid-area: 1 / 1;
  position: relative;
}
.mybots .mb-circle svg {
  inline-size: 18px;
  block-size: 18px;
}
.mybots .mb-circle:hover::before {
  background: var(--mb-surface);
}
.mybots .mb-circle--filled {
  color: var(--mb-on-accent);
}
.mybots .mb-circle--filled::before {
  background: var(--mb-accent-fill);
}
.mybots .mb-circle:disabled {
  cursor: not-allowed;
  color: var(--mb-muted);
}

/* Capsule group (Pocket's top-right pill holding 2 circle actions) */
.mybots .mb-pill-group {
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: var(--mb-radius-pill);
  background: var(--mb-glass);
  box-shadow:
    var(--mb-shadow-soft),
    inset 0 0 0 1px var(--mb-line);
}
.mybots .mb-pill-group .mb-circle::before {
  background: transparent;
  box-shadow: none;
}
.mybots .mb-pill-group .mb-circle:hover::before {
  background: var(--mb-fill);
}

/* ---------- CapsuleButton ---------- */
.mybots .mb-capsule {
  min-block-size: var(--mb-control-capsule);
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--mb-radius-pill);
  border: 1px solid var(--mb-line);
  background: var(--mb-capsule);
  color: var(--mb-accent-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--mb-shadow-capsule);
  transition:
    background var(--mb-duration-fast) var(--mb-ease),
    box-shadow var(--mb-duration-fast) var(--mb-ease);
}
.mybots .mb-capsule svg {
  inline-size: 18px;
  block-size: 18px;
  flex: none;
}
.mybots .mb-capsule:hover {
  background: var(--mb-capsule-hover);
}
.mybots .mb-capsule--lg {
  min-block-size: var(--mb-control-capsule-lg);
  padding: 0 36px;
  font-size: 16px;
}
.mybots .mb-capsule--block {
  inline-size: 100%;
}
.mybots .mb-capsule--quiet {
  background: var(--mb-glass);
  box-shadow: var(--mb-shadow-soft);
}
.mybots .mb-capsule--quiet:hover {
  background: var(--mb-surface);
}
.mybots .mb-capsule:disabled,
.mybots .mb-capsule[aria-disabled="true"] {
  background: var(--mb-fill);
  color: var(--mb-muted);
  box-shadow: none;
  cursor: not-allowed;
}
.mybots .mb-capsule[aria-busy="true"] {
  cursor: progress;
}
.mybots .mb-capsule[aria-busy="true"]::before {
  content: "";
  inline-size: 16px;
  block-size: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: mb-spin 0.8s linear infinite;
}
@keyframes mb-spin {
  to {
    transform: rotate(360deg);
  }
}
.mybots .mb-text-link {
  min-block-size: var(--mb-target-min);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mb-accent);
  font-weight: 600;
  text-decoration: none;
}
.mybots .mb-text-link:hover {
  text-decoration: underline;
}

/* ---------- SegmentedPill ---------- */
.mybots .mb-segmented {
  display: flex;
  block-size: var(--mb-control-field);
  align-items: center;
}
.mybots .mb-segmented__track {
  display: flex;
  flex: 1;
  gap: 2px;
  padding: 2px;
  block-size: var(--mb-control-segment);
  border-radius: var(--mb-radius-pill);
  background: var(--mb-fill-strong);
}
.mybots .mb-segmented button {
  flex: 1;
  min-inline-size: 0;
  border: 0;
  border-radius: var(--mb-radius-pill);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--mb-ink);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 12px;
  position: relative;
  transition: background var(--mb-duration-fast) var(--mb-ease);
}
/* keep a 44px hit area around the 32px thumb */
.mybots .mb-segmented button::after {
  content: "";
  position: absolute;
  inset: -6px 0;
}
.mybots .mb-segmented button[aria-pressed="true"],
.mybots .mb-segmented button[aria-selected="true"] {
  background: var(--mb-surface);
  font-weight: 600;
  box-shadow: var(--mb-shadow-soft);
}
.mybots .mb-segmented button:disabled {
  color: var(--mb-muted);
  background: var(--mb-fill);
  cursor: not-allowed;
}
.mybots .mb-segmented--inline {
  display: inline-flex;
}
.mybots .mb-segmented--inline .mb-segmented__track {
  flex: none;
}

/* ---------- SelectCard ---------- */
.mybots .mb-select-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 12px;
  text-align: start;
  border-radius: var(--mb-radius-select);
  border: 1px solid var(--mb-line);
  background: var(--mb-fill);
  color: var(--mb-ink);
  cursor: pointer;
  transition:
    background var(--mb-duration-fast) var(--mb-ease),
    border-color var(--mb-duration-fast) var(--mb-ease);
}
.mybots .mb-select-card[aria-pressed="true"],
.mybots .mb-select-card[aria-checked="true"] {
  background: var(--mb-accent-select);
  border-color: var(--mb-accent-fill);
  box-shadow: inset 0 0 0 0.6px var(--mb-accent-fill);
}
.mybots .mb-checkdot {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  inline-size: 18px;
  block-size: 18px;
  border-radius: 50%;
  background: var(--mb-accent-fill);
  display: none;
  place-items: center;
  color: var(--mb-on-accent);
}
.mybots .mb-checkdot svg {
  inline-size: 13px;
  block-size: 13px;
}
.mybots .mb-select-card[aria-pressed="true"] .mb-checkdot,
.mybots .mb-select-card[aria-checked="true"] .mb-checkdot {
  display: grid;
}

/* ---------- SettingsGroup / rows ---------- */
.mybots .mb-group {
  background: var(--mb-group);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-card);
  padding: 4px 16px;
}
.mybots .mb-group + .mb-group {
  margin-block-start: 12px;
}
.mybots .mb-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 6px;
  font-size: 14px;
  font-weight: 600;
}
.mybots .mb-group__title svg {
  inline-size: 16px;
  block-size: 16px;
}
.mybots .mb-setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-block-size: 52px;
  padding: 10px 0;
  color: var(--mb-ink);
  text-decoration: none;
}
.mybots .mb-setting-row + .mb-setting-row,
.mybots .mb-group__title + .mb-setting-row {
  border-block-start: 1px solid var(--mb-line);
}
.mybots .mb-group__title + .mb-setting-row {
  border-block-start: 0;
}
.mybots .mb-setting-row__icon {
  inline-size: 20px;
  block-size: 20px;
  color: var(--mb-muted);
  flex: none;
}
.mybots .mb-setting-row__text {
  flex: 1;
  min-inline-size: 0;
  display: grid;
  gap: 2px;
}
.mybots .mb-setting-row__title {
  font-size: 16px;
  font-weight: 500;
}
.mybots .mb-setting-row__value {
  color: var(--mb-muted);
  font-size: 15px;
}
.mybots .mb-chevron {
  inline-size: 18px;
  block-size: 18px;
  color: var(--mb-muted);
  flex: none;
}
.mybots a.mb-setting-row:hover {
  background: color-mix(in srgb, var(--mb-ink) 4%, transparent);
  margin-inline: -16px;
  padding-inline: 16px;
}
.mybots .mb-leader {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-block-size: 32px;
  padding: 6px 0;
}
.mybots .mb-leader dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mb-muted);
}
.mybots .mb-leader::after {
  content: none;
}
.mybots .mb-leader__dots {
  flex: 1;
  border-block-end: 1.5px dotted
    color-mix(in srgb, var(--mb-muted) 55%, transparent);
  transform: translateY(-4px);
}
.mybots .mb-leader dd {
  margin: 0;
  font-family: var(--mb-font-mono);
  font-size: 13px;
}

/* ---------- Fields / Search ---------- */
.mybots .mb-field {
  display: grid;
  gap: 6px;
}
.mybots .mb-field > span,
.mybots .mb-field > label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mb-muted);
}
.mybots .mb-field--ko > span {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}
.mybots .mb-input {
  inline-size: 100%;
  min-block-size: var(--mb-control-field);
  padding: 12px;
  border-radius: var(--mb-radius-control);
  border: 1px solid var(--mb-line);
  background: color-mix(in srgb, var(--mb-fill) 92%, transparent);
  color: var(--mb-ink);
}
.mybots textarea.mb-input {
  min-block-size: 120px;
  resize: vertical;
  line-height: 1.55;
}
.mybots .mb-input::placeholder {
  color: var(--mb-muted);
  opacity: 1;
}
.mybots .mb-input:focus {
  border-color: var(--mb-accent);
  box-shadow: inset 0 0 0 0.4px var(--mb-accent);
}
.mybots .mb-input:focus-visible {
  outline: 3px solid var(--mb-focus);
  outline-offset: 2px;
}
.mybots .mb-input[aria-invalid="true"] {
  border-color: var(--mb-danger);
}
.mybots .mb-help {
  font-size: 13px;
  line-height: 1.45;
  color: var(--mb-muted);
}
.mybots .mb-search {
  position: relative;
  display: block;
}
.mybots .mb-search svg {
  position: absolute;
  inset-inline-start: 14px;
  inset-block-start: 50%;
  translate: 0 -50%;
  inline-size: 20px;
  block-size: 20px;
  color: var(--mb-muted);
  pointer-events: none;
}
.mybots .mb-search .mb-input {
  padding-inline-start: 44px;
  border-radius: 12px;
  font-size: 16px;
}

/* ---------- Toggle (switch) ---------- */
.mybots .mb-toggle {
  appearance: none;
  margin: 0;
  inline-size: 51px;
  block-size: 31px;
  flex: none;
  border-radius: 999px;
  background: var(--mb-toggle-off);
  position: relative;
  cursor: pointer;
  transition: background var(--mb-duration-fast) var(--mb-ease);
}
.mybots .mb-toggle::before {
  content: "";
  position: absolute;
  inset-block-start: 2px;
  inset-inline-start: 2px;
  inline-size: 27px;
  block-size: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
  transition: translate var(--mb-duration-fast) var(--mb-ease);
}
.mybots .mb-toggle:checked {
  background: var(--mb-toggle-on);
}
.mybots .mb-toggle:checked::before {
  translate: 20px 0;
}
.mybots .mb-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.mybots .mb-toggle-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-block-size: var(--mb-target-min);
  cursor: pointer;
}

/* ---------- Badge ---------- */
.mybots .mb-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--mb-radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
  white-space: nowrap;
  background: var(--mb-fill);
  color: var(--mb-ink);
}
.mybots .mb-badge--soon {
  background: var(--mb-warning-soft);
  color: var(--mb-warning);
}
.mybots .mb-badge--accent {
  background: var(--mb-accent-soft);
  color: var(--mb-accent);
}
.mybots .mb-badge--success {
  background: var(--mb-success-soft);
  color: var(--mb-success);
}
.mybots .mb-badge--outlined {
  background: transparent;
  border-radius: 4px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 60%, transparent);
  color: var(--mb-muted);
}
.mybots .mb-badge--outlined.is-active {
  color: var(--mb-accent);
}
/* Hangul has no caps: drop the wide tracking and the uppercase transform */
.mybots .mb-badge--outlined:lang(ko),
.mybots .mb-badge--outlined.mb-ko {
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- Avatar (CSS blob; real PNGs replace the shape) ---------- */
.mybots .mb-avatar {
  --blob: #7a7f8c;
  --size: 40px;
  inline-size: var(--size);
  block-size: var(--size);
  flex: none;
  position: relative;
  border-radius: 48% 52% 44% 46% / 58% 56% 42% 44%;
  background:
    radial-gradient(
      circle at 34% 26%,
      color-mix(in srgb, #fff 34%, var(--blob)) 0 18%,
      transparent 46%
    ),
    linear-gradient(
      160deg,
      color-mix(in srgb, #fff 12%, var(--blob)),
      color-mix(in srgb, #000 22%, var(--blob))
    );
  box-shadow: inset 0 -3px 6px rgb(0 0 0 / 16%);
}
.mybots .mb-avatar::before,
.mybots .mb-avatar::after {
  content: "";
  position: absolute;
  inset-block-start: 40%;
  inline-size: 9%;
  block-size: 11%;
  border-radius: 50%;
  background: #fff;
}
.mybots .mb-avatar::before {
  inset-inline-start: 33%;
}
.mybots .mb-avatar::after {
  inset-inline-end: 33%;
}
.mybots img.mb-avatar {
  object-fit: contain;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
.mybots .mb-avatar--card {
  --size: 96px;
}
.mybots .mb-avatar--hero {
  --size: 160px;
}

/* ---------- Bot row / card (same element, .bot-card hook kept) ---------- */
.mybots .mb-bot {
  display: flex;
  align-items: center;
  gap: 14px;
  min-block-size: 68px;
  padding: 12px 4px;
  color: var(--mb-ink);
  text-decoration: none;
  border-block-end: 1px solid var(--mb-line);
  position: relative;
}
.mybots .mb-bot__text {
  flex: 1;
  min-inline-size: 0;
  display: grid;
  gap: 2px;
}
.mybots .mb-bot__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
}
.mybots .mb-bot__role {
  font-size: 14px;
  color: var(--mb-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mybots .mb-bot__desc {
  display: none;
  font-size: 14px;
  color: var(--mb-muted);
  line-height: 1.5;
}
.mybots .mb-bot:hover {
  background: color-mix(in srgb, var(--mb-ink) 3%, transparent);
}
.mybots .mb-bot :is(.mb-avatar, .mb-bot__avatar) {
  --size: var(--mb-bot-avatar);
}
.mybots .mb-bot__avatar {
  display: block;
  flex: none;
  inline-size: var(--size);
  block-size: var(--size);
}
.mybots .mb-bot[data-availability="coming-soon"] :is(.mb-avatar, .mb-bot__avatar) {
  filter: saturate(0.45);
  opacity: 0.8;
}
.mybots .mb-bot--card {
  --mb-bot-avatar: 96px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  min-block-size: 0;
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-card);
  background: var(--mb-group);
  transition: background var(--mb-duration-fast) var(--mb-ease);
}
.mybots .mb-bot--card .mb-bot__desc {
  display: block;
}
.mybots .mb-bot--card .mb-chevron {
  position: absolute;
  inset-block-start: 20px;
  inset-inline-end: 16px;
}
.mybots .mb-bot--card:hover {
  background: var(--mb-surface);
}
/* Bot grid: rows stacked on phones; columns come from the responsive layer */
.mybots .mb-bot-grid {
  display: grid;
}

/* ---------- Notice / Empty ---------- */
.mybots .mb-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--mb-radius-select);
  background: var(--mb-info-soft);
  color: var(--mb-ink);
  font-size: 15px;
  line-height: 1.5;
}
.mybots .mb-notice svg {
  inline-size: 20px;
  block-size: 20px;
  flex: none;
  color: var(--mb-info);
  margin-block-start: 1px;
}
/* links inside a notice stay ink: accent is not an allowed pair on the status softs */
.mybots .mb-notice a {
  color: inherit;
  text-decoration: underline;
}
.mybots .mb-notice--soon {
  background: var(--mb-warning-soft);
}
.mybots .mb-notice--soon svg {
  color: var(--mb-warning);
}
.mybots .mb-notice--success {
  background: var(--mb-success-soft);
}
.mybots .mb-notice--success svg {
  color: var(--mb-success);
}
.mybots .mb-notice--error {
  background: var(--mb-danger-soft);
}
.mybots .mb-notice--error svg {
  color: var(--mb-danger);
}
.mybots .mb-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 48px 16px;
  text-align: center;
}
.mybots .mb-empty p {
  color: var(--mb-muted);
  max-inline-size: 36ch;
}

/* ---------- Sheet / Dialog ---------- */
.mybots dialog.mb-sheet {
  inline-size: min(calc(100% - 20px), var(--mb-sheet-max));
  max-block-size: 82dvh;
  padding: 0;
  margin: auto auto 10px;
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-modal);
  background: var(--mb-surface-elevated);
  color: var(--mb-ink);
  box-shadow: var(--mb-shadow-raised);
  overflow: auto;
}
.mybots dialog.mb-sheet::backdrop {
  background: var(--mb-scrim);
}
.mybots dialog.mb-sheet[open] {
  animation: mb-sheet-in var(--mb-duration-base) var(--mb-ease);
}
@keyframes mb-sheet-in {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}
.mybots .mb-sheet__grabber {
  inline-size: 36px;
  block-size: 4px;
  border-radius: 2px;
  margin: 6px auto 0;
  background: color-mix(in srgb, var(--mb-ink) 22%, transparent);
}
.mybots .mb-sheet__head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 4px 10px;
  min-block-size: 56px;
}
.mybots .mb-sheet__head h2 {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
}
.mybots .mb-sheet__body {
  padding: 8px 16px 20px;
  display: grid;
  gap: 12px;
}
.mybots .mb-sheet__foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 16px 16px;
  flex-wrap: wrap;
}
@media (min-width: 768px) {
  .mybots dialog.mb-sheet {
    margin: auto;
  }
}

/* ---------- TopBar / Floating tab bar ---------- */
.mybots .mb-topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-block-size: var(--mb-topbar-height);
  padding: 10px var(--mb-gutter);
  background: var(--mb-topbar-glass);
  backdrop-filter: blur(14px);
}
.mybots .mb-topbar__start {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mybots .mb-topbar__end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mybots .mb-topbar__title {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}
.mybots .mb-wordmark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--mb-ink);
  text-decoration: none;
  min-block-size: 44px;
  display: inline-flex;
  align-items: center;
}
.mybots .mb-wordmark b {
  color: var(--mb-accent);
}
.mybots .mb-navpill {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--mb-glass);
  box-shadow:
    var(--mb-shadow-soft),
    inset 0 0 0 1px var(--mb-line);
}
.mybots .mb-navpill a {
  min-block-size: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--mb-ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.mybots .mb-navpill a:hover {
  background: var(--mb-fill);
}
.mybots .mb-navpill a[aria-current="page"] {
  background: var(--mb-surface);
  color: var(--mb-accent);
  font-weight: 600;
  box-shadow: var(--mb-shadow-soft);
}
.mybots .mb-tabbar {
  position: fixed;
  inset-inline: var(--mb-gutter);
  inset-block-end: calc(12px + env(safe-area-inset-bottom));
  z-index: 30;
  max-inline-size: 420px;
  margin-inline: auto;
  block-size: var(--mb-tabbar-height);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mb-surface) 92%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid var(--mb-line);
  box-shadow: var(--mb-shadow-float);
}
.mybots .mb-tabbar a {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 999px;
  color: var(--mb-muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.mybots .mb-tabbar svg {
  inline-size: 22px;
  block-size: 22px;
}
.mybots .mb-tabbar a[aria-current="page"] {
  color: var(--mb-accent);
  font-weight: 700;
}

/* ---------- CMS Sidebar ---------- */
.mybots .mb-sidebar {
  inline-size: var(--mb-sidebar-width);
  background: var(--mb-sidebar);
  display: flex;
  flex-direction: column;
  padding: 10px 10px 0;
  border-inline-end: 1px solid var(--mb-line);
}
.mybots .mb-sidebar__head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-block-size: 56px;
  margin-block-end: 8px;
}
.mybots .mb-sidebar__head strong {
  text-align: center;
  font-size: 17px;
}
.mybots .mb-sidebar__nav {
  display: grid;
  gap: 4px;
}
.mybots .mb-sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-block-size: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--mb-ink);
  font-size: 16px;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  inline-size: 100%;
}
.mybots .mb-sidebar__item svg {
  inline-size: 20px;
  block-size: 20px;
  flex: none;
}
.mybots .mb-sidebar__item:hover {
  background: color-mix(in srgb, var(--mb-ink) 5%, transparent);
}
.mybots .mb-sidebar__item[aria-current="page"] {
  background: color-mix(in srgb, var(--mb-ink) 8%, var(--mb-sidebar));
  font-weight: 600;
}
.mybots .mb-sidebar__item--accent {
  color: var(--mb-accent);
  font-weight: 600;
}
.mybots .mb-sidebar__section {
  margin: 20px 8px 6px;
}
.mybots .mb-sidebar__foot {
  margin-block-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-block-size: 64px;
  padding: 8px;
  border-block-start: 1px solid var(--mb-line);
  margin-inline: -10px;
  padding-inline: 16px;
}

/* ---------- CMS table (rows in a group card) ---------- */
.mybots .mb-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.mybots .mb-table th {
  text-align: start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mb-muted);
  padding: 12px 8px 8px;
  border-block-end: 1px solid var(--mb-line);
}
.mybots .mb-table td {
  padding: 10px 8px;
  border-block-end: 1px solid var(--mb-line);
  vertical-align: middle;
}
.mybots .mb-table tr:last-child td {
  border-block-end: 0;
}
.mybots .mb-table tbody tr[aria-selected="true"] td {
  background: var(--mb-accent-select);
}
.mybots .mb-table tbody tr[aria-selected="true"] td:first-child {
  border-start-start-radius: 10px;
  border-end-start-radius: 10px;
}
.mybots .mb-table tbody tr[aria-selected="true"] td:last-child {
  border-start-end-radius: 10px;
  border-end-end-radius: 10px;
}

/* ---------- Step dots ---------- */
.mybots .mb-dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.mybots .mb-dots i {
  inline-size: 6px;
  block-size: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--mb-ink) 22%, transparent);
  transition: inline-size var(--mb-duration-base) var(--mb-ease);
}
.mybots .mb-dots i.is-current {
  inline-size: 22px;
  background: var(--mb-accent-fill);
}

/* ---------- Utilities ---------- */
.mybots .mb-visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.mybots .mb-skip {
  position: absolute;
  inset-inline-start: 12px;
  inset-block-start: -60px;
  z-index: 50;
}
.mybots .mb-skip:focus {
  inset-block-start: 12px;
}

/* ---------- Responsive layer ----------
   Put .mb-container (or container-name "mb") on the page root. Every element inside
   then picks up the 768 / 1200 steps for type, gutter and section spacing.
   :where() keeps specificity at 0 so a component can still override a step.
   .mb-bot--auto is a row on phones and a card from 768 (D4); .mb-bot-grid gives 1/2/4 columns. */
.mybots .mb-container {
  container: mb / inline-size;
}
@container mb (min-width: 768px) {
  :where(.mybots *) {
    --mb-type-display: 800 36px/1.18 var(--mb-font);
    --mb-type-title: 800 28px/1.2 var(--mb-font);
    --mb-type-heading: 700 22px/1.3 var(--mb-font);
    --mb-gutter: 24px;
    --mb-space-section: 64px;
  }
  .mybots .mb-bot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
    .mybots .mb-bot--auto {
      --mb-bot-avatar: 96px;
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
      padding: 20px;
      min-block-size: 0;
      border: 1px solid var(--mb-line);
      border-radius: var(--mb-radius-card);
      background: var(--mb-group);
      transition: background var(--mb-duration-fast) var(--mb-ease);
    }
    .mybots .mb-bot--auto .mb-bot__desc {
      display: block;
    }
    .mybots .mb-bot--auto .mb-chevron {
      position: absolute;
      inset-block-start: 20px;
      inset-inline-end: 16px;
    }
    .mybots .mb-bot--auto:hover {
      background: var(--mb-surface);
    }
}
@container mb (min-width: 1200px) {
  :where(.mybots *) {
    --mb-type-display: 800 44px/1.18 var(--mb-font);
    --mb-type-title: 800 32px/1.2 var(--mb-font);
    --mb-type-heading: 700 24px/1.3 var(--mb-font);
    --mb-type-lead: 18px;
    --mb-gutter: 40px;
    --mb-space-section: 80px;
  }
  .mybots .mb-bot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .mybots *,
  .mybots *::before,
  .mybots *::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
    scroll-behavior: auto !important;
  }
  .mybots .mb-capsule[aria-busy="true"]::before {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.6;
  }
}
@media (forced-colors: active) {
  .mybots .mb-toggle {
    border: 1px solid CanvasText;
  }
  .mybots .mb-select-card[aria-pressed="true"],
  .mybots .mb-select-card[aria-checked="true"] {
    outline: 2px solid Highlight;
  }
}
/* ==========================================================================
   DEPRECATED v1.1.0 aliases — do not use in new markup.
   They keep unmigrated pages (home.css, catalog.css, admin.css and their templates)
   working until redesign Tasks 2–4 rewrite them, then this whole section is deleted.
   Unmigrated templates pin data-theme="light", so these light-only values never meet
   dark tokens. Mapping: tokens.json → migration.deprecatedAliases.
   ========================================================================== */
.mybots {
  /* Podia palette (1.1.0 values) */
  --mb-lavender: #c2a0e5;
  --mb-lavender-soft: #e6d5f5;
  --mb-orange: #dd8b40;
  --mb-peach: #f6dec2;
  --mb-sky: #94bdcd;
  --mb-sky-soft: #dae9ee;
  --mb-brown: #3c211d;
  --mb-midnight: #102c37;
  --mb-purple: #241139;
  --mb-art-sky: #a0c4d4;
  --mb-art-lavender: #c9abe9;
  --mb-radius-panel: 17px;
}
/* .mb-button → .mb-capsule (pale accent tint, ink label) */
.mybots .mb-button {
  min-height: var(--mb-target-min);
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--mb-capsule);
  color: var(--mb-accent-ink);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-pill);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--mb-shadow-capsule);
  transition: background var(--mb-duration-fast) var(--mb-ease);
}
.mybots .mb-button:hover:not(:disabled) {
  background: var(--mb-capsule-hover);
}
/* .mb-button.secondary → .mb-capsule--quiet */
.mybots .mb-button.secondary {
  background: var(--mb-glass);
  color: var(--mb-ink);
  box-shadow: var(--mb-shadow-soft);
}
.mybots .mb-button.secondary:hover:not(:disabled) {
  background: var(--mb-surface);
}
.mybots .mb-button:disabled {
  background: var(--mb-fill);
  color: var(--mb-muted);
  box-shadow: none;
  cursor: not-allowed;
}
.mybots .mb-button[aria-busy="true"] {
  cursor: progress;
}
/* .mb-chip → .mb-segmented button / filter pill */
.mybots .mb-chip {
  min-height: var(--mb-target-min);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-pill);
  padding: 8px 16px;
  color: var(--mb-ink);
  background: var(--mb-fill);
  cursor: pointer;
}
.mybots .mb-chip[aria-pressed="true"] {
  background: var(--mb-accent-select);
  color: var(--mb-accent);
  border-color: var(--mb-accent-fill);
  font-weight: 600;
}
.mybots .mb-chip:hover:not(:disabled) {
  background: var(--mb-surface);
}
.mybots .mb-chip:disabled {
  color: var(--mb-muted);
  cursor: not-allowed;
}
/* .mb-card / .mb-panel / .mb-prompt → .mb-group */
.mybots .mb-card {
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-card);
  background: var(--mb-group);
  overflow: hidden;
}
.mybots .mb-panel {
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-card);
  padding: 24px;
  background: var(--mb-group);
}
.mybots .mb-prompt {
  margin: 0;
  padding: 16px;
  border-radius: var(--mb-radius-select);
  background: var(--mb-fill);
}
/* v1 type helpers → .mb-title / .mb-heading */
.mybots .mb-page-title {
  font: var(--mb-type-title);
  letter-spacing: -0.022em;
  word-break: keep-all;
}
.mybots .mb-subheading {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.mybots .mb-body {
  font-size: 16px;
  line-height: 1.55;
}
.mybots .mb-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.mybots .mb-muted {
  color: var(--mb-muted);
}
/* .mb-notice.success/.warning/.error → .mb-notice--success/--soon/--error */
.mybots .mb-notice.success {
  background: var(--mb-success-soft);
}
.mybots .mb-notice.warning {
  background: var(--mb-warning-soft);
}
.mybots .mb-notice.error {
  background: var(--mb-danger-soft);
}
/* v1 layout helpers */
.mybots .mb-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.mybots .mb-stack {
  display: grid;
  gap: 16px;
}
.mybots .mb-component-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.mybots .mb-component-list li {
  padding: 12px 16px;
  background: var(--mb-fill);
  border-radius: var(--mb-radius-control);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mybots .mb-steps {
  padding-left: 24px;
  display: grid;
  gap: 12px;
}
.mybots .mb-faq {
  border-bottom: 1px solid var(--mb-line);
  padding: 16px 0;
}
.mybots .mb-faq summary {
  cursor: pointer;
  min-height: var(--mb-target-min);
  display: flex;
  align-items: center;
  font-weight: 600;
}
.mybots .mb-faq summary::after {
  content: "+";
  margin-left: auto;
}
.mybots .mb-faq[open] summary::after {
  content: "−";
}
.mybots .mb-faq p {
  margin: 8px 0 0;
  color: var(--mb-muted);
}
