/* Livecode24 tick-and-total pack selector. Light + dark. */
.lc-sel { margin: 12px 0 0; }
.lc-sel-opts { display: grid; gap: 10px; }
.lc-sel-opt {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  padding: 14px 14px 14px 12px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  color: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.lc-sel-opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.lc-sel-check {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: transparent;
  position: relative;
}
.lc-sel-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 10px;
  border: solid transparent;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.lc-sel-opt:has(input:checked),
.lc-sel-opt.is-on {
  border-color: var(--yellow);
  background: color-mix(in srgb, var(--yellow) 16%, var(--card));
  box-shadow: 0 0 0 1px var(--yellow);
}
.lc-sel-opt:has(input:checked) .lc-sel-check,
.lc-sel-opt.is-on .lc-sel-check {
  background: var(--yellow);
  border-color: var(--yellow);
}
.lc-sel-opt:has(input:checked) .lc-sel-check::after,
.lc-sel-opt.is-on .lc-sel-check::after {
  border-color: #1b1240;
}
.lc-sel-opt:focus-within {
  outline: 3px solid color-mix(in srgb, var(--yellow) 70%, transparent);
  outline-offset: 2px;
}
.lc-sel-opt.is-hot { border-color: var(--yellow); }
.lc-sel-body { min-width: 0; flex: 1; display: block; }
.lc-sel-title {
  display: block;
  font-family: var(--hfont);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
}
.lc-sel-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.4;
}
.lc-sel-opt .badge,
.lc-sel-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--red);
  color: #fff;
  font-family: var(--hfont);
  font-weight: 600;
  font-size: 11px;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
}
.lc-sel-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0 0;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--yellow) 22%, var(--bg-2, var(--bg)));
  border-radius: 14px;
  font-weight: 600;
}
.lc-sel-total b {
  font-family: var(--hfont);
  font-weight: 600;
  font-size: 1.55rem;
  color: var(--gold-text, var(--yellow));
  line-height: 1;
}
.lc-sel-play { margin: 10px 0 0; font-size: .92rem; font-weight: 600; }
.lc-sel-play a { color: var(--gold-text, var(--yellow)); text-decoration: underline; }
.lc-sel-owned {
  margin: 8px 0 0;
  padding: 14px 16px;
  background: var(--card);
  border: 2px solid var(--yellow);
  border-radius: 16px;
  font-weight: 600;
}
.lc-sel-owned a { color: var(--gold-text, var(--yellow)); text-decoration: underline; }

/* Homepage /buy/ plan cards as radios — keep existing .plan look, drop per-card buy buttons */
.sale-plans.lc-sel,
.plans.lc-sel { cursor: default; }
label.plan.lc-sel-opt {
  padding: 26px 22px;
  border-width: 3px;
  border-radius: 22px;
  flex-direction: column;
  gap: 0;
  display: flex;
}
label.plan.lc-sel-opt .lc-sel-check { position: absolute; top: 18px; left: 16px; margin: 0; }
label.plan.lc-sel-opt { padding-left: 48px; }
label.plan.lc-sel-opt:has(input:checked),
label.plan.lc-sel-opt.is-on {
  border-color: var(--yellow);
  box-shadow: 0 0 0 1px var(--yellow), 0 10px 30px rgba(27,18,64,.12);
}
.sale .lc-sel-total { max-width: 640px; margin-left: auto; margin-right: auto; }

