/* RadLearn V9.3.0 — Mobile UI Refresh */

/* ---------- App shell / fixed PWA viewport ---------- */
html,body{max-width:100%;overflow-x:hidden}
html.v885-pwa-standalone,html.v885-pwa-standalone body{width:100%;max-width:100%;overflow-x:hidden;overscroll-behavior-x:none;-webkit-text-size-adjust:100%;text-size-adjust:100%}
html.v885-pwa-standalone .site-body,html.v885-pwa-standalone .main{min-width:0;max-width:100%}

/* ---------- Topbar: one schedule shortcut ---------- */
.v46-top-quick{display:flex;align-items:center;gap:8px;min-width:0}
.v46-top-quick a{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 13px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--muted);font-size:10px;font-weight:800;white-space:nowrap;box-shadow:0 5px 16px rgba(24,70,85,.035)}
.v46-top-quick a:hover{color:var(--theme-accent,var(--teal));border-color:color-mix(in srgb,var(--theme-accent,var(--teal)) 35%,var(--line));transform:translateY(-1px)}
.v46-top-quick a .icon{width:16px;height:16px}
.v885-single-schedule-action{grid-template-columns:minmax(0,1fr)!important}
.v885-single-schedule-action .btn{min-width:130px}

/* Keep timetable in normal document flow on mobile/tablet. */
.v50-calendar-page{align-self:stretch;justify-content:flex-start;min-width:0}
.v50-calendar-layout,.v50-calendar-card,.v50-day-panel{min-width:0}

