/* Ciyaar stability pass: keep the existing content, simplify its presentation. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}
body{min-height:100%;overflow-x:hidden;overscroll-behavior-x:none}
button,a,select,input{touch-action:manipulation}
button,select{ -webkit-appearance:none; }
button{user-select:none;-webkit-user-select:none}
select{background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 14px) 50%,calc(100% - 9px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}
.main-shell,#main,main{min-width:0}
.quick-grid{gap:18px}
.quick-card{min-height:142px;border:1px solid var(--line);box-shadow:0 8px 20px #2445530b;background:#fff!important}
.quick-card.peach{box-shadow:inset 0 4px 0 #e9a98e,0 8px 20px #2445530b}
.quick-card.lavender{box-shadow:inset 0 4px 0 #a992db,0 8px 20px #2445530b}
.quick-card.sunny{box-shadow:inset 0 4px 0 #e2b93f,0 8px 20px #2445530b}
.quick-card.sky{box-shadow:inset 0 4px 0 #76b8d6,0 8px 20px #2445530b}
.quick-card:hover{transform:none}
.journey-steps{margin-top:26px;background:transparent;box-shadow:none}
.home-clips,.world-row,.family-strip,.home-learning-strip{margin-top:42px}
.section-title{margin-top:42px}
.language-picker select{min-width:112px;cursor:pointer}
.sound-toggle,.mobile-parent,.round-audio,.book-arrow,.story-fullscreen,.story-fullscreen-control,.book-fullscreen,.book-fullscreen-control{touch-action:manipulation}
dialog[open]{overscroll-behavior:contain}

@media (min-width:701px) and (max-width:1100px){
  .sidebar{width:110px;padding-left:10px;padding-right:10px}
  .logo{justify-content:center;font-size:0;padding-bottom:34px}
  .logo>span{width:43px;height:43px}
  .logo i{display:none}
  .sidebar nav button{justify-content:center;flex-direction:column;gap:5px;padding:10px 4px;min-height:64px;text-align:center}
  .sidebar nav button>b{display:none}
  .sidebar nav button .mobile-nav-label{display:block;font-size:.7rem;line-height:1.15;white-space:normal}
  .sidebar-friend,.grownup,.sticker-link>span:last-child{display:none}
  .sticker-link{justify-content:center;margin-top:18px;padding:12px 4px}
  .main-shell{margin-left:110px;padding-left:22px;padding-right:22px}
  .adventure-hero{grid-template-columns:1fr 1.1fr;min-height:315px}
  .hero-copy{padding-left:27px;padding-right:16px}
  .hero-copy h1{font-size:clamp(2.5rem,5vw,3.5rem)}
  .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .world-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:700px){
  .sidebar{padding-bottom:max(7px,env(safe-area-inset-bottom));height:calc(76px + env(safe-area-inset-bottom))}
  .sidebar nav button .mobile-nav-label{display:none}
  .main-shell{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  .top{min-height:78px;height:auto;padding:14px 0}
  .welcome-label b{display:none}
  .language-picker select{min-width:96px;min-height:44px}
  .sound-toggle,.mobile-parent{width:44px;height:44px}
  .adventure-hero{grid-template-columns:1fr;min-height:0;border-radius:24px}
  .hero-copy{width:auto;min-height:0;padding:27px 24px 25px}
  .hero-copy h1{font-size:clamp(2.6rem,13vw,3.6rem)}
  .hero-copy>p{max-width:28ch}
  .hero-art{height:220px;order:2}
  .hero-art>img{object-position:center 48%}
  .speech-bubble{top:14px;right:14px;font-size:1rem;padding:9px 12px}
  .journey-steps{grid-template-columns:repeat(4,minmax(0,1fr));margin:22px 0 32px;padding:10px 2px;gap:2px}
  .journey-steps button{min-height:64px}
  .quick-grid{gap:12px}
  .quick-card{min-height:135px;padding:19px 16px}
  .quick-card strong{font-size:1.2rem}
  .quick-card small{font-size:.76rem}
  .section-title{margin-top:36px}
  .home-clips,.world-row,.family-strip,.home-learning-strip{margin-top:32px}
  .clip-player{margin-left:0;margin-right:0}
  .topic-toolbar{position:static}
  .story-reader,.book-reader{padding-bottom:env(safe-area-inset-bottom)}
}

@media (max-width:430px){
  .main-shell{padding-left:14px;padding-right:14px}
  .top-actions{gap:5px}
  .language-picker select{min-width:88px;padding-left:8px;padding-right:25px}
  .journey-steps button{font-size:.62rem}
  .journey-steps button .step-circle{height:34px;min-width:34px;font-size:1rem}
  .quick-card{min-height:128px;padding:17px 14px}
  .quick-icon{font-size:1.8rem;margin-bottom:12px}
  .quick-card strong{font-size:1.08rem}
}

/* Native route links: keep the existing card geometry while letting Safari handle navigation. */
.sidebar nav a{background:none;display:flex;align-items:center;gap:13px;padding:15px 15px;border-radius:15px;font-size:.9375rem;text-align:left;color:#6a7d88;min-height:56px;text-decoration:none}
.sidebar nav a>span{font-size:1.5rem;line-height:1;width:26px;text-align:center}
.sidebar nav a>b{font-weight:600}
.sidebar nav a[aria-current=page]{background:#e4f4f2;color:var(--teal)}
.sticker-link{color:inherit;text-decoration:none}
.grownup{display:block;text-decoration:none}
.quick-card{display:block;color:inherit;text-decoration:none}
.link-button{display:inline-flex;align-items:center;text-decoration:none}
.back{display:inline-block;text-decoration:none}
.story-card{display:block;color:inherit;text-decoration:none}
.section-tabs>a{display:inline-flex;align-items:center;color:inherit;text-decoration:none}
.no-danish .sidebar nav a b{font-weight:650}
#touch-debug{position:fixed;left:10px;right:10px;bottom:10px;z-index:1000;margin:0;padding:10px 12px;border-radius:10px;background:#102f3acc;color:#fff;font:12px/1.4 ui-monospace,monospace;white-space:pre-wrap;pointer-events:none}

@media (min-width:701px) and (max-width:1100px){
  .sidebar nav a{justify-content:center;flex-direction:column;gap:5px;padding:10px 4px;min-height:64px;text-align:center}
  .sidebar nav a>b{display:none}
  .sidebar nav a .mobile-nav-label{display:block;font-size:.7rem;line-height:1.15;white-space:normal}
}

@media(max-width:950px){
  .sidebar nav a b{display:none}
  .sidebar nav a .mobile-nav-label{display:block;font-size:14px;line-height:1.2}
}

@media(max-width:700px){
  .sidebar nav a .mobile-nav-label{display:none}
}

@media(max-width:360px){
  .sidebar nav a{flex:1 1 0%;min-width:0;justify-content:center;gap:0;padding:8px 0;min-height:58px;border-radius:12px}
  .sidebar nav a>span{width:auto;font-size:1.3rem}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
}
