/* ============================================================
   Sunwin Yectos - mobile display layer
   File   : css/mobile-f7db79-display.css
   Prefix : shellf7db7- (every class + CSS variable)
   Canvas : 320-430px phone frame, centered on wide screens
   Palette: #333333 base / #B0E0E6 text / #87CEFA accent
   Voice  : geometric headings, stroke-led corners, grouped
            cover cards, restrained fade-in, compact CTA pairs
   ============================================================ */

:root {
  --shellf7db7-ink: #333333;
  --shellf7db7-ink-deep: #232323;
  --shellf7db7-ink-raise: #3d3d3d;
  --shellf7db7-ink-card: #2e2e2e;
  --shellf7db7-mist: #b0e0e6;
  --shellf7db7-sky: #87cefa;
  --shellf7db7-sky-deep: #5da8d8;
  --shellf7db7-ink-on-sky: #1d2b33;
  --shellf7db7-line: rgba(176, 224, 230, 0.22);
  --shellf7db7-line-strong: rgba(135, 206, 250, 0.5);
  --shellf7db7-head-font: 'Chakra Petch', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --shellf7db7-body-font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --shellf7db7-r: 8px;
  --shellf7db7-r-lg: 12px;
  --shellf7db7-top-h: 56px;
  --shellf7db7-rail-h: 62px;
  --shellf7db7-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.shellf7db7-body {
  margin: 0;
  background: var(--shellf7db7-ink-deep);
  color: var(--shellf7db7-mist);
  font-family: var(--shellf7db7-body-font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

a { color: var(--shellf7db7-sky); text-decoration: none; }
a:hover,
a:focus-visible { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--shellf7db7-sky);
  outline-offset: 2px;
}

.shellf7db7-locked { overflow: hidden; }

/* Phone frame ------------------------------------------------ */
.shellf7db7-stage {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--shellf7db7-ink);
  box-shadow: var(--shellf7db7-shadow);
}

@media (min-width: 430px) {
  .shellf7db7-stage {
    border-left: 1px solid var(--shellf7db7-line);
    border-right: 1px solid var(--shellf7db7-line);
  }
}

/* Skip link --------------------------------------------------- */
.shellf7db7-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--shellf7db7-sky);
  color: var(--shellf7db7-ink-on-sky);
  padding: 10px 16px;
  border-radius: 0 0 var(--shellf7db7-r) 0;
  font-weight: 700;
  font-size: 13px;
}
.shellf7db7-skip:focus {
  left: 0;
  text-decoration: none;
}

/* Top bar (tab style) ---------------------------------------- */
.shellf7db7-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 430px;
  height: var(--shellf7db7-top-h);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: rgba(35, 35, 35, 0.97);
  border-bottom: 1px solid var(--shellf7db7-line-strong);
}

.shellf7db7-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  min-width: 0;
}

.shellf7db7-brand-img {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: var(--shellf7db7-r);
  border: 1px solid var(--shellf7db7-line-strong);
  background: var(--shellf7db7-ink-card);
}

.shellf7db7-brand-name {
  font-family: var(--shellf7db7-head-font);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.4px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shellf7db7-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

/* Compact dual CTA pair --------------------------------------- */
.shellf7db7-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: var(--shellf7db7-r);
  font-family: var(--shellf7db7-head-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid var(--shellf7db7-sky);
  transition: transform 0.16s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}
.shellf7db7-btn:active { transform: translateY(-2px); }

.shellf7db7-btn-solid {
  background: var(--shellf7db7-sky);
  color: var(--shellf7db7-ink-on-sky);
}
.shellf7db7-btn-solid:hover {
  background: #a5dbff;
  color: var(--shellf7db7-ink-on-sky);
  text-decoration: none;
}

.shellf7db7-btn-ghost {
  background: transparent;
  color: var(--shellf7db7-sky);
}
.shellf7db7-btn-ghost:hover {
  background: rgba(135, 206, 250, 0.12);
  text-decoration: none;
}

.shellf7db7-burger {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--shellf7db7-line-strong);
  border-radius: var(--shellf7db7-r);
  background: transparent;
  color: var(--shellf7db7-mist);
  transition: transform 0.16s ease, border-color 0.2s ease;
}
.shellf7db7-burger:active {
  transform: translateY(-2px);
  border-color: var(--shellf7db7-sky);
  color: var(--shellf7db7-sky);
}
.shellf7db7-burger svg { width: 20px; height: 20px; display: block; }

