/* DeutschStarter v1.116.0 — navigation and dashboard */
.v116-ui .v116-hidden-tabbar{display:none!important}
.v116-ui .sidebar{display:flex;flex-direction:column}
.v116-side-nav{padding:8px 10px 12px;overflow:auto;flex:1;min-height:0}
.v116-side-search{margin-bottom:8px}.v116-side-search .nav-search{width:100%}
.v116-side-home{margin-bottom:8px}
.v116-side-group{border-top:1px solid var(--border);padding:4px 0}
.v116-side-group summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:42px;padding:8px 10px;border-radius:10px;font-weight:700;cursor:pointer;user-select:none;color:var(--text)}
.v116-side-group summary::-webkit-details-marker{display:none}.v116-group-icon{display:inline-flex;width:20px;justify-content:center;color:var(--primary)}.v116-chevron{margin-left:auto;display:inline-flex;transition:transform .18s ease}.v116-side-group[open] .v116-chevron{transform:rotate(180deg)}
.v116-side-items{list-style:none;margin:2px 0 4px;padding:0 0 0 7px}.v116-side-items li{margin:2px 0}.v116-side-nav .nav-btn{width:100%;text-align:left;display:flex;align-items:center;gap:10px;min-height:40px;padding:8px 10px;border-radius:9px}.v116-side-nav .nav-btn span{min-width:0}.v116-side-nav .nav-btn.active{background:var(--primary-soft);color:var(--primary);font-weight:700}
.v116-side-settings{margin:6px 12px 8px;min-height:44px;display:flex;align-items:center;gap:10px;padding:10px 13px;border:1px solid var(--border);border-radius:11px;background:var(--card);color:var(--text);font:inherit;font-weight:650;cursor:pointer}.v116-side-settings svg{width:19px;height:19px}
.v116-bottom-nav{display:none}
.v116-dashboard{max-width:1080px;margin:0 auto;display:grid;gap:16px;padding-bottom:20px}
.v116-welcome{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:clamp(18px,3vw,28px);border-radius:20px;background:linear-gradient(125deg,var(--primary-soft),var(--card));border:1px solid var(--border)}
.v116-welcome h2{font-size:clamp(1.45rem,3vw,2rem);margin:4px 0 8px;letter-spacing:-.03em}.v116-welcome p{margin:0;color:var(--text-muted);line-height:1.55}.v116-eyebrow{margin:0 0 5px;color:var(--primary);font-size:.73rem;letter-spacing:.1em;font-weight:800}.v116-welcome-mark{font-size:clamp(2.4rem,6vw,4rem);flex:none}
.v116-card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:18px;min-width:0}.v116-card h3{margin:0;font-size:1.08rem;letter-spacing:-.015em}.v116-card-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.v116-big-number{font-size:1.55rem;white-space:nowrap}.v116-big-number small{font-size:.85rem;color:var(--text-muted);font-weight:500;margin-left:4px}.v116-progress{height:10px;background:var(--border);border-radius:999px;overflow:hidden;margin:17px 0 10px}.v116-progress span{display:block;height:100%;background:var(--primary);border-radius:inherit;transition:width .3s ease}.v116-progress-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:.85rem;color:var(--text-muted)}.v116-text-button{border:0;background:none;color:var(--primary);font:inherit;font-weight:700;cursor:pointer;padding:6px 0;min-height:36px}
.v116-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.v116-stat{display:grid;grid-template-columns:36px 1fr;column-gap:10px;align-items:center;text-align:left;padding:15px;border:1px solid var(--border);border-radius:15px;background:var(--card);color:var(--text);font:inherit;min-width:0;cursor:pointer}.v116-stat-icon{grid-row:span 2;width:36px;height:36px;display:grid;place-items:center;background:var(--primary-soft);border-radius:11px;color:var(--primary)}.v116-stat-icon svg{width:19px;height:19px}.v116-stat-label{font-size:.78rem;color:var(--text-muted)}.v116-stat strong{font-size:1.05rem;overflow-wrap:anywhere}.v116-muted,.v116-footnote{color:var(--text-muted);font-size:.88rem;line-height:1.55}.v116-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.v116-primary,.v116-secondary{min-height:44px;border-radius:11px;padding:10px 14px;font:inherit;font-weight:700;cursor:pointer}.v116-primary{background:var(--primary);color:var(--on-primary,#fff);border:1px solid var(--primary)}.v116-secondary{background:var(--card);color:var(--text);border:1px solid var(--border)}.v116-primary svg{width:17px;height:17px;vertical-align:middle;margin-left:6px}
.v116-skill-list{display:grid;gap:0;margin-top:12px}.v116-skill{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--border)}.v116-skill:last-child{border-bottom:0}.v116-skill-name{display:flex;align-items:center;gap:9px;font-weight:650}.v116-skill-ico{display:inline-flex;color:var(--primary)}.v116-skill-ico svg{width:18px;height:18px}.v116-skill-na{font-size:.8rem;color:var(--text-muted);text-align:right}.v116-footnote{margin:10px 0 0;font-size:.8rem}.v116-heatmap-note{display:flex;gap:13px;align-items:flex-start;margin-top:12px;padding:14px;background:var(--bg, var(--primary-soft));border-radius:12px}.v116-heatmap-symbol{color:var(--primary);display:flex}.v116-heatmap-symbol svg{width:24px;height:24px}.v116-heatmap-note strong{font-size:.92rem}.v116-heatmap-note p{margin:4px 0;color:var(--text-muted);font-size:.85rem;line-height:1.5}
.v116-settings-back{display:flex;align-items:center;gap:8px;min-height:42px;margin:0 0 12px;padding:8px 12px;border:1px solid var(--border);border-radius:10px;background:var(--card);color:var(--text);font:inherit;font-weight:650;cursor:pointer}.v116-settings-back svg{width:18px;height:18px}
.v116-category-sheet{position:fixed;inset:0;z-index:2500}.v116-sheet-shade{position:absolute;inset:0;width:100%;height:100%;border:0;background:#0f172a70}.v116-sheet-panel{position:absolute;left:0;right:0;bottom:0;max-height:min(78dvh,720px);overflow:auto;background:var(--card);color:var(--text);border-radius:20px 20px 0 0;padding:12px 16px calc(18px + env(safe-area-inset-bottom));box-shadow:0 -12px 36px #0002}.v116-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:4px 0 12px;border-bottom:1px solid var(--border)}.v116-sheet-head strong{font-size:1.1rem}.v116-sheet-close{width:40px;height:40px;border:1px solid var(--border);border-radius:10px;background:var(--card);color:var(--text)}.v116-sheet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-top:12px}.v116-sheet-item{display:flex;align-items:center;gap:9px;text-align:left;min-height:48px;padding:10px;border:1px solid var(--border);border-radius:11px;background:var(--card);color:var(--text);font:inherit;font-size:.9rem;cursor:pointer}.v116-sheet-item>svg:first-child{width:19px;height:19px;color:var(--primary);flex:none}.v116-sheet-item span{flex:1}.v116-sheet-item>svg:last-child{width:15px;height:15px;color:var(--text-muted);flex:none}
@media(max-width:768px){.v116-ui .sidebar{position:fixed;z-index:2200;top:0;bottom:0;width:min(86vw,320px);max-height:100dvh}.v116-ui .main{padding-bottom:calc(78px + env(safe-area-inset-bottom))}.v116-ui .content{padding-bottom:20px}.v116-bottom-nav{position:fixed;z-index:2100;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;padding:6px 5px calc(6px + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--card);box-shadow:0 -5px 20px #0000000a}.v116-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:52px;padding:4px 1px;border:0;border-radius:10px;background:transparent;color:var(--text-muted);font:inherit;font-size:.67rem;font-weight:650;cursor:pointer}.v116-tab-ico{display:flex;align-items:center;justify-content:center}.v116-tab-ico svg{width:21px;height:21px}.v116-tab.active{background:var(--primary-soft);color:var(--primary)}.v116-stat-grid{grid-template-columns:1fr}.v116-stat{grid-template-columns:36px minmax(0,1fr) auto}.v116-stat-icon{grid-row:span 1}.v116-stat strong{grid-column:3;grid-row:1;max-width:42vw;text-align:right}.v116-welcome{border-radius:16px}.v116-card{padding:15px}.v116-skill{align-items:flex-start}.v116-skill-na{max-width:55%;}.v116-dashboard{gap:12px}.v116-actions>*{width:100%}.v116-sheet-grid{grid-template-columns:1fr}}
@media(min-width:769px){.v116-bottom-nav{display:none!important}.v116-ui .sidebar{width:260px}.v116-ui .main{min-width:0}}
@media(prefers-reduced-motion:reduce){.v116-progress span,.v116-chevron{transition:none}}
.v116-bars{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;margin-top:18px;align-items:end}.v116-bar-col{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0}.v116-bar-track{width:min(100%,34px);height:105px;background:var(--border);border-radius:8px;display:flex;align-items:flex-end;overflow:hidden}.v116-bar-track span{display:block;width:100%;background:var(--primary);border-radius:7px 7px 0 0;min-height:3px}.v116-bar-col b{font-size:.78rem}.v116-bar-col small{font-size:.7rem;color:var(--text-muted)}.v116-heatmap{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin-top:14px}.v116-heat-cell{display:block;aspect-ratio:1;border-radius:5px;background:var(--border);min-width:0}.v116-heat-cell.level-1,.v116-heatmap-legend .level-1{background:color-mix(in srgb,var(--primary) 28%,var(--card))}.v116-heat-cell.level-2,.v116-heatmap-legend .level-2{background:color-mix(in srgb,var(--primary) 52%,var(--card))}.v116-heat-cell.level-3,.v116-heatmap-legend .level-3{background:color-mix(in srgb,var(--primary) 76%,var(--card))}.v116-heatmap-legend{display:flex;align-items:center;justify-content:flex-end;gap:5px;margin-top:9px;font-size:.72rem;color:var(--text-muted)}.v116-heatmap-legend i{display:block;width:12px;height:12px;border-radius:3px;background:var(--border)}
.v116-ui .tabbar.v116-hidden-tabbar{display:none!important}
@media(max-width:768px){.v116-bottom-nav{grid-template-columns:repeat(6,minmax(0,1fr))}.v116-tab{font-size:.62rem}.v116-tab-ico svg{width:19px;height:19px}.v116-bars{gap:5px}.v116-bar-track{height:85px}.v116-heatmap{gap:5px}}

/* v1.116.2: retain the original brand in the header; use the top-right control for Tôi. */
.v116-header-brand{display:none;align-items:center;gap:9px;min-width:0}
.v116-header-logo{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:var(--primary-soft);font-size:23px;flex:none}
.v116-header-brand-text{display:flex;flex-direction:column;line-height:1.15;white-space:nowrap}
.v116-header-brand-text strong{font-size:1rem;font-weight:800;letter-spacing:-.02em}
.v116-header-brand-text small{font-size:.68rem;color:var(--text-muted);margin-top:3px}
@media(max-width:768px){
  .v116-header-brand{display:flex;}
  .v116-ui .topbar #pageTitle{display:none}
  .v116-bottom-nav{grid-template-columns:repeat(6,minmax(0,1fr));padding:7px 4px calc(8px + env(safe-area-inset-bottom))}
  .v116-tab{min-height:56px;font-size:.72rem;font-weight:700;gap:4px;padding:5px 1px}
  .v116-tab-ico svg{width:22px;height:22px}
  .v116-ui .topbar{gap:9px}
  .v116-ui .topbar .top-actions{gap:3px}
}

/* v1.116.3: full original brand in compact sticky header, auto-hide on scroll, five roomy bottom tabs. */
@media(max-width:768px){
  .v116-header-brand{display:flex;align-items:center;gap:7px;min-width:0;flex:1;padding:0;border:0;background:none;color:var(--text);-webkit-text-fill-color:initial;overflow:hidden}
  .v116-header-brand.logo{padding:0;background:none;border:0;gap:7px;white-space:normal;font-size:1rem}
  .v116-header-brand .logo-icon{font-size:1.45rem;flex:none}
  .v116-header-brand .logo-brand{gap:0;min-width:0;overflow:hidden}
  .v116-header-brand .logo-text{font-size:1rem;white-space:nowrap}
  .v116-header-brand .logo-subrow{gap:5px;flex-wrap:nowrap}
  .v116-header-brand .logo-sub{font-size:.67rem;white-space:nowrap}
  .v116-header-brand .ds-ver{font-size:.58rem;white-space:nowrap}
  .v116-ui .topbar{position:sticky;top:0;min-height:58px;padding:7px 8px;gap:6px;transition:transform .2s ease;will-change:transform}
  .v116-ui .topbar #pageTitle{display:none}
  .v116-ui .topbar .menu-toggle,.v116-ui .topbar #dictBtn,.v116-ui .topbar #infoBtn{display:flex;align-items:center;justify-content:center;flex:none;min-width:38px;min-height:40px;padding:5px;border-radius:10px}
  .v116-ui .topbar .top-actions{display:flex;align-items:center;gap:3px;flex:none}
  .v116-ui .topbar #infoBtn{width:auto;gap:4px;padding:5px 7px;font-size:.78rem;font-weight:750}
  .v116-ui .topbar #infoBtn svg{width:20px;height:20px}
  .v116-me-label{display:inline}
  body.v116-header-collapsed .v116-ui .topbar{transform:translateY(calc(-100% + 7px));}
  body.v116-header-collapsed .v116-ui .topbar:after{content:"";position:absolute;left:calc(50% - 24px);bottom:0;width:48px;height:7px;border-radius:0 0 8px 8px;background:var(--primary);opacity:.7;cursor:pointer}
  .v116-bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr));padding:5px 5px calc(6px + env(safe-area-inset-bottom))}
  .v116-tab{min-height:58px;font-size:.76rem;font-weight:750;gap:4px}
  .v116-tab-ico svg{width:23px;height:23px}
}
.v116-side-today{display:flex;align-items:center;gap:10px;min-height:40px;padding:8px 10px;border-radius:9px;margin:4px 0 8px}
.v116-side-today svg{width:19px;height:19px}
@media(min-width:769px){.v116-header-brand{display:none!important}.v116-me-label{display:none}}


/* v1.116.4: compact tappable header, readable category tiles and balanced bottom tabs. */
@media(max-width:768px){
  .v116-ui .topbar{z-index:1200}
  .v116-ui .topbar .v116-header-brand{cursor:pointer;touch-action:manipulation}
  body.v116-header-collapsed .v116-ui .topbar{transform:translateY(calc(-100% + 14px))}
  body.v116-header-collapsed .v116-ui .topbar:after{left:calc(50% - 30px);width:60px;height:14px;border-radius:0 0 10px 10px;box-shadow:0 2px 7px #0002}
  .v116-sheet-panel{max-height:84dvh}
  .v116-sheet-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding-top:14px}
  .v116-sheet-item{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;min-height:94px;padding:12px 7px;text-align:center;font-size:1rem;font-weight:750;line-height:1.25;border-radius:13px}
  .v116-sheet-item>svg:first-child{width:27px;height:27px}
  .v116-sheet-item>svg:last-child{display:none}
  .v116-sheet-item span{flex:none;overflow-wrap:anywhere}
  .v116-bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;gap:3px;padding:6px 6px calc(7px + env(safe-area-inset-bottom))}
  .v116-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:62px;padding:5px 2px;font-size:.78rem;line-height:1.1;font-weight:800;text-align:center;white-space:normal}
  .v116-tab-ico{width:25px;height:25px;display:flex;align-items:center;justify-content:center}
  .v116-tab-ico svg{width:24px;height:24px;display:block}
}
@media(min-width:769px){.v116-sheet-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.v116-sheet-item{font-size:.98rem;font-weight:700;min-height:78px}}
/* v1.121.1: lớp tìm kiếm phải nằm TRÊN thanh trên (z-index 1200); trước đó thanh trên che mất hàng ô nhập. Nút Xóa có thuộc tính hidden không được hiện. */
.v116-ui .search-layer{z-index:1300}
.search-head [hidden]{display:none!important}

