/* Hodion v12.0: game-shop cards, "Hodi suggests", habit mastery, school week, rescue plan, tablet layout. */

/* ---------- shop ---------- */
#shop-list.v120-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.6rem), 1fr)); gap: 0.7rem; align-items: stretch; }
#shop-list.v120-shop-grid > .v120-shop-head { grid-column: 1 / -1; margin: 0.6rem 0 0; }
.shop-card.v120-shop {
  --kc: #3fcf8e; --kd: #0f7a55;
  position: relative; display: flex !important; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; margin: 0;
  padding: 0.6rem 0.6rem 0.7rem; border-radius: 20px; border: 3px solid var(--kc);
  background: linear-gradient(180deg, color-mix(in srgb, var(--kc) 22%, var(--surface)), var(--surface) 62%);
  box-shadow: 0 4px 0 var(--kd), 0 8px 18px rgba(0, 0, 0, 0.1);
}
.shop-card.shop-outfit { --kc: #ff8ab8; --kd: #b8346e; }
.shop-card.shop-theme { --kc: #5aa8ff; --kd: #1d5fc0; }
.shop-card.shop-decor { --kc: #3fcf8e; --kd: #0f7a55; }
.shop-card.shop-freeze { --kc: #a487ff; --kd: #5b33c4; }
.shop-card.v120-shop > * { grid-column: auto !important; }
.shop-card.v120-shop .shop-preview {
  width: 100%; height: 108px; border-radius: 14px; grid-row: auto;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--kc) 30%, #fff), color-mix(in srgb, var(--kc) 55%, var(--surface)));
}
.shop-card.v120-shop .shop-preview .mascot-svg, .shop-card.v120-shop .shop-preview > svg { height: 100%; width: auto; max-width: 100%; }
.shop-card.v120-shop .shop-preview.has-art { display: grid; place-items: center; }
.stk-item { width: 76px; height: 76px; }
.shop-card.v120-shop h3 { margin: 0.1rem 0 0; font-size: 0.95rem; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.shop-card.v120-shop p { margin: 0; }
.v120-price { display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.15rem 0.7rem; border-radius: 999px; background: #fff4c9; color: #4a3500; font-weight: 900; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); }
.shop-card.v120-shop .button { width: 100%; margin-top: auto; }
.shop-card.v120-shop:not(.can-buy):not(.is-owned) .button { opacity: 0.75; }
.v120-state { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 1; padding: 0.1rem 0.55rem; border-radius: 999px; background: #c9f5dc; color: #0b4a30; font-size: 0.72rem; font-weight: 900; }
.v120-state.is-on { background: #ffe36e; color: #3a2a00; }
.shop-card.is-on { box-shadow: 0 4px 0 var(--kd), 0 0 0 3px #ffe36e, 0 8px 18px rgba(0, 0, 0, 0.12); }

/* ---------- Hodi suggests ---------- */
.v120-advice { margin: 0 0 0.75rem; border-radius: 20px; border: 2px solid color-mix(in srgb, #35c6c9 55%, var(--line-soft)); background: linear-gradient(180deg, color-mix(in srgb, #35c6c9 14%, var(--surface)), var(--surface) 60%); box-shadow: 0 3px 0 color-mix(in srgb, #0d7480 45%, transparent); }
.v120-advice > summary { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.8rem; cursor: pointer; list-style: none; min-height: 48px; }
.v120-advice > summary::-webkit-details-marker { display: none; }
.v120-advice > summary::after { content: "\25BE"; margin-left: auto; transition: transform 200ms; }
.v120-advice[open] > summary::after { transform: rotate(180deg); }
.v120-adv-t { display: grid; }
.v120-adv-t small { color: var(--muted); font-weight: 700; }
.v120-advice.has-claim .v120-adv-t small { color: var(--ink); }
.v120-adv-body { padding: 0 0.8rem 0.8rem; display: grid; gap: 0.6rem; }
.v120-adv-body .v11-card { margin: 0; }
.v120-adv-sub { margin: 0; }
#v11-strip.v120-empty { display: none; }

/* ---------- habit mastery ---------- */
.v120-mastery { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.5rem; padding: 0.45rem 0.6rem; border-radius: 14px; background: color-mix(in srgb, var(--habit, #34c58f) 18%, var(--surface)); }
.v120-m-txt { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.v120-m-txt small { color: var(--muted); }

/* ---------- school ---------- */
.v120-days { flex-wrap: wrap; }
.v120-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.v120-time { min-width: 3.2rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.v120-subj { flex: 1; min-width: 8rem; overflow-wrap: anywhere; }
.v120-tag { color: var(--muted); }
.v120-row input[type="checkbox"] { width: 24px; height: 24px; }
.v120-form { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.v120-form input { flex: 1 1 8rem; min-height: 44px; }
.v120-form input[type="time"] { flex: 0 0 7rem; }

/* ---------- rescue ---------- */
.v120-rescue { margin: 0.4rem 0; padding: 0.6rem 0.8rem; border-radius: 14px; background: var(--accent-soft); color: var(--accent-soft-ink); }
.v120-energy { margin: 0 0 0.3rem; font-weight: 800; }
.v120-plan { margin: 0.2rem 0; padding-left: 1.3rem; }
.v120-plan .is-break { color: var(--muted); font-style: italic; }

/* ---------- invite decorations ---------- */
.v120-inv-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; text-align: center; }
.v120-inv-item { display: grid; justify-items: center; gap: 0.3rem; padding: 0.4rem; border-radius: 14px; border: 2px dashed var(--line-soft); opacity: 0.7; }
.v120-inv-item.is-got { opacity: 1; border-style: solid; border-color: #3fcf8e; }
.v120-inv-item .stk-item { width: 56px; height: 56px; }

/* ---------- notes markdown ---------- */
.note-card .md-h { margin: 0.4rem 0 0.1rem; font-size: 0.95rem; }
.note-card .md-li { margin: 0.1rem 0; padding-left: 1.1rem; position: relative; }
.note-card .md-li::before { content: "•"; position: absolute; left: 0.2rem; }
.note-card .md-num::before { content: attr(data-n); left: 0; }
.note-card .md-quote { margin: 0.3rem 0; padding-left: 0.7rem; border-left: 3px solid var(--line); color: var(--muted); }
.note-card .md-inline { display: inline; margin: 0; }

/* ---------- tablet / foldable (840 px and up) ---------- */
@media (min-width: 840px) {
  #habit-list, #note-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; align-items: start; }
  #habit-list > .pro-card, #note-list > .pro-card { margin: 0; }
  #habit-list > .habit-archive, #habit-list > .empty-state { grid-column: 1 / -1; }
  html, body { overflow-x: hidden; }
}
@media (prefers-reduced-motion: reduce) { .v120-advice > summary::after { transition: none; } }