/* Full-height menu layer -------------------------------------- */
.shellf7db7-curtain {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 430px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  background: #262626;
  border-left: 1px solid var(--shellf7db7-line);
  border-right: 1px solid var(--shellf7db7-line);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s ease;
}
.shellf7db7-curtain-show {
  transform: translateX(0);
  visibility: visible;
}

.shellf7db7-curtain-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--shellf7db7-line);
}
.shellf7db7-curtain-head img {
  width: 34px;
  height: 34px;
  border-radius: var(--shellf7db7-r);
  border: 1px solid var(--shellf7db7-line-strong);
  object-fit: cover;
}
.shellf7db7-curtain-title {
  font-family: var(--shellf7db7-head-font);
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
  margin-right: auto;
}
.shellf7db7-curtain-shut {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--shellf7db7-line-strong);
  border-radius: var(--shellf7db7-r);
  background: transparent;
  color: var(--shellf7db7-mist);
}
.shellf7db7-curtain-shut svg { width: 18px; height: 18px; display: block; }
.shellf7db7-curtain-shut:active { color: var(--shellf7db7-sky); }

.shellf7db7-curtain-rail {
  list-style: none;
  margin: 0;
  padding: 10px 12px 16px;
  overflow-y: auto;
  flex: 1;
}
.shellf7db7-curtain-rail li { margin: 4px 0; }

.shellf7db7-curtain-rail a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--shellf7db7-line);
  border-radius: var(--shellf7db7-r);
  color: var(--shellf7db7-mist);
  font-size: 14.5px;
}
.shellf7db7-curtain-rail a::after {
  content: '\203A';
  color: var(--shellf7db7-sky);
  font-size: 18px;
  line-height: 1;
}
.shellf7db7-curtain-rail a:hover {
  border-color: var(--shellf7db7-sky);
  text-decoration: none;
  color: var(--shellf7db7-sky);
}
/* Active page: contrast inversion */
.shellf7db7-curtain-rail a.shellf7db7-on {
  background: var(--shellf7db7-sky);
  border-color: var(--shellf7db7-sky);
  color: var(--shellf7db7-ink-on-sky);
  font-weight: 700;
}
.shellf7db7-curtain-rail a.shellf7db7-on::after { color: var(--shellf7db7-ink-on-sky); }

.shellf7db7-curtain-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--shellf7db7-line);
}
.shellf7db7-curtain-cta .shellf7db7-btn { min-height: 46px; font-size: 14px; }

/* Main page column -------------------------------------------- */
.shellf7db7-page {
  padding: calc(var(--shellf7db7-top-h) + 10px) 12px
    calc(var(--shellf7db7-rail-h) + 30px);
}

/* Hero carousel ------------------------------------------------ */
.shellf7db7-hero { margin: 2px 0 14px; }

.shellf7db7-hero-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 430 / 232;
  overflow: hidden;
  border-radius: var(--shellf7db7-r-lg);
  border: 1px solid var(--shellf7db7-line-strong);
  background: var(--shellf7db7-ink-card);
}

.shellf7db7-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  opacity: 0;
  transition: opacity 0.55s ease;
}
.shellf7db7-hero-live {
  opacity: 1;
  z-index: 1;
}
.shellf7db7-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shellf7db7-hero-dots {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: -4px;
}
.shellf7db7-dot {
  position: relative;
  width: 44px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
}
.shellf7db7-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 7px;
  border-radius: 4px;
  border: 1px solid var(--shellf7db7-line-strong);
  background: rgba(176, 224, 230, 0.25);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.shellf7db7-dot-on::after {
  background: var(--shellf7db7-sky);
  border-color: var(--shellf7db7-sky);
}

/* Lead block ---------------------------------------------------- */
.shellf7db7-lead h1 {
  font-family: var(--shellf7db7-head-font);
  font-size: 21px;
  line-height: 1.32;
  letter-spacing: 0.2px;
  color: #ffffff;
  margin: 8px 0 10px;
}
.shellf7db7-lead p { margin: 0 0 6px; }

.shellf7db7-lead-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 10px;
}
.shellf7db7-lead-cta .shellf7db7-btn { min-height: 46px; font-size: 14px; }

.shellf7db7-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 6px;
}
.shellf7db7-chip {
  border: 1px solid var(--shellf7db7-line);
  border-radius: var(--shellf7db7-r);
  padding: 8px 6px;
  text-align: center;
  background: var(--shellf7db7-ink-card);
}
.shellf7db7-chip b {
  display: block;
  font-family: var(--shellf7db7-head-font);
  font-size: 16px;
  color: var(--shellf7db7-sky);
  line-height: 1.2;
}
.shellf7db7-chip span {
  display: block;
  font-size: 11.5px;
  color: var(--shellf7db7-mist);
  opacity: 0.85;
}