/* Sticky checkout bar */
.lc-sel-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: var(--bg-2, var(--card));
  border-top: 3px solid var(--yellow);
  box-shadow: 0 -8px 28px rgba(0,0,0,.18);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
}
.lc-sel-sticky[hidden] { display: none !important; }
.lc-sel-sticky-in {
  max-width: var(--wrap, 1600px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.lc-sel-sticky-info {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.lc-sel-sticky-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-sel-sticky-amt {
  font-family: var(--hfont);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--gold-text, var(--yellow));
}
.lc-sel-sticky .lc-sel-go {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 11px 16px;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: 0 4px 0 #c99a00;
}
body.has-lc-sel-sticky { padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px)); }
/* Raise chat fab above the sticky so it never covers the buy button */
body.has-lc-sel-sticky .lc-chat {
  bottom: calc(168px + 10px + env(safe-area-inset-bottom, 0px));
}
.lc-sel-sticky-in {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.lc-sel-sticky-plans {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lc-sel-sticky-plan {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding: 7px 8px;
  border: 2px solid var(--line, #e6e1d6);
  border-radius: 12px;
  background: var(--card, #fff);
  color: inherit;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lc-sel-sticky-plan.is-on {
  border-color: var(--yellow);
  background: color-mix(in srgb, var(--yellow) 18%, var(--card, #fff));
  box-shadow: 0 0 0 1px var(--yellow);
}
.lc-sel-sticky-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
@media (min-width: 900px) {
  .lc-sel-sticky-in { flex-direction: row; align-items: center; gap: 14px; }
  .lc-sel-sticky-plans { flex: 1 1 auto; flex-wrap: nowrap; }
  .lc-sel-sticky-plan { font-size: 12.5px; padding: 8px 10px; }
  .lc-sel-sticky-row { flex: 0 0 auto; }
  body.has-lc-sel-sticky { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
  body.has-lc-sel-sticky .lc-chat { bottom: calc(120px + 10px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 420px) {
  .lc-sel-sticky-plan { font-size: 11px; padding: 6px 7px; }
}
[data-theme="light"] .lc-sel-sticky-plan.is-on { background: #fff8d4; }
[data-theme="dark"] .lc-sel-sticky-plan.is-on { background: rgba(255, 210, 63, .14); }


[data-theme="light"] .lc-sel-opt:has(input:checked),
[data-theme="light"] .lc-sel-opt.is-on {
  background: #fff8d4;
}
[data-theme="light"] .lc-sel-total { background: #fff4c2; }
[data-theme="light"] .lc-sel-sticky { background: rgba(255,252,245,.96); }
[data-theme="dark"] .lc-sel-opt:has(input:checked),
[data-theme="dark"] .lc-sel-opt.is-on {
  background: rgba(255, 210, 63, .14);
}
[data-theme="dark"] .lc-sel-total { background: rgba(255, 210, 63, .16); }
[data-theme="dark"] .lc-sel-sticky { background: rgba(16,13,36,.96); }
[data-theme="dark"] .lc-sel-total b,
[data-theme="dark"] .lc-sel-sticky-amt { color: var(--yellow); }

@media (max-width: 420px) {
  .lc-sel-sticky .lc-sel-go { font-size: 13.5px; padding: 10px 12px; }
  .lc-sel-title { font-size: 1rem; }
  .lc-sel-total b { font-size: 1.35rem; }
}
@media (min-width: 720px) {
  .lc-sel-opts:not(.sale-plans):not(.plans) { gap: 12px; }
  .lc-sel-sticky-in { padding: 2px 16px; }
  .lc-sel-sticky .lc-sel-go { font-size: 17px; padding: 12px 22px; }
}

/* hidden must win over display:grid / flex */
.lc-sel-opts[hidden],
.lc-sel-total[hidden],
.lc-sel-owned[hidden],
.lc-sel.is-owned .lc-sel-opts,
.lc-sel.is-owned .lc-sel-total { display: none !important; }
/* 20261121-avg1: hard-sell average price per theme */
.lc-sel-body .lc-avg {
  display: block;
  margin-top: 4px;
  font-family: var(--hfont, inherit);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--red, #ff3b3b);
  text-wrap: balance;
}
[data-theme="light"] .lc-sel-body .lc-avg { color: #c0262d; }
@media (max-width: 640px) {
  .lc-sel-body .lc-avg { font-size: 14px; }
}