/* ---------- Subject hero refresh ---------- */
.v885-subject-space{gap:24px}
.v885-subject-hero{padding:28px!important;border-radius:26px!important;gap:30px!important;background:radial-gradient(circle at 92% 8%,color-mix(in srgb,var(--theme-accent) 12%,transparent),transparent 34%),linear-gradient(155deg,color-mix(in srgb,var(--surface) 97%,#e8f8fb),var(--surface))!important;box-shadow:0 18px 48px rgba(20,62,78,.07)!important}
.v885-subject-copy{min-width:0}
.v885-subject-copy h1{font-size:clamp(34px,4vw,46px)!important;letter-spacing:-1.3px!important}
.v885-subject-copy>p{max-width:620px!important;color:var(--muted)!important}
.v885-subject-metrics{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px!important;margin:22px 0!important}
.v885-subject-metric{position:relative!important;display:grid!important;grid-template-columns:34px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:9px!important;align-items:center!important;padding:13px 12px!important;border:1px solid color-mix(in srgb,var(--tone,#2b70ef) 13%,var(--line))!important;border-radius:15px!important;background:color-mix(in srgb,var(--tone-soft,#eaf1ff) 54%,var(--surface))!important;min-width:0!important}
.v885-subject-metric>i{grid-row:1/3;width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:var(--tone-soft,#eaf1ff);color:var(--tone,#2b70ef);font-style:normal}
.v885-subject-metric>i .icon{width:17px;height:17px}
.v885-subject-metric b{font-size:18px!important;line-height:1.05;min-width:0;overflow:hidden;text-overflow:ellipsis}
.v885-subject-metric small{font-size:8.5px!important;color:var(--muted);line-height:1.25}
.v885-subject-metric.tone-blue{--tone:#2d6ff2;--tone-soft:#eaf2ff}.v885-subject-metric.tone-teal{--tone:#0d928a;--tone-soft:#e6f8f5}.v885-subject-metric.tone-purple{--tone:#7b4fe6;--tone-soft:#f0eaff}.v885-subject-metric.tone-orange{--tone:#ed6c36;--tone-soft:#fff0e8}
.v885-hero-cta{min-height:48px!important;padding-inline:24px!important;border-radius:14px!important;font-weight:850!important;box-shadow:0 12px 25px color-mix(in srgb,var(--theme-accent) 20%,transparent)!important}
.v885-subject-cover{border-radius:24px!important;box-shadow:0 18px 45px color-mix(in srgb,var(--theme-accent) 16%,transparent)!important}

/* ---------- Study mode design system ---------- */
.v885-mode-section{padding-top:7px!important}
.v885-mode-heading{position:relative;align-items:center!important;margin-bottom:18px!important;padding:4px 0 2px!important}
.v885-mode-heading>span{width:5px!important;height:34px!important;background:linear-gradient(180deg,#2c77ff,#545cff)!important;box-shadow:0 5px 12px rgba(58,99,241,.22)}
.v885-mode-heading h2{font-size:26px!important;line-height:1.15!important;letter-spacing:-.6px!important}
.v885-mode-heading p{margin-top:5px;color:var(--muted);font-size:11px;line-height:1.5}
.v885-mode-decoration{margin-left:auto;width:56px;height:56px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,#e8f1ff,#ede9ff);color:#536af1;box-shadow:0 10px 25px rgba(66,99,211,.08);font-style:normal}
.v885-mode-decoration .icon{width:27px;height:27px}
.v885-mode-grid{gap:14px!important;align-items:stretch}
.v885-tool-card{min-height:218px!important;padding:20px!important;border-radius:24px!important;border:1px solid color-mix(in srgb,var(--tone,#2b70ef) 9%,var(--line))!important;background:linear-gradient(155deg,var(--surface) 72%,color-mix(in srgb,var(--tone-soft,#eaf1ff) 46%,var(--surface)))!important;box-shadow:0 12px 34px rgba(26,67,83,.065)!important;isolation:isolate}
.v885-tool-card:after{right:-34px!important;top:-34px!important;width:115px!important;height:115px!important;background:color-mix(in srgb,var(--tone-soft,#eaf1ff) 82%,transparent)!important;z-index:-1}
.v885-tool-card:before{content:"";position:absolute;right:13px;top:14px;width:28px;height:28px;border-radius:50%;background:color-mix(in srgb,var(--tone,#2b70ef) 6%,transparent);z-index:-1}
.v885-tool-card:hover{transform:translateY(-3px)!important;border-color:color-mix(in srgb,var(--tone,#2b70ef) 30%,var(--line))!important;box-shadow:0 18px 38px rgba(26,67,83,.105)!important}
.v885-tool-card .v46-tool-icon{width:52px!important;height:52px!important;border-radius:17px!important;margin-bottom:17px!important;background:color-mix(in srgb,var(--tone-soft,#eaf1ff) 90%,var(--surface))!important;color:var(--tone,#2b70ef)!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--tone,#2b70ef) 6%,transparent)}
.v885-tool-card .v46-tool-icon .icon{width:24px!important;height:24px!important}
.v885-tool-copy{position:relative;z-index:2;min-width:0}
.v885-tool-card h3{font-size:17px!important;line-height:1.28!important;color:var(--ink)!important;min-height:22px}
.v885-tool-card p{font-size:10px!important;line-height:1.65!important;margin-top:7px!important;min-height:34px;color:var(--muted)!important}
.v885-tool-card .v46-tool-link{position:relative;z-index:2;margin-top:auto!important;padding:11px 13px!important;border-radius:13px!important;background:color-mix(in srgb,var(--tone-soft,#eaf1ff) 72%,var(--surface))!important;color:var(--tone,#2b70ef)!important;font-size:10.5px!important;font-weight:900!important;justify-content:space-between!important}
.v885-tool-card .v46-tool-link .icon{width:15px!important;height:15px!important}
.v885-tool-card.v50-coming-card{padding-top:20px!important}
.v885-tool-card .v50-coming{top:17px!important;right:17px!important;font-size:7.5px!important;padding:5px 7px!important}
.v885-tool-card .v50-disabled-link{opacity:.62}

/* ---------- Learning overview ---------- */
.v885-learning-overview{padding:22px;border:1px solid var(--line);border-radius:26px;background:linear-gradient(155deg,color-mix(in srgb,var(--surface) 96%,#edf8ff),var(--surface));box-shadow:0 14px 38px rgba(23,67,85,.055)}
.v885-overview-heading{display:flex;align-items:center;gap:13px;margin-bottom:16px}
.v885-overview-heading>i{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:#eaf2ff;color:#2d6ff2;font-style:normal}
.v885-overview-heading>i .icon{width:23px;height:23px}
.v885-overview-heading h2{font-size:22px;letter-spacing:-.4px}
.v885-overview-heading p{font-size:10px;color:var(--muted);margin-top:3px}
.v885-overview-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.v885-overview-card{--tone:#2b70ef;--tone-soft:#eaf1ff;display:grid;grid-template-columns:50px minmax(0,1fr);grid-template-rows:auto auto;gap:0 12px;align-items:center;padding:16px;border:1px solid color-mix(in srgb,var(--tone) 10%,var(--line));border-radius:18px;background:var(--surface);min-width:0;position:relative;overflow:hidden}
.v885-overview-card:after{content:"";position:absolute;right:-28px;bottom:-32px;width:95px;height:95px;border-radius:50%;background:color-mix(in srgb,var(--tone-soft) 62%,transparent);pointer-events:none}
.v885-overview-card.tone-mint{--tone:#07856f;--tone-soft:#e4f7f1}.v885-overview-card.tone-orange{--tone:#dd5571;--tone-soft:#ffe9ee}.v885-overview-card.tone-ocean{--tone:#1f6eea;--tone-soft:#e8f1ff}
.v885-overview-icon{grid-row:1/3;width:50px;height:50px;border-radius:16px;display:grid;place-items:center;background:var(--tone-soft);color:var(--tone);font-style:normal;z-index:1}
.v885-overview-icon .icon{width:23px;height:23px}
.v885-overview-card>div{min-width:0;z-index:1}
.v885-overview-card strong{font-size:28px;line-height:1;color:var(--ink)}
.v885-overview-card h3{font-size:13px;margin-top:4px}
.v885-overview-card p{font-size:8.5px;color:var(--muted);margin-top:3px;line-height:1.45}
.v885-overview-card>a{grid-column:1/-1;margin-top:12px;z-index:1;color:var(--tone)!important;justify-content:flex-end}

/* ---------- Admin navigation refresh ---------- */
.v885-admin-nav{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;margin:18px 0 26px!important}
.v885-admin-nav-item{position:relative;min-height:116px!important;display:grid!important;grid-template-columns:48px minmax(0,1fr) 24px!important;gap:13px!important;align-items:center!important;padding:18px!important;border-radius:20px!important;background:linear-gradient(155deg,var(--surface),color-mix(in srgb,var(--theme-soft) 22%,var(--surface)))!important;color:var(--ink)!important;box-shadow:0 10px 28px rgba(24,66,82,.055)!important;overflow:hidden}
.v885-admin-nav-item:before{content:attr(data-admin-index);position:absolute;right:13px;top:10px;font-size:7px;font-weight:900;letter-spacing:.13em;color:color-mix(in srgb,var(--muted) 62%,transparent)}
.v885-admin-nav-item:hover{border-color:color-mix(in srgb,var(--theme-accent) 34%,var(--line))!important;transform:translateY(-2px)!important}
.v885-admin-nav-item.active{background:linear-gradient(145deg,color-mix(in srgb,var(--theme-accent) 92%,#153e4b),color-mix(in srgb,var(--theme-accent-2) 82%,#153e4b))!important;color:#fff!important;border-color:transparent!important;box-shadow:0 15px 32px color-mix(in srgb,var(--theme-accent) 20%,transparent)!important}
.v885-admin-icon{width:48px;height:48px;border-radius:15px;display:grid;place-items:center;background:color-mix(in srgb,var(--theme-soft) 76%,var(--surface));color:var(--theme-accent);font-style:normal}
.v885-admin-icon .icon{width:22px;height:22px}
.v885-admin-copy{display:grid;min-width:0;gap:4px}
.v885-admin-copy strong{font-size:12.5px;line-height:1.3}
.v885-admin-copy small{font-size:8.5px;line-height:1.45;color:var(--muted);font-weight:550}
.v885-admin-arrow{display:grid;place-items:center;color:var(--muted)}.v885-admin-arrow .icon{width:16px;height:16px}
.v885-admin-nav-item.active .v885-admin-icon{background:rgba(255,255,255,.14);color:#fff}.v885-admin-nav-item.active .v885-admin-copy small,.v885-admin-nav-item.active .v885-admin-arrow{color:rgba(255,255,255,.78)}

/* ---------- Dark theme parity ---------- */
[data-theme=dark] .v885-tool-card,[data-theme=dark] .v885-learning-overview,[data-theme=dark] .v885-overview-card,[data-theme=dark] .v885-admin-nav-item{background:#102129!important}
[data-theme=dark] .v885-subject-hero{background:linear-gradient(145deg,#10242c,#0e2027)!important}
[data-theme=dark] .v885-tool-card .v46-tool-link{background:color-mix(in srgb,var(--tone-soft,#203545) 12%,#102129)!important}

/* ---------- Tablet/mobile ---------- */
@media(max-width:900px){
  .v885-subject-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .v885-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .v885-overview-list{grid-template-columns:1fr!important}
  .v885-admin-nav{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:760px){
  .main{padding-top:18px!important;padding-inline:12px!important}
  .topbar{height:64px!important;padding:0 max(9px,env(safe-area-inset-left))!important;gap:6px!important}
  .topbar .mobile-menu{flex:0 0 auto!important}
  .topbar .v46-top-quick{margin-left:auto!important;flex:0 0 auto!important;gap:5px!important}
  .topbar .v46-top-quick a{width:38px!important;height:38px!important;min-width:38px!important;padding:0!important;border-radius:11px!important}
  .topbar .v46-top-quick a span{display:none!important}
  .topbar .top-actions{margin-left:0!important;gap:5px!important;min-width:0!important}

  .v50-calendar-page{margin:0!important;padding:0!important;align-self:flex-start!important;justify-content:flex-start!important;gap:12px!important}
  .v50-calendar-head{margin:0!important;padding:16px!important;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
  .v50-calendar-head h1{font-size:26px!important;margin:0 0 6px!important}
  .v50-calendar-head p{font-size:10.5px!important;line-height:1.55!important}

  .v885-subject-space{gap:18px!important}
  .v885-subject-hero{display:flex!important;flex-direction:column!important;padding:12px!important;border-radius:24px!important;gap:0!important}
  .v885-subject-cover{order:-1!important;width:100%!important;height:205px!important;min-height:205px!important;margin:0 0 0!important;border-radius:18px 18px 14px 14px!important;transform:none!important;justify-self:stretch!important}
  .v885-subject-copy{width:100%;padding:18px 5px 5px!important}
  .v885-subject-copy h1{font-size:30px!important;margin:11px 0 6px!important}
  .v885-subject-copy>p{font-size:11px!important;line-height:1.55!important}
  .v885-subject-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:16px 0!important}
  .v885-subject-metric{grid-template-columns:30px minmax(0,1fr)!important;padding:11px 9px!important;border-radius:13px!important;column-gap:7px!important}
  .v885-subject-metric>i{width:30px;height:30px;border-radius:10px}.v885-subject-metric>i .icon{width:15px;height:15px}
  .v885-subject-metric b{font-size:17px!important}.v885-subject-metric small{font-size:8px!important}
  .v885-hero-cta{width:100%!important;min-height:46px!important;border-radius:13px!important}

  .v885-mode-heading{margin-bottom:13px!important}.v885-mode-heading h2{font-size:23px!important}.v885-mode-heading p{font-size:10px!important}.v885-mode-decoration{width:42px;height:42px;border-radius:14px}.v885-mode-decoration .icon{width:20px;height:20px}
  .v885-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .v885-tool-card{min-height:205px!important;padding:15px!important;border-radius:19px!important}
  .v885-tool-card .v46-tool-icon{width:44px!important;height:44px!important;border-radius:14px!important;margin-bottom:13px!important}.v885-tool-card .v46-tool-icon .icon{width:21px!important;height:21px!important}
  .v885-tool-card h3{font-size:14px!important;line-height:1.25!important;min-height:35px}
  .v885-tool-card p{font-size:9px!important;line-height:1.55!important;min-height:43px}
  .v885-tool-card .v46-tool-link{font-size:9.5px!important;padding:9px 10px!important;border-radius:11px!important}
  .v885-tool-card .v50-coming{font-size:6.5px!important;top:12px!important;right:12px!important}

  .v885-learning-overview{padding:15px!important;border-radius:21px!important}.v885-overview-heading{margin-bottom:12px!important}.v885-overview-heading>i{width:40px;height:40px;border-radius:13px}.v885-overview-heading h2{font-size:19px}.v885-overview-heading p{font-size:9px}
  .v885-overview-list{gap:8px!important}.v885-overview-card{grid-template-columns:46px minmax(0,1fr) auto!important;grid-template-rows:auto!important;padding:12px!important;border-radius:15px!important;gap:10px!important}.v885-overview-icon{grid-row:auto!important;width:46px;height:46px;border-radius:14px}.v885-overview-card>div{min-width:0}.v885-overview-card strong{font-size:23px}.v885-overview-card h3{font-size:11px}.v885-overview-card p{font-size:8px;line-height:1.35}.v885-overview-card>a{grid-column:auto!important;margin-top:0!important;white-space:nowrap;font-size:8.5px!important;align-self:end}.v885-overview-card>a .icon{width:13px!important}

  .v885-admin-nav{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  .v885-admin-nav-item{min-height:138px!important;grid-template-columns:1fr 20px!important;grid-template-rows:43px minmax(0,1fr)!important;gap:9px!important;padding:14px!important;border-radius:18px!important;align-items:start!important}
  .v885-admin-icon{grid-column:1;width:43px;height:43px;border-radius:13px}.v885-admin-icon .icon{width:20px;height:20px}
  .v885-admin-copy{grid-column:1/-1;gap:4px}.v885-admin-copy strong{font-size:11.5px}.v885-admin-copy small{font-size:8px;line-height:1.4}.v885-admin-arrow{grid-column:2;grid-row:1;align-self:center}.v885-admin-nav-item:before{right:10px;top:auto;bottom:8px;font-size:6px}

  body>.v46-support{right:max(9px,env(safe-area-inset-right))!important;bottom:calc(14px + env(safe-area-inset-bottom))!important}
  body>.v46-support .v46-support-main{width:48px!important;height:48px!important;border-radius:15px!important}

  html.v885-pwa-standalone input,html.v885-pwa-standalone select,html.v885-pwa-standalone textarea{font-size:16px!important}
  html.v885-pwa-standalone .main{min-height:calc(100dvh - 64px)!important}
}

@media(max-width:430px){
  .v885-overview-card{grid-template-columns:42px minmax(0,1fr)!important}.v885-overview-card>a{grid-column:2!important;justify-self:start;margin-top:3px!important}.v885-overview-icon{grid-row:1/3!important;width:42px;height:42px}.v885-overview-card p{display:none}
  .v885-subject-cover{height:190px!important;min-height:190px!important}
}

@media(max-width:350px){
  .v885-mode-grid,.v885-admin-nav{grid-template-columns:1fr!important}
  .v885-tool-card{min-height:170px!important}.v885-tool-card h3{min-height:0}.v885-tool-card p{min-height:0}
  .v885-admin-nav-item{min-height:102px!important;grid-template-columns:43px minmax(0,1fr) 18px!important;grid-template-rows:1fr!important;align-items:center!important}.v885-admin-icon,.v885-admin-copy,.v885-admin-arrow{grid-column:auto!important;grid-row:auto!important}.v885-admin-copy small{display:block}
}