/* Arena headings ------------------------------------------------ */
.shellf7db7-arena > h2,
.shellf7db7-readzone > h2,
.shellf7db7-ext-title {
  font-family: var(--shellf7db7-head-font);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0.2px;
  color: #ffffff;
  margin: 26px 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--shellf7db7-sky);
}
.shellf7db7-ext-title { margin-top: 0; }

.shellf7db7-arena > p,
.shellf7db7-readzone > p { font-size: 14px; }

/* Grouped cover cards (game cohorts) ---------------------------- */
.shellf7db7-cohort {
  margin: 16px 0 20px;
  padding: 10px 9px 12px;
  border: 1px solid var(--shellf7db7-line);
  border-radius: var(--shellf7db7-r-lg);
  background: var(--shellf7db7-ink-raise);
}

.shellf7db7-cohort-cap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 2px 2px 10px;
  font-family: var(--shellf7db7-head-font);
  font-size: 15px;
  color: #ffffff;
}
.shellf7db7-cohort-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--shellf7db7-ink-on-sky);
  background: var(--shellf7db7-sky);
  border-radius: 4px;
  padding: 2px 7px;
}
.shellf7db7-cohort-lead {
  flex: 1 1 auto;
  font-family: var(--shellf7db7-body-font);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--shellf7db7-mist);
  opacity: 0.8;
}
.shellf7db7-cohort-count {
  font-size: 11px;
  font-weight: 400;
  color: var(--shellf7db7-mist);
  opacity: 0.65;
  border: 1px solid var(--shellf7db7-line);
  border-radius: 4px;
  padding: 1px 6px;
}

.shellf7db7-cohort-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px 6px;
}
@media (min-width: 375px) {
  .shellf7db7-cohort-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 430px) {
  .shellf7db7-cohort-grid { gap: 11px 9px; }
}

.shellf7db7-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 6px 4px 7px;
  background: var(--shellf7db7-ink-card);
  border: 1px solid var(--shellf7db7-line);
  border-radius: var(--shellf7db7-r);
  transition: transform 0.16s ease, border-color 0.2s ease;
}
.shellf7db7-tile:hover,
.shellf7db7-tile:active {
  transform: translateY(-3px);
  border-color: var(--shellf7db7-sky);
}
.shellf7db7-tile-img {
  width: 100%;
  max-width: 78px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--shellf7db7-line);
  background: #242424;
}
.shellf7db7-tile-name {
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  color: var(--shellf7db7-mist);
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
@media (min-width: 430px) {
  .shellf7db7-tile-name { font-size: 11.5px; }
}

/* Category highlight rows --------------------------------------- */
.shellf7db7-pick {
  display: grid;
  gap: 10px;
  margin: 10px 0 4px;
}
.shellf7db7-pick-row {
  padding: 10px 12px;
  background: var(--shellf7db7-ink-card);
  border: 1px solid var(--shellf7db7-line);
  border-left: 3px solid var(--shellf7db7-sky);
  border-radius: var(--shellf7db7-r);
}
.shellf7db7-pick-row h3 {
  font-family: var(--shellf7db7-head-font);
  font-size: 14.5px;
  color: #ffffff;
  margin: 0 0 5px;
}
.shellf7db7-pick-row p {
  margin: 0;
  font-size: 13px;
}

/* Step list (mobile access) -------------------------------------- */
.shellf7db7-steps {
  list-style: none;
  counter-reset: shellf7db7-step;
  margin: 10px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.shellf7db7-steps li {
  counter-increment: shellf7db7-step;
  position: relative;
  padding: 10px 10px 10px 46px;
  border: 1px solid var(--shellf7db7-line);
  border-radius: var(--shellf7db7-r);
  background: var(--shellf7db7-ink-card);
  font-size: 13.5px;
}
.shellf7db7-steps li::before {
  content: counter(shellf7db7-step, decimal-leading-zero);
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--shellf7db7-head-font);
  font-weight: 700;
  font-size: 15px;
  color: var(--shellf7db7-sky);
}
.shellf7db7-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px dashed var(--shellf7db7-line-strong);
  border-radius: var(--shellf7db7-r);
  background: rgba(135, 206, 250, 0.05);
  font-size: 12.5px;
}

