/* فصل «سالن مطالعه» (team-preview): اتاق زنده با تایمر، و چهار قابلیت تازه (شعله، همراه،
   برنامه، گزارش). کرکترها همان SVGهای خود اپ‌اند (lib/pet/art.ts) و حرکتشان از pet-art.css. */
:root { --ease-soft: cubic-bezier(.65, 0, .35, 1); }

.study {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 60% at 85% 0%, rgba(56, 219, 255, .28) 0%, rgba(56, 219, 255, 0) 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(124, 92, 255, .32) 0%, rgba(124, 92, 255, 0) 65%),
    linear-gradient(180deg, #0A2350 0%, #06173A 100%);
}
/* a few quiet stars behind the night room */
.study::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 78% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 62% 30%, #BDEBFF 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 30% 42%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 90% 55%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 8% 70%, #BDEBFF 50%, transparent 51%);
}
.study > * { position: relative; }
.study .kick { background: #fff; color: #06173A; }
.study .h2 { color: #fff; }
.study .hl::after { background: #38DBFF; opacity: .5; }
.study .lead { color: rgba(226, 240, 255, .82); }

/* ── the live room ── */
.room {
  margin-top: 20px; padding: 14px; border-radius: 28px; color: var(--ink);
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F8FF 100%);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .5), 0 0 60px -10px rgba(56, 219, 255, .35);
}
.room__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.room__name { font-size: 13.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room__live {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
  background: #E8F8EF; color: #0F7A55; font-size: 12px; font-weight: 900;
}
.room__live i { width: 8px; height: 8px; border-radius: 99px; background: #12B886; box-shadow: 0 0 0 0 rgba(18, 184, 134, .5); animation: roomLive 1.8s ease-out infinite; }
@keyframes roomLive { 70% { box-shadow: 0 0 0 7px rgba(18, 184, 134, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 184, 134, 0); } }
.room__scene {
  margin: 10px -4px 0; padding: 6px 4px 0; border-radius: 22px;
  background: radial-gradient(80% 90% at 50% 100%, #E1F3FF 0%, rgba(225, 243, 255, 0) 70%);
}
.room__scene .ill { max-width: 360px; margin: 0 auto; }
.room__timer {
  margin-top: 6px; padding: 12px 14px 14px; border-radius: 20px; background: #06173A; color: #fff;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; gap: 8px 12px;
}
.room__phase { justify-self: start; height: 26px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; background: rgba(56, 219, 255, .16); color: #7DE3FF; font-size: 12px; font-weight: 900; }
.room__clock { justify-self: end; direction: ltr; font-size: 34px; font-weight: 900; line-height: 1; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.room__track { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.room__track i { display: block; height: 100%; width: 4%; border-radius: 99px; background: linear-gradient(90deg, #38DBFF, #0EA5E9); transition: width 1s linear; }
.room__chips { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.room__chips span {
  height: 32px; padding: 0 11px; border-radius: 12px; display: inline-flex; align-items: center;
  background: #EAF6FD; color: #0369A1; font-size: 12px; font-weight: 900; white-space: nowrap;
}

/* ── four features: a snap row on phones ── */
.feats {
  margin: 18px calc(var(--gut) * -1) 0; padding: 4px var(--gut) 8px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 300px); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.feats::-webkit-scrollbar { display: none; }
.feat {
  scroll-snap-align: center; min-width: 0; padding: 16px 16px 14px; border-radius: 24px; color: var(--ink);
  display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(165deg, var(--f1) 0%, #FFFFFF 70%);
  box-shadow: 0 18px 36px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .6);
}
.feat h3 { margin: 6px 0 0; font-size: 17px; font-weight: 900; line-height: 1.5; }
.feat p { margin: 0; flex: 1; font-size: 13px; line-height: 1.85; color: var(--sub); }
.feat__chip {
  align-self: flex-start; margin-top: 6px; height: 30px; padding: 0 11px; border-radius: 12px;
  display: inline-flex; align-items: center; background: var(--f2); color: var(--fi); font-size: 12px; font-weight: 900; white-space: nowrap;
}
.feat__art { height: 86px; display: flex; align-items: flex-end; }
.feat__art--flame .ill { width: 64px; height: 80px; filter: drop-shadow(0 8px 14px rgba(124, 58, 237, .35)); }
.feat__pets { gap: 0; }
.feat__pets .ill { width: 58px; height: 58px; margin-inline-start: -10px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 3px #fff, 0 8px 16px -8px rgba(9, 45, 72, .35); }
.feat__pets .ill:first-child { margin-inline-start: 0; }
.feat__pets .ill:last-child { width: 70px; height: 70px; }
.feat__week { flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 6px; width: 100%; }
.wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wk i { height: 24px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 900; color: var(--mut); background: rgba(255, 255, 255, .8); }
.wk i.ok { background: #DDF3E8; color: #0F7A55; }
.wk i.now { background: #0369A1; color: #fff; }
.wk-task { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: 10px; background: #fff; font-size: 12px; font-weight: 800; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.wk-task i { width: 14px; height: 14px; border-radius: 99px; box-shadow: inset 0 0 0 2px #7DD3FC; }
.wk-task--done { color: var(--mut); text-decoration: line-through; }
.wk-task--done i { background: #12B886; box-shadow: none; }
.feat__bars { align-items: flex-end; gap: 7px; padding-bottom: 2px; }
.feat__bars i { width: 16px; height: var(--h); border-radius: 6px 6px 3px 3px; background: #A7E3C6; transform-origin: bottom; }
.feat__bars i.top { background: linear-gradient(180deg, #34D399, #0F9D6E); }
.feat.on .feat__bars i, [data-in].on .feat__bars i { animation: barUp .8s var(--ease-spring) both; }
.feat__bars i:nth-child(2) { animation-delay: .05s; } .feat__bars i:nth-child(3) { animation-delay: .1s; }
.feat__bars i:nth-child(4) { animation-delay: .15s; } .feat__bars i:nth-child(5) { animation-delay: .2s; }
.feat__bars i:nth-child(6) { animation-delay: .25s; } .feat__bars i:nth-child(7) { animation-delay: .3s; }
@keyframes barUp { from { transform: scaleY(.15); } }

@media (min-width: 560px) {
  .feats { margin-inline: 0; padding-inline: 0; grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
}

/* ── price card: four plans, coins under the price ── */
.tog.tog--4 { grid-template-columns: repeat(4, 1fr); }
.tog.tog--4 button { font-size: 12px; }
.tog.tog--4 i { width: calc(25% - 2px); }
.tog.tog--4.i1 i { transform: translateX(-100%); }
.tog.tog--4.i2 i { transform: translateX(-200%); }
.tog.tog--4.i3 i { transform: translateX(-300%); }
.coins-line { position: relative; z-index: 1; margin: 6px 0 0; font-size: 13.5px; font-weight: 800; color: rgba(255, 255, 255, .78); }
.coins-line b { color: var(--sun); font-weight: 900; }

@media (prefers-reduced-motion: reduce) {
  .room__live i, .feat__bars i { animation: none !important; }
}

/* Coin plans cost up to seven digits: the price gets its own line, the struck price and the
   discount sit together under it (they used to wrap one by one). */
.price b, .price small { order: 0; }
.price::after { content: ""; order: 1; flex-basis: 100%; height: 0; }
.price s { order: 2; padding-bottom: 0; align-self: center; }
.price .off { order: 3; margin-inline-start: 0; }