/* ===== v1.122.0 — thẻ "Tiếng Đức đời sống" (một vị trí, ở Tổng quan) ===== */
.v116-life-card .v116-card-head{align-items:flex-start}
.v116-life-card .v116-stat-icon{grid-row:auto;flex:none;width:40px;height:40px;border-radius:12px}
.v116-life-card .v116-stat-icon svg{width:21px;height:21px}
.v116-life-card .v116-muted{margin:10px 0 0}
.v116-life-card .v116-actions{margin-top:12px}
.v116-life-card .v116-primary{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.v116-life-card .v116-primary svg{margin-left:0}
.v116-life-sub{margin:10px 0 0;font-size:.78rem;color:var(--text-muted);text-align:center}

/* ===== v1.122.0 — giải thích gập (kiểu VietLeben): mũi tên xuống = mở, mũi tên lên = đóng ===== */
details.ds-fold{margin:0 0 6px;border:0;padding:0;background:transparent}
details.ds-fold>summary.ds-fold-sum{list-style:none;cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 22px 4px 0;color:var(--text-muted);opacity:.8}
details.ds-fold>summary.ds-fold-sum::-webkit-details-marker{display:none}
details.ds-fold>summary.ds-fold-sum::marker{content:""}
details.ds-fold[open]>summary.ds-fold-sum{opacity:1}
details.ds-fold>summary.ds-fold-sum:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:6px}
.ds-fold-ico{position:relative;display:inline-block;width:16px;height:16px;flex:none}
.ds-fold-ico::before{content:"";position:absolute;left:50%;top:50%;width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translate(-50%,-72%) rotate(45deg);transition:transform .15s ease}
details.ds-fold[open]>summary .ds-fold-ico::before{transform:translate(-50%,-28%) rotate(225deg)}
details.ds-fold>:not(summary){margin-top:2px}
@media (prefers-reduced-motion:reduce){.ds-fold-ico::before{transition:none}}

/* ===== v1.124.0 — bỏ dấu 3 gạch: chạm logo = mở menu, chạm logo trong menu = đóng; icon Học/Luyện ===== */
@media(max-width:768px){
  .v116-ui .topbar .menu-toggle{display:none!important}
  .v116-brand-burger{display:none!important}
  .v116-header-brand{-webkit-tap-highlight-color:transparent;border-radius:10px}
  .v116-header-brand:active{background:var(--primary-soft)}
  .v116-header-brand:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
  .v116-header-brand .logo-icon svg,.v116-header-brand .logo-icon .emo-svg{width:26px;height:auto}
  .v116-sb-logo{cursor:pointer;-webkit-tap-highlight-color:transparent}
  .v116-sb-logo:active{background:var(--primary-soft)}
}
@media(min-width:769px){.v116-brand-burger{display:none}}

/* v1.124.0 — sửa trang bài học rộng hơn màn hình (bảng trong thẻ Ngữ pháp làm card giãn): bảng cuộn ngang trong khung của nó */
.main,.content{min-width:0;max-width:100%}
.content>.card{min-width:0;max-width:100%}
.lg,.lg-tblw{max-width:100%;min-width:0}
.lg-tblw{overflow-x:auto}