/* Term dictionary ------------------------------------------------ */
.shellf7db7-terms {
  margin: 10px 0 4px;
  display: grid;
  gap: 9px;
}
.shellf7db7-terms dt {
  font-family: var(--shellf7db7-head-font);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--shellf7db7-sky);
}
.shellf7db7-terms dd {
  margin: 3px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--shellf7db7-line);
  border-radius: var(--shellf7db7-r);
  background: var(--shellf7db7-ink-card);
  font-size: 13px;
}

/* Direct-answer cards -------------------------------------------- */
.shellf7db7-qa {
  display: grid;
  gap: 10px;
  margin: 10px 0 4px;
}
.shellf7db7-qa-item {
  padding: 11px 12px;
  border: 1px dashed var(--shellf7db7-line-strong);
  border-radius: var(--shellf7db7-r-lg);
  background: rgba(135, 206, 250, 0.05);
}
.shellf7db7-qa-item h3 {
  font-family: var(--shellf7db7-head-font);
  font-size: 14px;
  color: #ffffff;
  margin: 0 0 5px;
}
.shellf7db7-qa-item p {
  margin: 0;
  font-size: 13px;
}
.shellf7db7-qa-item strong { color: var(--shellf7db7-sky); }

/* Extended footer block ------------------------------------------- */
.shellf7db7-extension {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--shellf7db7-line-strong);
  display: grid;
  gap: 14px;
}
.shellf7db7-ext-brand p {
  margin: 6px 0 0;
  font-size: 13px;
}

.shellf7db7-ext-dir {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.shellf7db7-ext-dir a {
  display: block;
  padding: 8px 9px;
  border: 1px solid var(--shellf7db7-line);
  border-radius: 6px;
  font-size: 12px;
  color: var(--shellf7db7-mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.shellf7db7-ext-dir a:hover {
  border-color: var(--shellf7db7-sky);
  color: var(--shellf7db7-sky);
  text-decoration: none;
}

.shellf7db7-ext-promo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.shellf7db7-ext-promo button {
  min-height: 46px;
  padding: 0 4px;
  border: 1px solid var(--shellf7db7-line-strong);
  border-radius: var(--shellf7db7-r);
  background: linear-gradient(180deg, rgba(135, 206, 250, 0.16), rgba(135, 206, 250, 0.04));
  color: var(--shellf7db7-mist);
  font-family: var(--shellf7db7-head-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, border-color 0.2s ease, color 0.2s ease;
}
.shellf7db7-ext-promo button:active {
  transform: translateY(-2px);
  border-color: var(--shellf7db7-sky);
  color: var(--shellf7db7-sky);
}

.shellf7db7-ext-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  opacity: 0.75;
}

/* Common footer --------------------------------------------------- */
.shellf7db7-foot {
  padding: 4px 12px 8px;
  text-align: center;
  font-size: 11.5px;
  opacity: 0.7;
}
.shellf7db7-foot-copy { margin: 0; }

/* Fixed bottom rail (5 roles) -------------------------------------- */
.shellf7db7-rail {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 430px;
  min-height: var(--shellf7db7-rail-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(30, 30, 30, 0.97);
  border-top: 1px solid var(--shellf7db7-line-strong);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 100;
}
.shellf7db7-rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--shellf7db7-rail-h);
  min-width: 44px;
  padding: 6px 2px;
  background: none;
  border: 0;
  color: var(--shellf7db7-mist);
  font-size: 10.5px;
  line-height: 1.2;
  transition: transform 0.15s ease, color 0.2s ease;
}
.shellf7db7-rail-item:active {
  transform: translateY(-3px);
  color: var(--shellf7db7-sky);
}
.shellf7db7-rail-item:hover { text-decoration: none; color: var(--shellf7db7-sky); }
.shellf7db7-rail-ico {
  width: 20px;
  height: 20px;
  display: block;
}
.shellf7db7-rail-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}
/* Active role: contrast inversion + short lift */
.shellf7db7-rail-on {
  background: var(--shellf7db7-sky);
  color: var(--shellf7db7-ink-on-sky);
  font-weight: 700;
  border-radius: 10px 10px 0 0;
}
.shellf7db7-rail-on:hover { color: var(--shellf7db7-ink-on-sky); }
.shellf7db7-rail-on:active { transform: translateY(-2px); }

/* Restrained reveal feedback (only when JS is alive) ---------------- */
.shellf7db7-js .shellf7db7-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.shellf7db7-js .shellf7db7-reveal.shellf7db7-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .shellf7db7-js .shellf7db7-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .shellf7db7-btn,
  .shellf7db7-tile,
  .shellf7db7-rail-item,
  .shellf7db7-burger,
  .shellf7db7-ext-promo button,
  .shellf7db7-curtain {
    transition: none;
  }
}
