/* EnglishSpeak — normalize text size in Android in-app browsers (Zalo, etc.) */
html {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

/* EnglishSpeak Student Design System */
:root{
 --font:"Segoe UI",Tahoma,Arial,"Noto Sans",sans-serif;
 --bg:#eef7ff;
 --surface:#ffffff;
 --surface-soft:#f7fbfe;
 --text:#17324d;
 --muted:#6f8799;
 --primary:#1978bd;
 --primary-soft:#e7f4ff;
 --border:#dbe9f3;
 --danger:#d34d4d;
 --shadow:0 8px 24px rgba(29,80,116,.09);
 --radius:18px;
 --app-width:520px;
 --nav-height:76px;
}
*{box-sizing:border-box}
html{font-size:16px;-webkit-text-size-adjust:100%}
html,body{margin:0;min-height:100%;font-family:var(--font);background:var(--bg);color:var(--text)}
body{padding-bottom:calc(var(--nav-height) + env(safe-area-inset-bottom) + 14px)}
button,input,select,textarea{font:inherit}
a{color:inherit}
.student-app{width:min(100%,var(--app-width));min-height:100vh;margin:0 auto}
.student-header{position:sticky;top:0;z-index:30;display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:10px;padding:14px;background:rgba(238,247,255,.96);backdrop-filter:blur(12px)}
.student-back{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:var(--surface);text-decoration:none;font-size:23px;font-weight:800;box-shadow:0 5px 16px rgba(28,77,111,.10)}
.student-back--empty{background:transparent;box-shadow:none}
.student-header__text{text-align:center;min-width:0}
.student-header__text h1{margin:0;font-size:20px;line-height:1.25;font-weight:800}
.student-header__text p{margin:4px 0 0;font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.student-content{padding:4px 14px 24px}
.hero{padding:18px;border-radius:22px;background:linear-gradient(135deg,#fff,#eaf6ff);border:1px solid var(--border);box-shadow:var(--shadow)}
.hero h2{margin:0 0 6px;font-size:22px}.hero p{margin:0;color:var(--muted);line-height:1.45}
.section-title{margin:20px 2px 10px;font-size:16px;font-weight:800}
.card-list{display:grid;gap:11px}
.card{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:0 5px 16px rgba(27,76,111,.07);text-decoration:none}
.card__icon{flex:0 0 48px;width:48px;height:48px;display:grid;place-items:center;border-radius:15px;background:var(--primary-soft);font-size:25px}
.card__body{min-width:0;flex:1}
.card__title{font-size:17px;font-weight:800;line-height:1.3}
.card__text{margin-top:4px;color:var(--muted);font-size:13.5px;line-height:1.35}
.card__arrow{font-size:22px;color:#87a2b6}
.card--special .card__icon{background:#fff3da}
.card--story .card__icon{background:#f0ecff}
.card--locked{opacity:.55;filter:grayscale(.15)}
.stats{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:12px}
.stat{padding:16px;border-radius:17px;background:var(--surface);border:1px solid var(--border);text-align:center}
.stat strong{display:block;font-size:24px;color:var(--primary)}
.action-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:11px}
.action-card{display:flex;min-height:118px;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:15px;border-radius:19px;background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);text-decoration:none}
.action-card__icon{font-size:29px}.action-card__title{font-weight:800;font-size:16px}.action-card__text{font-size:12.5px;color:var(--muted);line-height:1.35}
.accordion{display:grid;gap:11px}
.accordion__item{border:1px solid var(--border);border-radius:18px;background:var(--surface);overflow:hidden;box-shadow:0 5px 16px rgba(27,76,111,.07)}
.accordion__button{width:100%;display:flex;align-items:center;justify-content:space-between;padding:15px;border:0;background:transparent;color:var(--text);font-weight:800;text-align:left;cursor:pointer}
.accordion__panel{display:none;padding:0 12px 12px}.accordion__item.is-open .accordion__panel{display:grid;gap:8px}
.lesson-link{display:flex;align-items:center;gap:10px;padding:12px;border-radius:14px;background:var(--surface-soft);text-decoration:none}
.lesson-number{width:30px;height:30px;display:grid;place-items:center;border-radius:10px;background:var(--primary-soft);font-weight:800;color:var(--primary)}
.search-box{position:sticky;top:82px;z-index:20;margin-bottom:12px}
.search-box input{width:100%;padding:13px 14px;border:1px solid var(--border);border-radius:14px;background:var(--surface);outline:none}
.word-card{display:grid;grid-template-columns:78px 1fr 46px;gap:12px;align-items:center;padding:12px;border-radius:18px;background:var(--surface);border:1px solid var(--border);box-shadow:0 5px 16px rgba(27,76,111,.07)}
.word-card img{width:78px;height:78px;object-fit:contain;border-radius:14px;background:var(--surface-soft)}
.word-card__word{font-size:20px;font-weight:800}.word-card__ipa{margin-top:3px;color:var(--muted)}.word-card__meaning{margin-top:4px;color:#168050}
.sound-button{width:44px;height:44px;border:0;border-radius:14px;background:var(--primary-soft);cursor:pointer;font-size:22px}
.word-card__example{grid-column:2/4;font-size:13px;color:var(--muted)}
.pagination-wrap{position:fixed;z-index:9998;left:50%;bottom:calc(var(--nav-height) + env(safe-area-inset-bottom) + 8px);width:min(calc(100% - 24px),420px);transform:translateX(-50%);padding:7px;border-radius:17px 17px 10px 10px;background:rgba(255,255,255,.98);border:1px solid var(--border);box-shadow:0 -4px 16px rgba(29,80,116,.10)}
.pagination{display:flex;justify-content:center;gap:7px}
.page-btn{min-width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:var(--primary-soft);text-decoration:none;color:var(--primary);font-weight:800}
.page-btn.is-active{background:var(--primary);color:#fff}
.student-nav{position:fixed;z-index:9999;left:50%;bottom:0;width:min(100%,var(--app-width));min-height:var(--nav-height);display:grid;grid-template-columns:repeat(4,1fr);padding:7px 8px calc(7px + env(safe-area-inset-bottom));background:rgba(255,255,255,.98);border-top:1px solid var(--border);box-shadow:0 -8px 24px rgba(28,72,105,.12);backdrop-filter:blur(14px);transform:translateX(-50%)}
.student-nav__item{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--muted);text-decoration:none}
.student-nav__icon{width:39px;height:34px;display:grid;place-items:center;border-radius:12px;font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif;font-size:23px}
.student-nav__label{font-size:11.5px;font-weight:700;white-space:nowrap}
.student-nav__item.is-active{color:var(--primary)}
.student-nav__item.is-active .student-nav__icon{background:var(--primary-soft)}
.student-nav__item.is-active:after{content:"";position:absolute;bottom:0;width:22px;height:3px;border-radius:999px;background:var(--primary)}
.empty{padding:24px;border-radius:18px;background:var(--surface);border:1px solid var(--border);text-align:center;color:var(--muted)}
@media(max-width:390px){
 .student-content{padding-left:11px;padding-right:11px}
 .card{padding:12px}.card__icon{width:44px;height:44px;flex-basis:44px}
 .action-grid{grid-template-columns:1fr}
 .word-card{grid-template-columns:66px 1fr 44px}.word-card img{width:66px;height:66px}
}
