/* Child landscape experience */
.home-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 18px;
  height: 100%;
  min-height: 0;
}

.hero-panel {
  background: var(--surface-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,209,102,0.45), transparent 70%);
  pointer-events: none;
}

.greeting {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-bubble {
  width: 84px;
  height: 84px;
  border-radius: 28px;
  background: linear-gradient(160deg, #fff, #d9f0ff);
  display: grid;
  place-items: center;
  font-size: 44px;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,0.06);
}

.level-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.level-chip .lvl {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.level-chip .title {
  font-size: 14px;
  font-weight: 800;
  color: var(--purple-fun);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-pills {
  display: grid;
  gap: 10px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 6px 0 rgba(26,58,92,0.08);
  min-height: 56px;
}
.stat-pill .ico { font-size: 26px; }

.progress-block {
  margin-top: auto;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 14px;
}
.progress-block h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.progress-track {
  height: 18px;
  background: #e8f4ff;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd166, #ff8c42);
  transition: width 0.45s ease;
}
.progress-meta {
  margin-top: 8px;
  font-weight: 800;
  color: var(--text-secondary);
}

.main-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mission-card {
  position: relative;
  min-height: 170px;
  border: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-card);
  padding: 16px 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.2s ease;
  touch-action: manipulation;
}
.mission-card:active { transform: scale(0.96); }
.mission-card .m-icon {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,0.08));
}
.mission-card .m-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  line-height: 1.15;
}
.mission-card .m-reward {
  font-weight: 900;
  font-size: 18px;
  color: #c47f00;
  background: #fff4cc;
  padding: 6px 12px;
  border-radius: 999px;
}
.mission-card.completed {
  filter: saturate(0.7);
  background: linear-gradient(180deg, #e8fff0, #d7f8e3);
  cursor: pointer;
}
.mission-card.completed:not(:disabled) {
  opacity: 1;
}
.mission-card.completed::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
}
.mission-card.pending {
  background: linear-gradient(180deg, #fff8e8, #ffe8c2);
  cursor: pointer;
}
.mission-card.locked,
.mission-card:disabled {
  opacity: 0.72;
  cursor: default;
}

.bonus-banner {
  border: 0;
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  background: linear-gradient(110deg, #2b2d42, #5c4d7a 40%, #ff6b9d);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  text-align: left;
  min-height: var(--touch-min);
}
.bonus-banner .bolt { font-size: 40px; }
.bonus-banner .copy { flex: 1; }
.bonus-banner .eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 900;
  opacity: 0.85;
}
.bonus-banner .name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.treasure-cta {
  border: 0;
  border-radius: var(--radius-lg);
  min-height: 88px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #ffd166, #ff8c42);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.screen-pad { padding-bottom: 8px; }

.week-card, .reward-card, .collect-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
  border: 0;
  width: 100%;
  text-align: left;
  min-height: var(--touch-min);
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.reward-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 210px;
  cursor: pointer;
}
.reward-card .img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, #eef7ff, #ffe8f2);
  display: grid;
  place-items: center;
  font-size: 64px;
  overflow: hidden;
}
.reward-card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reward-card .name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}
.reward-card .cost {
  font-weight: 900;
  color: #c47f00;
}
.reward-card.locked { filter: grayscale(0.35); opacity: 0.85; }
.reward-card.ready {
  outline: 4px solid #ffd166;
  animation: readyPulse 1.4s ease-in-out infinite;
}
@keyframes readyPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.bank-hero {
  background: linear-gradient(160deg, #fff7d1, #ffe08a);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  align-items: center;
}
.bank-hero .pig { font-size: 96px; text-align: center; }
.bank-balance {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 700;
  margin: 8px 0;
}
.withdraw-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.withdraw-row .withdraw-label,
.bank-rate {
  grid-column: 1 / -1;
  font-weight: 700;
  opacity: 0.75;
  font-size: 16px;
}
.bank-rate { margin: 0 0 8px; }
.trade-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 4px;
  align-items: stretch;
}
.trade-row .trade-stars {
  grid-column: 1 / -1;
  font-size: 22px;
  font-weight: 900;
}
.trade-btn {
  min-height: var(--touch-min);
  border: 0;
  border-radius: var(--radius-md);
  background: #e8fff0;
  color: #0b5;
  font-weight: 900;
  font-size: 18px;
  box-shadow: var(--shadow-card);
}
.trade-btn:disabled { opacity: 0.45; }
.withdraw-row button {
  min-height: var(--touch-min);
  border: 0;
  border-radius: var(--radius-md);
  background: #fff;
  font-weight: 900;
  font-size: 22px;
  box-shadow: var(--shadow-card);
}
.savings-visual {
  margin-top: 16px;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: center;
}
.savings-visual .photo {
  width: 140px;
  height: 140px;
  border-radius: 28px;
  background: #eef7ff;
  display: grid;
  place-items: center;
  font-size: 64px;
  overflow: hidden;
}
.savings-visual .photo img { width: 100%; height: 100%; object-fit: cover; }
.fuel-tank {
  height: 28px;
  background: #e8f4ff;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.fuel-tank > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4ecb71, #ffd166);
}

.collection-cats {
  display: grid;
  gap: 18px;
}
.sticker-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.sticker {
  aspect-ratio: 1;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
  display: grid;
  place-items: center;
  font-size: 40px;
  position: relative;
}
.sticker.locked {
  background: #d9e6f2;
  color: transparent;
  text-shadow: 0 0 0 #8aa4bd;
  filter: contrast(0.2) brightness(0.85);
}
.sticker.locked::after {
  content: "?";
  color: #8aa4bd;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-secondary);
}

@media (max-width: 1100px) {
  .card-grid, .reward-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sticker-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px), (orientation: portrait) {
  .home-layout { grid-template-columns: 1fr; }
  .card-grid, .reward-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bank-hero, .savings-visual { grid-template-columns: 1fr; }
  .hero-panel { max-height: none; }
}

@media (max-width: 600px) {
  .card-grid, .reward-grid, .withdraw-row, .trade-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticker-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mission-card { min-height: 150px; }
}

.mission-card.linked {
  opacity: 0.95;
  cursor: default;
  background: linear-gradient(180deg, #f3fbff, #eaf6ff);
  border: 2px dashed #9fd0ef;
}

.mission-card.linked:disabled {
  opacity: 0.95;
}

.mission-card.repeatable {
  background: linear-gradient(180deg, #fffef5, #fff4c8);
  box-shadow: var(--shadow-card), inset 0 0 0 3px #f0c84a;
}
