/* AMA Speaking - reference-aligned shell (header | utilities | sign in) */
body.view-hub #topbar {
 display: block !important;
}

html[data-ama-device="laptop"] body.view-hub .top-main-nav-wrap {
 display: block !important;
}

body.view-hub .nav-toggle,
body.view-hub #nav-toggle {
 display: none !important;
}

#ama-account-chip,
.ama-chip--float {
 display: none !important;
}

.ama-topbar__inner {
 align-items: center;
 gap: 10px;
 padding: 10px 14px 8px !important;
}

.ama-topbar__start {
 display: flex;
 align-items: center;
 gap: 10px;
 min-width: 0;
 flex: 1 1 auto;
}

.ama-topbar-menu {
 flex-shrink: 0;
}

.ama-topbar-history {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 8px;
 padding: 0 12px 10px;
 background: linear-gradient(180deg, rgba(11, 23, 51, 0.98), rgba(19, 42, 82, 0.98));
 border-bottom: 1px solid rgba(214, 179, 106, 0.35);
}

.ama-topbar-nav {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 6px;
 min-height: 40px;
 padding: 0 14px;
 border-radius: 999px;
 border: 2px solid rgba(214, 179, 106, 0.55);
 background: rgba(255, 255, 255, 0.08);
 color: #fff;
 font: 700 0.78rem system-ui, sans-serif;
 cursor: pointer;
}

.ama-topbar-nav__label {
 letter-spacing: 0.02em;
}

html[data-ama-device="phone"] .ama-topbar-nav__label {
 display: none;
}

html[data-ama-device="phone"] .ama-topbar-nav {
 min-width: 44px;
 padding: 0;
 width: 44px;
}

.ama-topbar-nav:disabled {
 opacity: 0.35;
 cursor: not-allowed;
}

@media (max-width: 720px) {
 .ama-topbar-nav {
 width: 36px;
 min-width: 36px;
 min-height: 36px;
 }
}

body.practice-focus .quick-nav-controls {
 display: flex !important;
 z-index: 9200;
}

.practice-focus-bar__fwd {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 min-height: 36px;
 padding: 0 12px;
 border-radius: 10px;
 border: 1px solid rgba(255, 255, 255, 0.35);
 background: rgba(255, 255, 255, 0.12);
 color: #fff;
 font: 700 0.78rem system-ui, sans-serif;
 cursor: pointer;
}

.practice-focus-bar__fwd:disabled {
 opacity: 0.4;
 cursor: not-allowed;
}

.ama-topbar-actions {
 display: flex;
 align-items: center;
 justify-content: flex-end;
 gap: 8px;
 flex-wrap: nowrap;
}

.ama-util-btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 6px;
 min-width: 42px;
 min-height: 42px;
 padding: 0 10px;
 border-radius: 999px;
 border: 2px solid rgba(255, 255, 255, 0.72);
 background: transparent;
 color: #fff;
 font: 700 0.72rem system-ui, sans-serif;
 cursor: pointer;
 transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.ama-util-btn:hover {
 background: rgba(255, 255, 255, 0.12);
 border-color: rgba(214, 179, 106, 0.85);
}

.ama-util-btn[aria-pressed="true"] {
 background: rgba(214, 179, 106, 0.22);
 border-color: var(--ama-gold, #d6b36a);
 color: #ffe9a8;
}

.ama-util-btn--ghost {
 border-color: rgba(255, 255, 255, 0.35);
}

.ama-util-btn .app-refresh-btn__label,
.ama-util-btn .ama-theme-toggle__label,
.ama-util-btn .ama-study-focus-toggle__label,
.ama-util-btn .vi-guide-toggle__en {
 white-space: nowrap;
}

.ama-topbar-signin {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 min-height: 42px;
 padding: 0 16px;
 border-radius: 999px;
 border: 2px solid rgba(255, 255, 255, 0.35);
 background: linear-gradient(180deg, #ecd48a 0%, #c9a24a 48%, #a8842e 100%);
 color: #1a1200;
 font: 800 0.78rem system-ui, sans-serif;
 letter-spacing: 0.04em;
 text-transform: uppercase;
 cursor: pointer;
 box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
 flex-shrink: 0;
}

.ama-topbar-signin i {
 font-size: 1rem;
}

.ama-topbar-signin:hover {
 filter: brightness(1.05);
}

.ama-topbar-signin span {
 max-width: 88px;
 overflow: hidden;
 text-overflow: ellipsis;
}

@media (max-width: 720px) {
 .ama-util-btn .app-refresh-btn__label,
 .ama-util-btn .ama-theme-toggle__label,
 .ama-util-btn .ama-study-focus-toggle__label,
 .ama-util-btn .vi-guide-toggle__en {
 position: absolute;
 width: 1px;
 height: 1px;
 overflow: hidden;
 clip: rect(0, 0, 0, 0);
 }

 .ama-util-btn {
 width: 42px;
 padding: 0;
 }

 .ama-util-btn--ghost {
 display: none;
 }

 .ama-topbar-signin span {
 position: absolute;
 width: 1px;
 height: 1px;
 overflow: hidden;
 clip: rect(0, 0, 0, 0);
 }

 .ama-topbar-signin {
 width: 42px;
 padding: 0;
 justify-content: center;
 }
}

body.view-hub .top-main-nav-wrap {
 background: linear-gradient(180deg, #0b1733 0%, #132a52 100%);
 border-bottom: 2px solid rgba(214, 179, 106, 0.55);
 padding-bottom: 10px;
}

body.view-hub .ama-course-nav .ama-nav-pill {
 border: 2px solid rgba(214, 179, 106, 0.75);
 border-radius: 14px;
 background: rgba(11, 23, 51, 0.92);
 box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

body.view-hub .ama-course-nav .ama-nav-pill.active {
 background: linear-gradient(180deg, #ecd48a 0%, #c9a24a 55%, #b8923a 100%);
 border-color: rgba(255, 255, 255, 0.5);
 color: #1a1200;
}

body.view-hub .ama-course-nav .ama-nav-pill.active i {
 color: #1a1200 !important;
}

body.view-hub .ama-course-nav .ama-nav-pill:not(.active) i {
 color: #f4d78a !important;
}
