.hd-wrap { margin: 0 auto; padding: 6px 16px 0; }
.hd-wrap > .hd-word-info,
.hd-wrap > .rv-days-ctrl,
.hd-wrap > .hd-ctrl-bar-wrap,
.hd-wrap > .hd-viewer,
.hd-wrap > .hd-subs { max-width: 568px; margin-left: auto; margin-right: auto; }

.hd-levels {
    display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px;
    margin-bottom: 0;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hd-levels::-webkit-scrollbar { display: none; }
.hd-level-chip {
    flex-shrink: 0; padding: 6px 14px; border-radius: 20px;
    border: 1px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: var(--color-text-secondary,#64748b);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all .15s; white-space: nowrap;
}
.hd-level-chip.active { background: #6366f1; color: #fff; border-color: #6366f1; }

.hd-level-chip.hd-mylv-chip { border-color: #ec4899; color: #ec4899; }
.hd-level-chip.hd-mylv-chip.active { background: #ec4899; color: #fff; border-color: #ec4899; }

.hd-date-nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 10px;
}
.hd-nav-btn {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-decoration: none; padding: 10px 14px; border-radius: 12px;
    border: 1px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: var(--color-text-secondary,#64748b);
    font-size: 13px; font-weight: 600; transition: all .15s;
    min-width: 76px; text-align: center;
}
.hd-nav-btn:hover { border-color: #6366f1; color: #6366f1; }
.hd-nav-arrow { font-size: 20px; line-height: 1; color: var(--color-text-tertiary,#94a3b8); }
.hd-nav-btn:hover .hd-nav-arrow { color: #6366f1; }

.hd-center { text-align: center; flex: 1; }
.hd-center-date {
    font-size: 22px; font-weight: 900;
    color: var(--color-text-primary,#1e293b); letter-spacing: -0.5px;
}
.hd-center-badge {
    display: inline-block; font-size: 12px; font-weight: 700;
    color: #6366f1; background: rgba(99,102,241,.1);
    border-radius: 10px; padding: 2px 9px; margin-top: 3px;
}
.hd-center-row {
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.hd-goto-btns { display: flex; flex-direction: column; gap: 4px; }
.hd-goto-btn {
    display: block; padding: 4px 10px; border-radius: 16px;
    border: 1px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: var(--color-text-secondary,#64748b);
    font-size: 12px; font-weight: 600; cursor: pointer;
    text-decoration: none; text-align: center;
    transition: all .15s; white-space: nowrap;
    font-family: inherit; line-height: 1.5;
}
.hd-goto-btn:hover { border-color: #6366f1; color: #6366f1; }
.hd-date-picker-wrap { position: relative; }
#hdDateInput {
    position: absolute; opacity: 0; pointer-events: none;
    width: 0; height: 0; top: 100%; left: 0;
}

.hd-ctrl-bar-wrap {
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 8px;
    padding-bottom: 4px;
    cursor: grab;
}
.hd-ctrl-bar-wrap::-webkit-scrollbar { display: none; }
.hd-ctrl-bar-wrap:active { cursor: grabbing; }

.hd-ctrl-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 8px 12px;
    background: var(--color-background-secondary,#f8fafc);
    border: 1px solid var(--color-border-tertiary,#e2e8f0);
    border-radius: 14px;
    flex-wrap: nowrap;
    overflow: visible;
    width: max-content;
    min-width: 100%;
    box-sizing: border-box;
}

body:not(.hd-fs) .hd-ctrl-bar {
    padding: 0; border: 0; background: transparent; border-radius: 0;
}
.hd-ctrl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: var(--color-text-secondary,#64748b);
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
    min-width: 46px;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.hd-ctrl-btn.on {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}
.hd-ctrl-btn.auto-on {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.hd-ctrl-btn.hd-fs-open-btn { background: #ec4899; border-color: #ec4899; color: #fff; }
.hd-ctrl-btn.hd-fs-open-btn:active { background: #db2777; border-color: #db2777; }

@keyframes hdSongWiggle {
    0%, 100% { transform: rotate(-9deg) translateY(0); }
    25%      { transform: rotate(7deg)  translateY(-1px); }
    50%      { transform: rotate(-6deg) translateY(0); }
    75%      { transform: rotate(8deg)  translateY(-1px); }
}
#hdSongBtn.song-playing .hd-ctrl-icon i {
    display: inline-block;
    transform-origin: 50% 80%;
    animation: hdSongWiggle 1.1s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    #hdSongBtn.song-playing .hd-ctrl-icon i { animation: none; }
}
.hd-ctrl-icon { font-size: 15px; line-height: 1; }
.hd-ctrl-lbl  { font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: -0.2px; }

.hd-drop-wrap { flex-shrink: 0; }

.hd-drop {
    display: none;
    position: fixed;
    background: var(--color-background-primary,#fff);
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    border-radius: 14px;
    padding: 8px;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    flex-direction: column;
    gap: 4px;
    min-width: 80px;
}
.hd-drop.open { display: flex; }
.hd-drop-item {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary,#64748b);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    transition: all .12s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.hd-drop-item:hover,
.hd-drop-item.active {
    background: #6366f1;
    color: #fff;
}

.hd-drop-speed { min-width: 210px; }
.hd-speed-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.hd-speed-tag {
    width: 34px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-secondary,#64748b);
}
.hd-speed-bump {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: #6366f1;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.hd-speed-bump:active { background: #eef2ff; }
.hd-speed-val {
    min-width: 52px;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    color: var(--color-text-primary,#1e293b);
}
.hd-speed-badge {
    margin-top: 8px;
    width: 100%;
    padding: 9px 0;
    border-radius: 9px;
    border: none;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.hd-speed-confirm {
    background: #6366f1;
    color: #fff;
}
.hd-speed-confirm:active { background: #4f46e5; }
.hd-speed-reset {
    background: var(--color-background-secondary,#f1f5f9);
    color: var(--color-text-secondary,#64748b);
}
.hd-speed-reset:active { background: #e2e8f0; }

.hd-speed-close {
    background: var(--color-background-primary,#fff); color: var(--color-text-secondary,#64748b);
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
}
.hd-speed-foot { margin-top: 8px; }
.hd-speed-foot > .hd-speed-badge { margin-top: 0; width: auto; min-width: 0; }
.hd-speed-foot > .hd-speed-confirm { flex: 2 1 0; }
.hd-speed-foot > .hd-speed-close { flex: 1 1 0; }

.hd-auto-panel {
    display: none;
    position: fixed;
    background: var(--color-background-primary,#fff);
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    border-radius: 14px;
    padding: 14px;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    width: 360px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
}
.hd-auto-panel.open { display: block; }

.hd-auto-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.hd-auto-panel-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text-primary,#1e293b);
}
.hd-auto-panel-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: var(--color-background-secondary,#f1f5f9);
    color: var(--color-text-secondary,#64748b);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.hd-auto-panel-row { margin-bottom: 12px; }
.hd-auto-panel-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-secondary,#64748b);
    margin-bottom: 6px;
}

.hd-auto-count {
    font-size: 13px;
    font-weight: 800;
    color: #6366f1;
    margin-left: 4px;
}

.hd-auto-panel-opts { display: flex; gap: 6px; }
.hd-auto-opt {
    flex: 1;
    min-width: 40px;
    padding: 9px 4px;
    border-radius: 8px;
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: var(--color-text-secondary,#64748b);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.hd-auto-opt.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.hd-subread-line { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hd-subread-line:last-child { margin-bottom: 0; }
.hd-subread-line .hd-auto-opt { flex: 1 1 auto; }
.hd-subread-cnt { flex: 0 0 130px; }
.hd-subread-cnt .hd-bump-val { font-size: 15px; }
.hd-rep-name { flex: 1 1 auto; font-size: 14px; font-weight: 700; color: inherit; }

.hd-bump-ctrl { display: flex; align-items: center; gap: 8px; }
.hd-bump-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: #6366f1;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.hd-bump-btn:active { background: #eef2ff; }
.hd-bump-val {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    color: var(--color-text-primary,#1e293b);
}
.hd-bump-inf {
    flex-shrink: 0;
    width: 46px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: var(--color-text-secondary,#64748b);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.hd-bump-inf.active { background: #6366f1; border-color: #6366f1; color: #fff; }

.hd-row-disabled { opacity: 0.4; }
.hd-row-disabled .hd-auto-slider,
.hd-row-disabled .hd-bump-btn { pointer-events: none; cursor: not-allowed; }
.hd-timer-na {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-tertiary,#94a3b8);
    margin-left: 4px;
}

.hd-timer-slider-wrap {
    position: relative;
    width: 100%;
    padding: 6px 0;
}
.hd-auto-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: var(--color-border-secondary,#cbd5e1);
    outline: none;
    margin: 0;
    cursor: pointer;
    display: block;
}

.hd-auto-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
}
.hd-auto-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hd-timer-bubble {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
    border: 2px solid #fff;
    box-sizing: border-box;
    pointer-events: none;
}
.hd-auto-start {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #16a34a;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    margin-top: 4px;
    -webkit-tap-highlight-color: transparent;
}
.hd-auto-stop {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #dc2626;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    margin-top: 8px;
    -webkit-tap-highlight-color: transparent;
}

body:not(.hd-fs) .hd-auto-panel > .hd-auto-foot,
body.hd-fs .hd-fs-stage #hdAutoPanel > .hd-auto-foot {
    position: sticky;
    bottom: -14px;
    background: var(--color-background-primary,#fff);
    padding: 8px 0 14px;
    margin-bottom: -14px;
}

#hdAutoPanel > .hd-auto-foot { display: flex; gap: 8px; }
#hdAutoPanel > .hd-auto-foot .hd-auto-start,
#hdAutoPanel > .hd-auto-foot .hd-auto-stop { flex: 1 1 0; width: auto; margin-top: 0; }
.hd-auto-close {
    flex: 0 0 auto;
    padding: 12px 18px;
    border-radius: 10px;
    border: none;
    background: #dc2626;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.hd-ctrl-btn.flip-on {
    background: #f97316;
    border-color: #f97316;
    color: #fff;
}

.rv-days-ctrl {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 6px 8px; align-items: center;
    margin: 0 0 12px;
}
.rv-days-grp { display: flex; align-items: center; gap: 5px; }
.rv-days-lbl {
    font-size: 13px; font-weight: 700; width: 28px; flex-shrink: 0;
    color: var(--color-text-secondary,#64748b);
}
.rv-days-btn {
    width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff); color: var(--color-text-primary,#1e293b);
    font-size: 15px; font-weight: 700; cursor: pointer; line-height: 1; flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.rv-days-btn.off { opacity: .4; cursor: default; }
.rv-days-val {
    min-width: 34px; text-align: center; font-size: 14px; font-weight: 800;
    color: var(--color-text-primary,#1e293b);
}
.rv-days-val.on { color: #6366f1; }

.rv-days-date {
    font-size: 13px; font-weight: 700; white-space: nowrap; text-align: center;
    min-width: 60px; color: var(--color-text-primary,#1e293b);
}
.rv-days-date.zero { font-weight: 600; color: var(--color-text-tertiary,#94a3b8); }

.rv-tot-max {
    display: none;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 700;
    color: #dc2626;
    white-space: nowrap;
}
.rv-tot-max.show { display: block; }
.rv-tot {
    grid-row: span 2; border-radius: 8px; padding: 5px 10px; text-align: center;
    background: var(--color-background-secondary,#f8fafc);
}
.rv-tot.on { background: rgba(99,102,241,.10); }
.rv-tot-d { font-size: 14px; font-weight: 800; color: var(--color-text-primary,#1e293b); }
.rv-tot-w { font-size: 13px; font-weight: 700; color: var(--color-text-secondary,#64748b); }
.rv-tot.on .rv-tot-d, .rv-tot.on .rv-tot-w { color: #6366f1; }

.rv-days-apply {
    padding: 4px 12px; border-radius: 8px; white-space: nowrap; line-height: 1.3;
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff); color: var(--color-text-tertiary,#94a3b8);
    font-size: 13px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.rv-days-apply.on { border-color: #6366f1; background: #6366f1; color: #fff; }
.rv-days-restart {
    padding: 4px 12px; border-radius: 8px; white-space: nowrap; line-height: 1.3;
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff); color: var(--color-text-secondary,#64748b);
    font-size: 13px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.rv-restart-wrap { display: flex; align-items: center; gap: 4px; }
.rv-help-btn {
    width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%;
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff); color: var(--color-text-tertiary,#94a3b8);
    font-size: 13px; font-weight: 800; line-height: 1; cursor: pointer; padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.rv-help-btn:hover { border-color: #6366f1; color: #6366f1; }

.rv-reset-btn {
    width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%;
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff); color: var(--color-text-tertiary,#94a3b8);
    font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.rv-reset-btn:hover { border-color: #6366f1; color: #6366f1; }

.rv-reset-btn.off { opacity: .35; cursor: default; }

.rv-help-overlay {
    display: none; position: fixed; inset: 0; z-index: 1600;
    background: rgba(0,0,0,.5); align-items: center; justify-content: center; padding: 20px;
}
.rv-help-overlay.open { display: flex; }
.rv-help-box {
    background: var(--color-background-primary,#fff); border-radius: 16px;
    width: 100%; max-width: 400px; padding: 24px 22px 18px;
}
.rv-help-title { font-size: 19px; font-weight: 800; color: var(--color-text-primary,#1e293b); margin-bottom: 14px; }
.rv-help-body { font-size: 16px; line-height: 1.75; color: var(--color-text-secondary,#64748b); }
.rv-help-body strong { color: var(--color-text-primary,#1e293b); font-weight: 700; }
.rv-help-body p { margin: 0 0 12px; }
.rv-help-body p:last-child { margin-bottom: 0; }
.rv-help-close {
    width: 100%; margin-top: 18px; padding: 12px; border-radius: 10px; border: none;
    background: #6366f1; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
    font-family: inherit; -webkit-tap-highlight-color: transparent;
}

@media (max-width: 480px) {
    .rv-days-ctrl { gap: 5px 6px; }
    .rv-days-grp { gap: 4px; }
    .rv-days-lbl { width: 26px; }
    .rv-days-btn { width: 27px; height: 27px; }
    .rv-days-val { min-width: 30px; }
    .rv-tot { padding: 5px 7px; }
.rv-days-apply { padding: 4px 9px; }
    .rv-days-restart { padding: 4px 9px; }
    .rv-restart-wrap { gap: 3px; }
.rv-help-btn { width: 22px; height: 22px; }
    .rv-reset-btn { width: 22px; height: 22px; }
}

.hd-word-info {
    display: flex; align-items: center; gap: 10px;
    margin-top: 4px; margin-bottom: 6px; flex-wrap: nowrap;
}
.hd-word-meta {
    display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
    overflow-x: auto; flex: 1; min-width: 0;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hd-word-meta::-webkit-scrollbar { display: none; }
.hd-word-name {
    font-size: 22px; font-weight: 900;
    color: var(--color-text-primary,#1e293b); letter-spacing: -0.5px;
    white-space: nowrap;
}
.hd-word-phonetic {
    font-size: 14px; color: var(--color-text-tertiary,#94a3b8);
    font-family: serif; letter-spacing: 0.3px; white-space: nowrap;
}
.hd-audio-btn {
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    border: 1px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: var(--color-text-secondary,#64748b);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; transition: all .15s; flex-shrink: 0;
}
.hd-audio-btn:hover { border-color: #6366f1; color: #6366f1; }
.hd-tts-btn {
    padding: 5px 10px; border-radius: 20px; cursor: pointer;
    border: 1px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: var(--color-text-secondary,#64748b);
    font-size: 13px; font-weight: 600; transition: all .15s; flex-shrink: 0;
    font-family: inherit;
}
.hd-tts-btn:hover { border-color: #6366f1; color: #6366f1; }

.hd-fs-backdrop, .hd-fs-stage { display: none; }
body.hd-fs { overflow: hidden; }
body.hd-fs .hd-fs-backdrop { display: block; position: fixed; inset: 0; background: #000; z-index: 9990; }

body.hd-fs .hd-fs-stage {
    display: flex; align-items: stretch;
    position: fixed; top: 0; left: 0; z-index: 9995;
    width: 100dvh; height: 100dvw;
    transform-origin: top left;
    transform: translateX(100dvw) rotate(90deg);
    background: #000; overflow: hidden;
}

body.hd-fs .hd-fs-stage .hd-fs-taplayer {
    position: absolute; inset: 0; z-index: 10050;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.55);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.hd-fs-tapbox {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 22px; border-radius: 999px;
    background: rgba(15,23,42,.9); border: 1px solid rgba(255,255,255,.28);
    color: #fff; font-size: 17px; font-weight: 700; line-height: 1.3;
    pointer-events: none;
}
.hd-fs-tapbox svg { display: block; flex-shrink: 0; }

body.hd-fs .hd-fs-stage #hdViewer {
    height: 100%; width: auto; aspect-ratio: 3 / 2; flex: 0 0 auto;
    border: none; border-radius: 0;

    max-width: calc(100% - 120px);
}

body.hd-fs .hd-fs-stage.hd-fs-fit #hdViewer {
    height: auto; width: calc(100% - 120px); max-width: none;
    align-self: center;
}
body.hd-fs .hd-fs-stage #hdViewer .hd-card,
body.hd-fs .hd-fs-stage #hdViewer .hd-card img,
body.hd-fs .hd-fs-stage #hdViewer .hd-card video { border-radius: 0; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap {
    flex: 1 1 auto; height: 100%; width: auto; min-width: 120px;
    overflow-y: auto; overflow-x: hidden;
    background: rgba(15,23,42,.55); cursor: default;
    display: flex; flex-direction: column;
    box-sizing: border-box; padding: 0 0 8px;
}
body.hd-fs .hd-fs-stage .hd-ctrl-bar { flex: 1 1 auto; }
body.hd-fs .hd-fs-stage > .hd-ctrl-bar-wrap > .hd-fs-foot {
    flex: 0 0 auto; margin: 0 8px;
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 0; align-items: stretch;
}

body.hd-fs .hd-fs-stage .hd-fs-foot > * { flex: 0 0 calc(33.333% - 6px); max-width: calc(33.333% - 6px); }

body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow > .hd-fs-foot > * { flex: 0 0 100%; max-width: 100%; font-size: 13px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar {
    flex-direction: row; flex-wrap: wrap; align-items: stretch;
    align-content: flex-start; justify-content: space-between;
    gap: 8px; padding: 6px 8px 10px; min-height: 0; height: auto;

    width: 100%; max-width: 100%; min-width: 0;
    border: none; border-radius: 0; background: transparent;
}

body.hd-fs .hd-fs-stage .hd-ctrl-bar > * { flex: 0 0 100%; }
body.hd-fs .hd-fs-stage #hdShuffleBtn,
body.hd-fs .hd-fs-stage #hdBgnWrap,
body.hd-fs .hd-fs-stage #hdHelpBtn { flex: 0 0 calc(33.333% - 6px); max-width: calc(33.333% - 6px); }

.hd-fs-lbl { display: none; }
body.hd-fs .hd-fs-stage #hdHelpBtn .hd-ctrl-icon,
body.hd-fs .hd-fs-stage #hdHelpBtn .hd-ctrl-lbl,
body.hd-fs .hd-fs-stage #hdShuffleBtn .hd-ctrl-icon,
body.hd-fs .hd-fs-stage #hdShuffleBtn .hd-ctrl-lbl,
body.hd-fs .hd-fs-stage #hdBgnBtn .hd-ctrl-icon,
body.hd-fs .hd-fs-stage #hdBgnBtn .hd-ctrl-lbl { display: none; }
body.hd-fs .hd-fs-stage .hd-fs-lbl { display: inline; font-size: 15px; font-weight: 700; white-space: nowrap; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow .hd-fs-lbl { font-size: 13px; }

body.hd-fs .hd-fs-stage #hdTtsEnBtn,
body.hd-fs .hd-fs-stage #hdTtsKoBtn   { flex: 0 0 calc(22% - 6px); max-width: calc(22% - 6px); }
body.hd-fs .hd-fs-stage #hdSubBtnWrap { flex: 0 0 calc(56% - 12px); max-width: calc(56% - 12px); }

body.hd-fs .hd-fs-stage #hdTtsEnBtn .hd-ctrl-icon,
body.hd-fs .hd-fs-stage #hdTtsKoBtn .hd-ctrl-icon { display: none; }
body.hd-fs .hd-fs-stage #hdTtsEnBtn .hd-ctrl-lbl,
body.hd-fs .hd-fs-stage #hdTtsKoBtn .hd-ctrl-lbl,
body.hd-fs .hd-fs-stage #hdSubBtn .hd-ctrl-icon,
body.hd-fs .hd-fs-stage #hdSubBtn .hd-ctrl-lbl { white-space: nowrap; }

body.hd-fs .hd-fs-stage #hdSubBtn { padding: 10px 8px; }
body.hd-fs .hd-fs-stage #hdSubBtn .hd-ctrl-icon,
body.hd-fs .hd-fs-stage #hdSubBtn .hd-ctrl-lbl {
    width: auto; padding: 4px 9px; border-radius: 8px;
    font-size: 14px; line-height: 1.2;
}
body.hd-fs .hd-fs-stage #hdSubBtn { gap: 5px; }

body.hd-fs .hd-fs-stage #hdAutoBtn      { flex: 0 0 calc(40% - 6px); max-width: calc(40% - 6px); }
body.hd-fs .hd-fs-stage #hdSongBtnWrap  { flex: 0 0 calc(38% - 6px); max-width: calc(38% - 6px); }
body.hd-fs .hd-fs-stage #hdSongPlayBtn  { flex: 0 0 calc(22% - 4px); max-width: calc(22% - 4px); }

#hdSongBtnWrap, #hdSongPlayBtn { display: none; }
body.hd-fs .hd-fs-stage #hdSongBtnWrap { display: block; position: relative; }
body.hd-fs .hd-fs-stage #hdSongPlayBtn { display: flex; }
body.hd-fs .hd-fs-stage #hdSongPlayBtn .hd-ctrl-lbl { display: none; }

body.hd-fs .hd-fs-stage #hdAutoBtn.hd-auto-full { flex: 1 1 100%; max-width: 100%; }
body.hd-fs .hd-fs-stage #hdAutoBtn.hd-auto-full ~ #hdSongBtnWrap,
body.hd-fs .hd-fs-stage #hdAutoBtn.hd-auto-full ~ #hdSongPlayBtn { display: none; }

body.hd-fs .hd-fs-stage #hdSongBtnWrap { display: flex; align-items: stretch; }
body.hd-fs .hd-fs-stage #hdSongBtnWrap > .hd-ctrl-btn { width: 100%; flex: 1 1 auto; }
body.hd-fs .hd-fs-stage #hdSongBtn { position: relative; }
body.hd-fs .hd-fs-stage #hdSongBtn .hd-ctrl-icon { display: none; }
body.hd-fs .hd-fs-stage #hdSongBtn .hd-ctrl-lbl { white-space: nowrap; }

body.hd-fs .hd-fs-stage #hdSongBtn.song-playing .hd-ctrl-icon {
    display: block; position: absolute;
    left: 0; right: 0; top: 50%; transform: translateY(-50%);
    text-align: center; pointer-events: none;
    animation: hdSongSwapNote 4.5s ease-in-out infinite;
}

body.hd-fs .hd-fs-stage #hdSongBtn.song-playing .hd-ctrl-lbl {
    display: inline-block;
    transform-origin: 50% 80%;
    animation: hdSongSwapText 4.5s ease-in-out infinite,
               hdSongLblWiggle 1.1s ease-in-out infinite;
}
@keyframes hdSongSwapNote {
    0%, 44%  { opacity: 0; }
    50%, 94% { opacity: 1; }
    100%     { opacity: 0; }
}
@keyframes hdSongSwapText {
    0%, 44%  { opacity: 1; }
    50%, 94% { opacity: 0; }
    100%     { opacity: 1; }
}

@keyframes hdSongLblWiggle {
    0%, 100% { transform: rotate(-2.5deg); }
    50%      { transform: rotate(2.5deg); }
}
@media (prefers-reduced-motion: reduce) {
    body.hd-fs .hd-fs-stage #hdSongBtn.song-playing .hd-ctrl-icon { display: none; }
    body.hd-fs .hd-fs-stage #hdSongBtn.song-playing .hd-ctrl-lbl  { animation: none; }
}

.hd-song-pick {
    display: none; position: absolute; top: 0; right: 0; bottom: 0; left: auto;
    width: 50%; z-index: 50;
    background: rgba(12,12,18,.96);
    flex-direction: column; padding: 10px; box-sizing: border-box; gap: 8px;
    overflow: hidden;
}
.hd-song-pick.open { display: flex; }
.hd-song-pick-ttl {
    flex: 0 0 auto; font-size: 13px; font-weight: 700;
    color: rgba(255,255,255,.55); padding: 2px 0 0 4px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

.song-pick-x {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0; border-radius: 50%;
    background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.35);
    color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.song-pick-x:active { background: rgba(255,255,255,.2); }

.hd-song-pick-grid {
    flex: 1 1 auto; min-height: 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    align-content: start; overflow: hidden;
}
.hd-song-pick-item {
    text-align: center;
    padding: 10px 6px; border: 1px solid rgba(255,255,255,.14); border-radius: 9px;
    background: rgba(255,255,255,.06); color: #fff;
    font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hd-song-pick-item.sel { background: rgba(99,102,241,.55); border-color: rgba(165,180,252,.7); }
.hd-song-pick-item.back { background: rgba(255,255,255,.03); color: rgba(255,255,255,.75); font-weight: 400; }
.hd-song-pick-empty { grid-column: 1 / -1; padding: 16px 6px; color: rgba(255,255,255,.6); font-size: 14px; }

.hd-song-pick-acts {
    flex: 0 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.hd-song-pick-act {
    padding: 9px 6px; border: 1px solid rgba(255,255,255,.14); border-radius: 9px;
    background: rgba(255,255,255,.06); color: rgba(255,255,255,.92);
    font-size: 13px; font-weight: 700; line-height: 1.35;
    font-family: inherit; cursor: pointer; text-align: center;
}
.hd-song-pick-act.close {
    grid-column: 1 / -1;
    background: rgba(255,255,255,.03); color: rgba(255,255,255,.75); font-weight: 400;
}

.hd-song-stage {
    display: none; position: absolute; inset: 0; z-index: 40;
    pointer-events: none;
    background: transparent;
    flex-direction: column; justify-content: flex-end;
}
.hd-song-stage.open { display: flex; }
.hd-song-band {
    width: 100%; box-sizing: border-box; padding: 9px 14px;
    background: rgba(0,0,0,.42);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    text-align: center;
}

.hd-song-stage.open .hd-song-band {
    width: auto; margin-left: 112px; margin-right: 0;
    border-top-left-radius: 10px;
}

.hd-song-stage.hd-song-flipped .hd-song-band { display: none; }

.hd-song-count {
    position: absolute; right: 14px; top: 44%; transform: translateY(-50%);
    font-size: 22px; font-weight: 900; color: #fff; letter-spacing: .5px;
    text-shadow: 0 2px 6px rgba(0,0,0,.8), 0 0 2px rgba(0,0,0,.9);
}

.hd-card-count {
    display: block;
    position: absolute; right: 14px; top: calc(50% - 40px); transform: translateY(-50%);
    z-index: 30; pointer-events: none;
    font-size: 16px; font-weight: 800; color: #fff; letter-spacing: .5px;
    text-shadow: 0 2px 6px rgba(0,0,0,.8), 0 0 2px rgba(0,0,0,.9);
}
body.hd-fs .hd-fs-stage .hd-card-count { font-size: 22px; font-weight: 900; }
body.hd-fs .hd-fs-stage #hdSongStage.open ~ .hd-card-count { display: none; }
body:not(.hd-fs) .hd-song-count { display: none; }

.hd-bgn-box {
    display: none;
    position: absolute; inset: 0; z-index: 45;
    pointer-events: none;
    align-items: center; justify-content: center;
    padding: 0 18px; box-sizing: border-box;
}
.hd-bgn-box.open { display: flex; }
.hd-bgn-inner {
    max-width: 100%;
    padding: 14px 22px; border-radius: 16px;
    background: rgba(10,12,20,.62);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    text-align: center;
    animation: hdBgnIn .18s ease-out;
}
@keyframes hdBgnIn {
    from { opacity: 0; transform: scale(.94); }
    to   { opacity: 1; transform: none; }
}
.hd-bgn-en {
    font-size: 18px; font-weight: 600; color: rgba(255,255,255,.78);
    letter-spacing: 0; margin-bottom: 6px; white-space: nowrap;
}
.hd-bgn-ko {
    font-size: 32px; font-weight: 900; color: #fff;
    letter-spacing: 3px; white-space: nowrap; line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0,0,0,.7);
}

.hd-bgn-set + .hd-bgn-set {
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.22);
}
.hd-bgn-pos {
    font-size: 15px; font-weight: 700; color: rgba(255,255,255,.9);
    margin-bottom: 2px;
}
.hd-bgn-pos b { color: #ffd76a; font-weight: 800; margin-right: 4px; }

.hd-bgn-str {
    color: #ffd76a; font-weight: 900;
    font-size: 1.28em; line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,.85);
}

.hd-bgn-multi .hd-bgn-en { font-size: 15px; margin-bottom: 3px; }
.hd-bgn-multi .hd-bgn-ko { font-size: 26px; letter-spacing: 2px; }
body.hd-fs .hd-fs-stage .hd-bgn-en { font-size: 24px; }
body.hd-fs .hd-fs-stage .hd-bgn-ko { font-size: 46px; }
body.hd-fs .hd-fs-stage .hd-bgn-pos { font-size: 19px; }
body.hd-fs .hd-fs-stage .hd-bgn-multi .hd-bgn-en { font-size: 19px; }
body.hd-fs .hd-fs-stage .hd-bgn-multi .hd-bgn-ko { font-size: 36px; }
#hdViewer:has(.hd-card.hd-flipped) .hd-bgn-box { display: none; }

#hdViewer:has(.hd-card.hd-flipped) .hd-card-count,
#hdViewer:has(.hd-card.hd-flipped) .hd-song-count,
#hdViewer:has(.hd-card.hd-flipped) .hd-arrow { display: none; }
.hd-song-lyric {
    font-size: 20px; font-weight: 700; color: #fde047;
    line-height: 1.5; min-height: 26px; word-break: keep-all;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

body.hd-fs .hd-fs-stage .hd-review-btn { display: none !important; }

.hd-fs-speeds { display: none; }
body.hd-fs .hd-fs-stage #hdSpeedBtn .hd-fs-speeds {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 4px 8px; white-space: nowrap;
}
.hd-fs-speeds .hd-sp-item {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 800;
}
.hd-fs-speeds .hd-sp-badge {
    display: inline-block !important; font-style: normal;
    font-family: inherit !important;
    padding: 1px 6px; border-radius: 6px;

    background: #fff !important; color: #4338ca !important;
    border: 1px solid rgba(67,56,202,.35);
    font-size: 12px; font-weight: 800; line-height: 1.5;
    visibility: visible !important; opacity: 1 !important;
}

body.hd-fs .hd-fs-stage #hdSpeedBtn #hdSpeedLabel,
body.hd-fs .hd-fs-stage #hdSpeedBtn .hd-ctrl-lbl { display: none; }

body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap > .hd-ctrl-bar { flex-shrink: 0; }

.hd-fs-spd1 { display: none; pointer-events: none; }

body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdSpeedBtn .hd-fs-speeds { flex-direction: column; gap: 4px; }

body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdAutoBtn:not(.hd-auto-full) ~ .hd-drop-wrap #hdSpeedBtn .hd-fs-speeds,
body.hd-fs .hd-fs-stage.hd-fs-stack #hdAutoBtn:not(.hd-auto-full) ~ .hd-drop-wrap #hdSpeedBtn .hd-fs-speeds { display: none; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdAutoBtn:not(.hd-auto-full) ~ .hd-drop-wrap #hdSpeedBtn .hd-fs-spd1,
body.hd-fs .hd-fs-stage.hd-fs-stack #hdAutoBtn:not(.hd-auto-full) ~ .hd-drop-wrap #hdSpeedBtn .hd-fs-spd1 { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; }

body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow .hd-ctrl-bar > * { flex: 0 0 100%; max-width: 100%; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdShuffleBtn,
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdBgnWrap,
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdHelpBtn,
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdSubBtnWrap,
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdAutoBtn { flex: 0 0 100%; max-width: 100%; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdTtsEnBtn,
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdTtsKoBtn { flex: 1 1 0; max-width: calc(50% - 4px); min-width: 0; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdSongBtnWrap { flex: 1 1 0; max-width: calc(100% - 48px); min-width: 0; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdSongPlayBtn { flex: 0 0 40px; max-width: 40px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdSongBtn .hd-ctrl-lbl { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow .hd-ctrl-btn { min-height: 40px; padding: 5px 6px; gap: 5px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdSubBtn { min-height: 40px; padding: 4px 6px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdSubBtn .hd-ctrl-icon,
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow #hdSubBtn .hd-ctrl-lbl { padding: 4px 5px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow > .hd-fs-foot > * { min-height: 40px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow .hd-ctrl-btn .hd-ctrl-icon { font-size: 17px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow .hd-ctrl-btn .hd-ctrl-lbl  { font-size: 13px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow .hd-fs-adbox { min-height: 0; aspect-ratio: 3 / 2; }

body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-compact .hd-ctrl-btn { padding-left: 4px; padding-right: 4px; gap: 4px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-compact #hdSubBtn { padding-left: 4px; padding-right: 4px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-compact #hdSubBtn .hd-ctrl-icon,
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-compact #hdSubBtn .hd-ctrl-lbl { padding: 4px 6px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-compact .hd-ctrl-btn .hd-ctrl-lbl,
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-compact .hd-fs-lbl { font-size: 14px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-compact > .hd-fs-foot > * { font-size: 14px; padding-left: 4px; padding-right: 4px; }

body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow.hd-fs-tight1 #hdSpeedBtn .hd-fs-speeds { display: none; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-narrow.hd-fs-tight1 #hdSpeedBtn .hd-fs-spd1 { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; }

body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-tight2 > .hd-ctrl-bar { gap: 6px; padding-top: 4px; padding-bottom: 6px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-tight2 > .hd-fs-foot { row-gap: 6px; }
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-tight2 .hd-ctrl-btn,
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-tight2 #hdSubBtn,
body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-tight2 > .hd-fs-foot > * { min-height: 36px; padding-top: 3px; padding-bottom: 3px; }

body.hd-fs .hd-fs-stage .hd-ctrl-bar-wrap.hd-fs-notr * { transition: none !important; }

body.hd-fs .hd-fs-stage.hd-fs-stack { flex-direction: column; }
body.hd-fs .hd-fs-stage.hd-fs-stack #hdViewer { width: 100%; height: auto; max-width: none; flex: 0 0 auto; }
body.hd-fs .hd-fs-stage.hd-fs-stack .hd-ctrl-bar-wrap {
    position: relative; margin: 0;
    flex: 1 1 auto; width: 100%; height: auto; min-width: 0; min-height: 0;
    flex-direction: row; flex-wrap: wrap; align-content: flex-start; gap: 6px;
    padding: 6px;
}
body.hd-fs .hd-fs-stage.hd-fs-stack .hd-ctrl-bar,
body.hd-fs .hd-fs-stage.hd-fs-stack .hd-ctrl-bar-wrap > .hd-fs-foot { display: contents; }
body.hd-fs .hd-fs-stage.hd-fs-stack .hd-fs-adbox { position: absolute; left: 6px; bottom: 6px; min-height: 0; margin: 0; }
body.hd-fs .hd-fs-stage.hd-fs-stack .hd-ctrl-bar > *,
body.hd-fs .hd-fs-stage.hd-fs-stack .hd-ctrl-bar-wrap > .hd-fs-foot > *,
body.hd-fs .hd-fs-stage.hd-fs-stack #hdShuffleBtn,
body.hd-fs .hd-fs-stage.hd-fs-stack #hdBgnWrap,
body.hd-fs .hd-fs-stage.hd-fs-stack #hdHelpBtn,
body.hd-fs .hd-fs-stage.hd-fs-stack #hdTtsEnBtn,
body.hd-fs .hd-fs-stage.hd-fs-stack #hdTtsKoBtn,
body.hd-fs .hd-fs-stage.hd-fs-stack #hdSubBtnWrap,
body.hd-fs .hd-fs-stage.hd-fs-stack #hdAutoBtn,
body.hd-fs .hd-fs-stage.hd-fs-stack #hdSongBtnWrap { flex: 1 1 90px; max-width: none; margin: 0; }
body.hd-fs .hd-fs-stage.hd-fs-stack .hd-ctrl-btn,
body.hd-fs .hd-fs-stage.hd-fs-stack #hdSubBtn,
body.hd-fs .hd-fs-stage.hd-fs-stack .hd-ctrl-bar-wrap > .hd-fs-foot > * { min-height: 40px; padding-top: 4px; padding-bottom: 4px; }
body.hd-fs .hd-fs-stage.hd-fs-stack #hdSongPlayBtn { flex: 0 0 48px; max-width: 48px; }
body.hd-fs .hd-fs-stage.hd-fs-stack .hd-drop-wrap:has(> #hdSpeedBtn) { flex: 2 1 190px; }
body.hd-fs .hd-fs-stage.hd-fs-stack #hdSubBtnWrap { flex: 1 1 116px; }
body.hd-fs .hd-fs-stage.hd-fs-stack #hdAutoBtn:not(.hd-auto-full) ~ .hd-drop-wrap:has(> #hdSpeedBtn) { flex: 1 1 110px; }

.hd-fs-adbox { display: none; }
body.hd-fs .hd-fs-stage .hd-fs-adbox {
    display: block; flex: 0 0 100%; min-height: 132px;
    border: 1px dashed rgba(255,255,255,.28); border-radius: 10px;
    background: rgba(255,255,255,.07);
}
body.hd-fs .hd-fs-stage .hd-ctrl-btn,
body.hd-fs .hd-fs-stage .hd-drop-wrap,
body.hd-fs .hd-fs-stage .hd-fs-adbox { box-sizing: border-box; }
body.hd-fs .hd-fs-stage .hd-ctrl-btn {
    flex-direction: row; align-items: center; justify-content: center;
    gap: 8px; padding: 10px 8px; width: auto; min-width: 0; max-width: 100%;
}

body.hd-fs .hd-fs-stage .hd-drop-wrap { width: 100%; display: flex; }
body.hd-fs .hd-fs-stage .hd-drop-wrap > .hd-ctrl-btn { width: 100%; flex: 1 1 auto; }

body.hd-fs .hd-fs-stage #hdSpeedBtn .hd-fs-speeds,
body.hd-fs .hd-fs-stage #hdSpeedBtn .hd-fs-speeds * { pointer-events: none; }
body.hd-fs .hd-fs-stage .hd-ctrl-btn .hd-ctrl-icon { font-size: 20px; }
body.hd-fs .hd-fs-stage .hd-ctrl-btn .hd-ctrl-lbl  { font-size: 15px; font-weight: 700; }

body.hd-fs .hd-fs-stage .hd-ctrl-btn { min-height: 44px; padding: 7px 8px; }
body.hd-fs .hd-fs-stage #hdSubBtn    { min-height: 44px; padding: 5px 8px; }

body.hd-fs .hd-fs-stage .hd-drop {
    position: absolute !important;
    top: 50% !important; transform: translateY(-50%);
    right: 78px !important; left: auto !important; bottom: auto !important;
    z-index: 10001;

    max-height: calc(100% - 16px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}
body.hd-fs .hd-fs-stage .hd-drop::-webkit-scrollbar { display: none; }

body.hd-fs .hd-fs-stage #hdSubDrop {
    flex-direction: row; flex-wrap: wrap; align-content: flex-start;
    width: 300px; max-width: calc(100% - 16px);
}
body.hd-fs .hd-fs-stage #hdSubDrop > * { flex: 1 1 calc(50% - 2px); min-width: 0; }
body.hd-fs .hd-fs-stage #hdSubDrop > .hd-sub-sep,
body.hd-fs .hd-fs-stage #hdSubDrop > .hd-sub-full,
body.hd-fs .hd-fs-stage #hdSubDrop > .hd-sub-opt:last-child { flex: 1 1 100%; }

body.hd-fs .hd-fs-stage .hh-auto-demo {
    position: static !important; transform: none !important;
    width: auto !important; max-width: 100% !important; z-index: auto !important;
}

body.hd-fs .hd-fs-stage #hhOverlay {
    position: absolute !important; inset: 0 !important;
    z-index: 10003;
}
body.hd-fs .hd-fs-stage #hhOverlay .hd-modal-sheet {
    height: 92% !important; max-height: 92% !important;
    width: 92% !important; max-width: 92% !important;
}

body.hd-fs .hd-fs-stage #hdAutoPanel {
    position: absolute !important;
    top: 50% !important; left: 50% !important; right: auto !important; bottom: auto !important;
    transform: translate(-50%, -50%);

    width: min(640px, 92%) !important;
    max-width: 92% !important;
    max-height: 92% !important;
    z-index: 10002;
}

body.hd-fs .hd-fs-stage #hdAutoPanel.open {
    display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px 16px;
}
body.hd-fs .hd-fs-stage #hdAutoPanel > .hd-auto-panel-head,
body.hd-fs .hd-fs-stage #hdAutoPanel > .hd-auto-foot { flex: 1 1 100%; }
body.hd-fs .hd-fs-stage #hdAutoPanel > .hd-auto-panel-row { flex: 1 1 calc(50% - 8px); margin-bottom: 6px; }

body.hd-fs .hd-fs-stage .hd-auto-foot { display: flex; gap: 10px; margin-top: 4px; }
body.hd-fs .hd-fs-stage .hd-auto-foot .hd-auto-start,
body.hd-fs .hd-fs-stage .hd-auto-foot .hd-auto-stop { flex: 1 1 0; margin-top: 0; width: auto; }
body.hd-fs .hd-fs-open-btn { display: none !important; }

.hd-fs-open-btn { display: flex; }

body.hd-fs.hd-fs-pc .hd-fs-backdrop { background: rgba(0,0,0,0.75); }
body.hd-fs.hd-fs-pc .hd-fs-stage {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

body.hd-fs.hd-fs-pc:not(.hd-fs-sim) .hd-fs-stage .hd-fs-adbox,
body.hd-fs.hd-fs-pcfull .hd-fs-stage .hd-fs-adbox {
    aspect-ratio: 3 / 2;
    min-height: 0;
}

.hd-fsmenu {
    display: none;
    position: fixed; z-index: 10000;
    width: 168px; padding: 6px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.hd-fsmenu.open { display: block; }
.hd-fsmenu button {
    display: block; width: 100%; padding: 10px 12px;
    border: none; background: transparent; border-radius: 8px;
    font-family: inherit; font-size: 14px; font-weight: 700; color: #334155;
    text-align: left; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.hd-fsmenu button:hover { background: #f1f5f9; }

.hd-fsmenu-sep { height: 1px; margin: 6px 4px; background: #e2e8f0; }
.hd-fsmenu-ttl { padding: 2px 12px 6px; font-size: 13px; font-weight: 700; color: #94a3b8; }
.hd-fsmenu-ratios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.hd-fsmenu .hd-fsmenu-ratios button { padding: 8px 0; text-align: center; background: #f8fafc; }
.hd-fsmenu .hd-fsmenu-ratios button:hover { background: #eef2ff; color: #4338ca; }

body.hd-fs .hd-fs-stage .hd-fs-exit {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    position: static; box-sizing: border-box;
    flex: 0 0 100%; width: 100%; max-width: 100%; margin-top: 2px;
    padding: 10px 8px; border: none; border-radius: 12px;
    background: #ef4444; color: #fff; font-size: 14px; font-weight: 700;
    cursor: pointer; font-family: inherit;
}

body.hd-fs .hd-fs-stage .hd-fs-tog {
    display: flex; align-items: center; justify-content: center;
    min-width: 0; box-sizing: border-box; min-height: 44px;
    padding: 7px 6px; border: none; border-radius: 12px;
    background: #fff; color: #334155; font-size: 15px; font-weight: 700;
    cursor: pointer; font-family: inherit; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
body.hd-fs .hd-fs-stage .hd-fs-tog.on { background: #6366f1; color: #fff; }

body.hd-fs .hd-fs-stage .hd-fs-foot > .hd-fs-exit {
    flex: 0 0 calc(33.333% - 6px); width: auto; max-width: calc(33.333% - 6px);
    margin-top: 0; min-height: 44px; padding: 7px 6px; font-size: 15px; white-space: nowrap;
}

.hd-viewer {
    position: relative; overflow: hidden; width: 100%;
    border-radius: 16px;
    user-select: none; touch-action: pan-y;
    border: 1px solid var(--color-border-tertiary,#e2e8f0);
}
.hd-slider {
    display: flex;
    will-change: transform;
    transition: transform .32s cubic-bezier(.25,.46,.45,.94);
}
.hd-card { flex: 0 0 100%; width: 100%; position: relative; cursor: pointer; overflow: hidden; }
.hd-card img { width: 100% !important; max-width: 100% !important; height: 100% !important; object-fit: cover; display: block; pointer-events: none; border-radius: 16px; }
.hd-card video { width: 100% !important; max-width: 100% !important; height: 100% !important; object-fit: cover; display: none; pointer-events: none; border-radius: 16px; }

.hd-download-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    line-height: 1;
    color: #fff;
    background: rgba(0,0,0,0.35);
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s;
    -webkit-tap-highlight-color: transparent;
    z-index: 20;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-decoration: none;
}
.hd-download-btn:active { background: rgba(0,0,0,0.6); }

.hd-vphone-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    border: 1.5px solid rgba(255,255,255,0.3);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    z-index: 20;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    -webkit-tap-highlight-color: transparent;
}
.hd-vphone-btn.below { top: 50px; }
.hd-vphone-btn:active { background: rgba(0,0,0,0.6); }

.hd-tr { position: absolute; top: 10px; right: 10px; z-index: 20; display: flex; flex-direction: row-reverse; align-items: center; gap: 6px; }
.hd-tr .hd-download-btn,
.hd-tr .hd-vphone-btn { position: static; }
.hd-tr .hd-og-btn { display: inline-flex; gap: 0; }
.hd-song-chip {
    height: 32px; padding: 0 12px 0 10px;
    display: inline-flex; align-items: center; gap: 5px;
    border-radius: 16px;
    background: rgba(0,0,0,0.35); border: 1.5px solid rgba(255,255,255,0.3);
    color: #fff; font-size: 13px; font-weight: 700; font-family: inherit; line-height: 1; white-space: nowrap;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.hd-song-chip:active { background: rgba(0,0,0,0.6); }
.hd-song-chip.on { background: rgba(99,102,241,0.45); border-color: rgba(165,180,252,0.7); backdrop-filter: none; -webkit-backdrop-filter: none; text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.hd-song-chip.on .hd-song-chip-ic svg { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6)); }
.hd-song-chip-ic svg { display: block; }
.hd-song-chip.off,
body.hd-fs .hd-song-chip { display: none; }
.hd-song-wrap { position: relative; display: inline-flex; }
.hd-song-off {
    display: none; position: absolute; top: calc(100% + 6px); right: 0;
    height: 30px; padding: 0 12px; align-items: center;
    border-radius: 15px; background: rgba(0,0,0,0.35); border: 1.5px solid rgba(255,255,255,0.3);
    color: #fff; font-size: 13px; font-weight: 700; font-family: inherit; line-height: 1; white-space: nowrap;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.hd-song-off.show { display: inline-flex; }
.hd-song-off:active { background: rgba(0,0,0,0.6); }
.hd-song-chip.off ~ .hd-song-off,
body.hd-fs .hd-song-off { display: none; }
@media (max-width: 480px) {
    body:not(.hd-fs) #hdViewer:has(.hd-song-off.show) .hd-card-count { display: none; }
}

@media (max-width: 600px) {
    body:not(.hd-fs) .hd-og-btn .hd-og-l2 { display: none; }
}

.hd-vphone-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.hd-vphone-overlay.open { display: flex; }
.hd-vphone-inner { position: relative; display: inline-block; line-height: 0; }
.hd-vphone-overlay video {
    max-height: 92vh;
    max-width: 96vw;
    width: auto;
    height: auto;
    border-radius: 16px;
    background: #000;
    display: block;
}
.hd-vphone-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}

.hd-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 9;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;

    padding: 15% 12px 12px;
    box-sizing: border-box;
}

.hd-overlay-word {
    position: static;
    max-width: 100%;
    margin-bottom: 8px;
    text-align: left;
    font-size: 26px; font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,0.7);
    letter-spacing: 0.5px;
    font-family: serif;
    line-height: 1.2;
    word-break: break-all;
    pointer-events: none;
    display: none;
}

.hd-overlay-word.hd-ov-word-fallback {
    font-size: 22px; font-weight: 900;
    letter-spacing: -0.5px; font-family: inherit;
}
.hd-overlay-meaning {
    position: static;
    transform: none;
    font-size: 15px; font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,0.7);
    line-height: 1.6;
    display: none;
    max-width: 60%;
}

.hd-mean-pos { line-height: 1.5; }
.hd-overlay-meaning .dic-vg-pos { text-shadow: none; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.hd-mean-pos + .hd-mean-li { margin-top: 3px; }
.hd-mean-li + .hd-mean-pos { margin-top: 6px; }

.hd-pause-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    z-index: 12;
    pointer-events: none;
}
.hd-pause-overlay.show { display: flex; }

.hd-detail-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.35);
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 4px 10px;
    text-decoration: none;
    letter-spacing: -0.2px;
    transition: all .15s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    z-index: 10;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.hd-detail-btn:active { background: rgba(0,0,0,0.6); }

.hd-detail-btn:hover,
.hd-detail-btn:focus { color: #fde047; border-color: rgba(253,224,71,0.55); }

.hd-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: transparent; border: none;
    font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 5; opacity: 0;
}
.hd-arrow-prev { left: 10px; }
.hd-arrow-next {
    right: 12px;
    opacity: 1;
    width: 52px; height: 52px;
    background: rgba(0,0,0,0.12);
    border: 1.5px solid rgba(255,255,255,0.32);
    color: #fff;
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
    transition: background .15s;
    -webkit-tap-highlight-color: transparent;
}
.hd-arrow-next:hover  { background: rgba(0,0,0,0.30); }
.hd-arrow-next:active { background: rgba(0,0,0,0.45); }
.hd-arrow-next svg { display: block; }
.hd-arrow.hd-hidden { display: none; }

.hd-subs { display: none; margin: 6px 0 0; }
.hd-sub-line {
    display: none; position: relative;
    overflow-x: auto; overflow-y: hidden;
    white-space: nowrap; padding: 3px 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hd-sub-line::-webkit-scrollbar { display: none; }
.hd-sub-track { display: inline-block; white-space: nowrap; }
.hd-sub-text { display: inline-block; padding-right: 48px; }
#hdSubEn .hd-sub-text { font-size: 14px; font-weight: 600; color: var(--color-text-primary,#1e293b); }
#hdSubKo .hd-sub-text { font-size: 14px; font-weight: 500; color: var(--color-text-secondary,#64748b); }

#hdSubs.hd-sub-flat .hd-sub-line {
    overflow-x: hidden; white-space: normal;
}
#hdSubs.hd-sub-flat .hd-sub-track {
    display: block; white-space: normal;
}
#hdSubs.hd-sub-flat .hd-sub-text {
    display: block; padding-right: 0;
    white-space: normal; word-break: keep-all; overflow-wrap: break-word;
    line-height: 1.5;
}
#hdSubs.hd-sub-flat #hdSubEn .hd-sub-text,
#hdSubs.hd-sub-flat #hdSubKo .hd-sub-text {
    font-size: calc(14px * var(--hd-sub-fs, 1.5));
}

.hd-sub-arr-box { display: none; }
#hdSubs.hd-sub-arr .hd-sub-arr-box { display: block; padding: 4px 0 2px; }
.hd-arr-item + .hd-arr-item { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--color-border-tertiary,#e2e8f0); }
.hd-arr-ko {
    font-size: max(13px, calc(10px * var(--hd-sub-fs, 1.5)));
    font-weight: 600; line-height: 1.5; color: var(--color-text-primary,#1e293b);
    margin-bottom: 8px; word-break: keep-all; overflow-wrap: break-word;
}
.hd-sub-opt:disabled,
.hd-speed-bump:disabled { opacity: .4; cursor: default; }

#hdSubBtn { padding: 0; gap: 0; overflow: hidden; }
#hdSubBtn .hd-ctrl-icon,
#hdSubBtn .hd-ctrl-lbl {
    display: block; width: 100%; box-sizing: border-box;
    padding: 6px 10px; text-align: center;
    font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: -0.2px;
    white-space: nowrap;
}

body:not(.hd-fs) #hdSubBtnWrap {
    align-self: stretch; display: flex;
}
body:not(.hd-fs) #hdSubBtnWrap > #hdSubBtn {
    flex: 1 1 auto; height: auto;
}
body:not(.hd-fs) #hdSubBtn .hd-ctrl-icon,
body:not(.hd-fs) #hdSubBtn .hd-ctrl-lbl {
    display: flex; align-items: center; justify-content: center;
    flex: 1 1 0; min-height: 0; padding: 3px 10px;
}
body:not(.hd-fs) #hdSubBtn .hd-ctrl-icon { border-bottom: 1px solid rgba(128,128,128,.4); }
body:not(.hd-fs) #hdSubBtn .hd-ctrl-lbl  { border-top: 1px solid rgba(128,128,128,.4); }
body:not(.hd-fs) #hdSubBtn .hd-ctrl-icon.hd-sub-on { border-bottom-color: rgba(255,255,255,.55); }
body:not(.hd-fs) #hdSubBtn .hd-ctrl-lbl.hd-sub-on  { border-top-color: rgba(255,255,255,.55); }
#hdSubBtn .hd-sub-on { background: #6366f1; color: #fff; }

body.hd-fs .hd-fs-stage #hdSubs {
    position: absolute; left: 0; right: 0; bottom: 0;
    z-index: 41; margin: 0;
    pointer-events: auto;

    border-top-left-radius: 0;
    overflow: hidden;
}
body.hd-fs .hd-fs-stage .hd-sub-line {
    overflow: hidden; padding: 6px 14px;
    background: rgba(0,0,0,.42);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}

body.hd-fs .hd-fs-stage #hdSubs.hd-sub-flat .hd-sub-line { overflow: visible; }
body.hd-fs .hd-fs-stage #hdSubEn .hd-sub-text { font-size: 17px; font-weight: 700; color: #fff; }
body.hd-fs .hd-fs-stage #hdSubKo .hd-sub-text { font-size: 16px; font-weight: 600; color: rgba(255,255,255,.88); }

body.hd-fs .hd-fs-stage #hdSubs.hd-sub-flat #hdSubEn .hd-sub-text {
    font-size: calc(17px * var(--hd-sub-fs, 1.5));
}
body.hd-fs .hd-fs-stage #hdSubs.hd-sub-flat #hdSubKo .hd-sub-text {
    font-size: calc(16px * var(--hd-sub-fs, 1.5));
}

body.hd-fs .hd-fs-stage #hdSongStage { padding-bottom: var(--hd-ov-h, 0px); }

body.hd-fs .hd-fs-stage .hd-meaning-btn { top: 10px; bottom: auto; }
body.hd-fs .hd-fs-stage .hd-detail-btn  { top: 46px; bottom: auto; }

body.hd-fs .hd-fs-stage .hd-card-back-content { touch-action: none; }
body.hd-fs .hd-fs-stage .hd-song-stage.open .hd-song-band { margin-left: 0; border-top-left-radius: 0; }

body.hd-fs .hd-fs-stage #hdSubs.hd-sub-arr {
    margin-left: 0;
    overflow: visible;
    border-top-left-radius: 0;
}
body.hd-fs .hd-fs-stage #hdSubs.hd-sub-arr .hd-sub-arr-box {
    max-height: var(--hd-arr-max, 240px);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; box-sizing: border-box;
    border-top-left-radius: 0;
    padding: 8px 12px 10px;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
body.hd-fs .hd-fs-stage #hdSubs.hd-sub-arr .hd-sub-arr-box::-webkit-scrollbar { display: none; }

.hd-sub-arr-xbar { display: none; }
body.hd-fs .hd-fs-stage #hdSubs.hd-sub-arr .hd-sub-arr-xbar { display: block; height: 0; }
body.hd-fs .hd-fs-stage .hd-sub-arr-x {
    position: absolute; top: -40px; right: 10px; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0; border-radius: 50%;
    background: rgba(0,0,0,.55); border: 1.5px solid rgba(255,255,255,.45);
    color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
body.hd-fs .hd-fs-stage .hd-sub-arr-x:active { background: rgba(0,0,0,.75); }
body.hd-fs .hd-fs-stage .hd-arr-ko { color: #fde68a; }
body.hd-fs .hd-fs-stage .hd-arr-item + .hd-arr-item { border-top-color: rgba(255,255,255,.25); }
body.hd-fs .hd-fs-stage #hdSubArr .sa-slot { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }
body.hd-fs .hd-fs-stage #hdSubArr .sa-slot:empty::before { color: rgba(255,255,255,.7); }
body.hd-fs .hd-fs-stage #hdSubArr .sa-box.sa-ok .sa-slot { background: rgba(99,102,241,.3); border-color: #a5b4fc; }
body.hd-fs .hd-fs-stage #hdSubArr .sa-msg { color: rgba(255,255,255,.78); }
body.hd-fs .hd-fs-stage #hdSubArr .sa-box.sa-ok  .sa-t { color: #c7d2fe; }
body.hd-fs .hd-fs-stage #hdSubArr .sa-box.sa-bad .sa-t { color: #fca5a5; }

body.hd-fs .hd-fs-stage #hdSongStage.hd-song-flipped ~ #hdSubs { display: none !important; }
.hd-sub-opt {
    display: block; width: 100%; padding: 8px 12px; border-radius: 9px;
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: var(--color-text-secondary,#64748b);
    font-size: 14px; font-weight: 700; font-family: inherit;
    cursor: pointer; white-space: nowrap;
}
.hd-sub-opt.on { background: #6366f1; border-color: #6366f1; color: #fff; }
.hd-sub-sep { font-size: 12px; font-weight: 700; color: #94a3b8; padding: 4px 2px 0; }

.hd-drop-foot { display: flex; gap: 6px; }
.hd-drop-foot > .hd-sub-opt { flex: 2 1 0; width: auto; min-width: 0; }
.hd-drop-foot > .hd-drop-close { flex: 1 1 0; }

body:not(.hd-fs) #hdSubDrop.open {
    display: grid; grid-template-columns: 1fr 1fr; column-gap: 6px; row-gap: 5px;
    align-items: center; width: 290px; max-width: calc(100vw - 16px); box-sizing: border-box;
}
body:not(.hd-fs) #hdSubDrop > .hd-sub-sep,
body:not(.hd-fs) #hdSubDrop > .hd-sub-full { grid-column: 1 / -1; }
body:not(.hd-fs) #hdSubDrop > .hd-sub-sep.hd-sub-inline { grid-column: auto; padding: 0 2px; font-size: 13px; }
body:not(.hd-fs) #hdSubDrop .hd-sub-opt { padding-left: 8px; padding-right: 8px; }
body:not(.hd-fs) #hdSubDrop .hd-speed-row { gap: 4px; }
body:not(.hd-fs) #hdSubDrop .hd-speed-val { min-width: 44px; }

.hd-sub-pop { position: fixed; inset: 0; z-index: 9800; background: rgba(15,23,42,.62); display: none; align-items: center; justify-content: center; padding: 20px; -webkit-tap-highlight-color: transparent; }
.hd-sub-pop.open { display: flex; }
.hd-sub-pop-box { position: relative; background: var(--color-background-primary,#fff); border-radius: 18px; width: 100%; max-width: 460px; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 26px 22px 22px; box-shadow: 0 12px 40px rgba(0,0,0,.32); }
.hd-sub-pop-close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--color-background-secondary,#f1f5f9); color: var(--color-text-secondary,#64748b); font-size: 15px; cursor: pointer; line-height: 1; font-family: inherit; }
.hd-sub-pop-en { font-size: 19px; font-weight: 700; line-height: 1.75; color: var(--color-text-primary,#1e293b); word-break: keep-all; }
.hd-sub-pop-ko { font-size: 17px; font-weight: 500; line-height: 1.75; color: var(--color-text-secondary,#64748b); word-break: keep-all; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--color-border-tertiary,#e2e8f0); }
.hd-sub-w { cursor: pointer; border-bottom: 1px dashed rgba(99,102,241,.4); }

body.hd-fs .hd-fs-stage #hdSubEn .hd-sub-w { border-bottom-color: rgba(255,255,255,.45); }

.hd-sub-pop .dwt-tip { position: absolute; }

body.hd-fs .hd-fs-stage > .dwt-tip { position: absolute; z-index: 10050; }
.hd-thumbs {
    display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    cursor: grab;
}
.hd-thumbs::-webkit-scrollbar { display: none; }
.hd-thumbs:active { cursor: grabbing; }
.hd-thumb {
    width: 64px; height: 64px; flex-shrink: 0;
    border-radius: 10px; overflow: hidden; cursor: pointer;
    border: 2.5px solid transparent; transition: border-color .15s;
    background: var(--color-background-secondary,#f1f5f9);
}
.hd-thumb.active { border-color: #6366f1; }
.hd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.hd-thumb-empty {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; font-size: 20px; color: var(--color-text-tertiary,#94a3b8);
}

.hd-card { perspective: 1000px; }
.hd-card-inner {
    position: relative; width: 100%;
    transition: transform 0.45s cubic-bezier(.4,0,.2,1);
    transform-style: preserve-3d;
}
.hd-card.hd-flipped .hd-card-inner { transform: rotateY(180deg); }
.hd-card-front {
    position: relative; width: 100%;
    aspect-ratio: 3 / 2;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    z-index: 2; overflow: hidden;
}
.hd-card-back {
    position: absolute; inset: 0;
    transform: rotateY(180deg);
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    z-index: 1;
    background: transparent;
    border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: column; justify-content: flex-start;

    --hd-thumbbar-h: 52px;
}
.hd-card-back-bg {
    position: absolute; inset: 0; z-index: 0;
}
.hd-card-back-bg img {
    width: 100% !important; height: 100% !important;
    object-fit: cover; display: block;
    filter: blur(6px) brightness(0.55);
    transform: scale(1.08);
    pointer-events: none;
}
.hd-card-back-content {
    position: relative; z-index: 1;
    overflow-y: auto; flex: 1; min-height: 0;
    padding: 20px 18px; box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}
@media (hover: hover) and (pointer: fine) {
    .hd-card-back-content { cursor: grab; }
    .hd-card-back-content.hd-back-grabbing { cursor: grabbing; user-select: none; }
}
.hd-meaning-btn {
    position: absolute; bottom: 46px; left: 10px; z-index: 10;
    padding: 5px 12px; border-radius: 20px;
    background: rgba(0,0,0,0.42); color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    font-size: 13px; font-weight: 700; cursor: pointer;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    transition: background .15s;
}
.hd-back-word { font-size: 26px; font-weight: 900; color: #fff; margin-bottom: 4px; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.hd-back-phonetic { font-size: 14px; color: rgba(255,255,255,0.7); font-family: serif; margin-bottom: 14px; }
.hd-back-pos { font-size: 13px; font-weight: 700; color: #a5b4fc; margin-bottom: 4px; }
.hd-back-meaning { font-size: 15px; color: rgba(255,255,255,0.92); line-height: 1.7; margin-bottom: 6px; }
.hd-back-ex { margin: 0 0 12px 12px; }
.hd-back-ex-en { font-size: 14px; color: rgba(255,255,255,0.78); line-height: 1.55; }
.hd-back-ex-ko { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.5; margin-top: 2px; }
.hd-back-loading { font-size: 14px; color: rgba(255,255,255,0.6); text-align: center; padding: 20px 0; }

.hd-back-thumbs {
    position: relative; z-index: 2;
    display: none; flex: 0 0 auto;
    height: var(--hd-thumbbar-h); box-sizing: border-box;
    gap: 6px; padding: 7px 10px;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    background: rgba(0,0,0,0.3);
}
.hd-card-back.has-thumbs .hd-back-thumbs { display: flex; }
.hd-back-thumb {
    flex: 0 0 auto; width: 52px; height: 38px;
    padding: 0; border-radius: 6px; overflow: hidden;
    border: 2px solid transparent; cursor: pointer;
    background: rgba(255,255,255,0.08);
}
.hd-back-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hd-back-thumb.active { border-color: rgba(255,255,255,0.85); }

.hd-back-zoom {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 5;
    display: none; background: #000;
    overflow: hidden;
}

.hd-card-back.has-thumbs .hd-back-zoom { bottom: var(--hd-thumbbar-h); }
.hd-back-zoom.open { display: block; }
.hd-back-zoom img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hd-back-zoom-close {
    position: absolute; top: 10px; right: 10px;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.3);
    color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.hd-back-close {
    position: absolute; top: 10px; right: 10px;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.8); font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.hd-status-bar {
    display: flex; gap: 6px; margin-bottom: 12px;
}
.hd-sb-item {
    flex: 1; text-align: center; padding: 10px 4px; border-radius: 10px;
    border: 1.5px solid; cursor: pointer; transition: all .15s;
    -webkit-tap-highlight-color: transparent;
}
.hd-sb-item .hd-sb-n {
    display: block; font-size: 20px; font-weight: 800; line-height: 1.2; margin-bottom: 2px;
}
.hd-sb-item { display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.hd-sb-lbl { font-size: 12px; color: var(--color-text-secondary,#64748b); font-weight: 500;
    display: flex; flex-direction: column; align-items: center; gap: 3px; white-space: nowrap; }
.hd-sb-item.know    .hd-sb-lbl .dic-vg-bar { color: #16a34a; }
.hd-sb-item.vague   .hd-sb-lbl .dic-vg-bar { color: #ca8a04; }
.hd-sb-item.unknown .hd-sb-lbl .dic-vg-bar { color: #dc2626; }
.hd-sb-lbl .dic-vg-bar { display: block; flex: 0 0 auto; }
.hd-sb-item.total     { background: var(--color-background-secondary,#f8fafc); border-color: var(--color-border-secondary,#cbd5e1); }
.hd-sb-item.total     .hd-sb-n { color: var(--color-text-primary,#1e293b); }
.hd-sb-item.unstudied { background: #eff6ff; border-color: #bfdbfe; }
.hd-sb-item.unstudied .hd-sb-n { color: #1d4ed8; }
.hd-sb-item.know      { background: #f0fdf4; border-color: #86efac; }
.hd-sb-item.know      .hd-sb-n { color: #16a34a; }
.hd-sb-item.vague     { background: #fefce8; border-color: #fde047; }
.hd-sb-item.vague     .hd-sb-n { color: #ca8a04; }
.hd-sb-item.unknown   { background: #fff1f2; border-color: #fca5a5; }
.hd-sb-item.unknown   .hd-sb-n { color: #dc2626; }
.hd-sb-item.sel       { outline: 2.5px solid #6366f1; outline-offset: 1px; }
.hd-sb-item.hd-sb-off { opacity: .35; cursor: not-allowed; }

.hd-vband-row {
    display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding: 2px 0 4px; margin-bottom: 12px;
    cursor: grab;
}
.hd-vband-row:active { cursor: grabbing; }
.hd-vband-row::-webkit-scrollbar { display: none; }
.hd-vband-chip {
    display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
    padding: 7px 13px; border-radius: 18px;
    border: 1.5px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: var(--color-text-secondary,#64748b);
    font-size: 13px; font-weight: 700; cursor: pointer;
    font-family: inherit; white-space: nowrap; transition: all .15s;
    -webkit-tap-highlight-color: transparent;
}
.hd-vband-chip.active { border-color: #6366f1; color: var(--color-text-primary,#1e293b); }
.hd-vband-chip.disabled { opacity: .35; cursor: not-allowed; }
.hd-vb-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.hd-vb-ico { display: flex; flex-shrink: 0; }
.hd-vb-ico .dic-vg-bar { display: block; }
.hd-vb-cnt { font-weight: 800; }

.hd-games-wrap {
    margin-bottom: 14px;
}
.hd-games-title {
    font-size: 14px; font-weight: 700;
    color: var(--color-text-secondary,#64748b);
    margin-bottom: 8px;
}
.hd-games-grid {
    display: flex; gap: 7px; overflow-x: auto; flex-wrap: nowrap;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 1px 4px;
    cursor: grab;
}
.hd-games-grid::-webkit-scrollbar { display: none; }
.hd-games-grid:active { cursor: grabbing; }
.hd-game-btn {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 9px 12px; border-radius: 12px; flex-shrink: 0;
    border: 1px solid var(--color-border-tertiary,#e2e8f0);
    background: var(--color-background-primary,#fff);
    text-decoration: none; transition: all .15s; cursor: pointer; min-width: 64px;
}
.hd-game-btn:hover {
    border-color: #6366f1; background: rgba(99,102,241,.04);
    transform: translateY(-1px);
}
.hd-game-icon { font-size: 20px; line-height: 1; }
.hd-game-lbl  { font-size: 12px; font-weight: 600; color: var(--color-text-secondary,#64748b); white-space: nowrap; }
.hd-game-dt { border-color: #c7d2fe; background: #eef2ff; }
.hd-game-dt .hd-game-icon { display: flex; align-items: center; justify-content: center; height: 20px; color: #4f46e5; }
.hd-game-dt .hd-game-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hd-game-dt .hd-game-lbl { color: #3730a3; }

#rvTot { cursor: pointer; }
.rv-days-note {
    font-size: 13px; color: #b45309; background: #fffbeb;
    border-radius: 10px; padding: 9px 12px; margin-bottom: 12px;
}
.rv-days-grid {
    display: grid; gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
}
.rv-day-cell {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 9px 4px; border-radius: 10px;
    border: 1.5px solid #e2e8f0; background: #f8fafc;
}
.rv-day-cell .rv-day-d { font-size: 15px; font-weight: 800; color: #334155; }
.rv-day-cell .rv-day-t { font-size: 12px; font-weight: 700; color: #94a3b8; }
.rv-day-cell.base { border-color: #6366f1; background: rgba(99,102,241,.08); }
.rv-day-cell.base .rv-day-d { color: #4f46e5; }
.rv-day-cell.base .rv-day-t { color: #6366f1; }
.rv-day-cell.past .rv-day-t { color: #ec4899; }
.rv-day-cell.fwd  .rv-day-t { color: #0ea5e9; }
.hd-modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1500;
    background: rgba(0,0,0,.5);
    align-items: flex-end; justify-content: center;
}
.hd-modal-overlay.open { display: flex; }
.hd-modal-sheet {
    background: var(--color-background-primary,#fff);
    border-radius: 20px 20px 0 0;
    width: 100%; max-width: 640px; max-height: 85vh;
    display: flex; flex-direction: column; overflow: hidden;
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.25,.46,.45,.94);
}
.hd-modal-overlay.open .hd-modal-sheet { transform: translateY(0); }
.hd-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 12px; flex-shrink: 0;
    border-bottom: 1px solid var(--color-border-tertiary,#e2e8f0);
}
.hd-modal-title { font-size: 16px; font-weight: 800; color: var(--color-text-primary,#1e293b); }
.hd-modal-close {
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-secondary,#f8fafc);
    color: var(--color-text-secondary,#64748b);
    font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.hd-modal-close:hover { border-color: #6366f1; color: #6366f1; }
.hd-modal-body {
    flex: 1; overflow-y: auto; padding: 14px 16px 32px;
    -webkit-overflow-scrolling: touch;
}
.hd-modal-loading { text-align: center; padding: 40px 0; color: var(--color-text-tertiary,#94a3b8); font-size: 14px; }
.hd-tabs { display: flex; margin: 14px 0 16px; border-bottom: 2px solid var(--color-border-tertiary,#e2e8f0); }
.hd-tab-btn {
    padding: 9px 18px; border: none; background: none; font-size: 14px; font-weight: 700;
    color: var(--color-text-secondary,#64748b); cursor: pointer; font-family: inherit;
    border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s;
    display: flex; align-items: center; gap: 6px;
    -webkit-tap-highlight-color: transparent;
}
.hd-tab-btn.active { color: #6366f1; border-bottom-color: #6366f1; }
.hd-tab-btn:hover:not(.active) { color: var(--color-text-primary,#1e293b); }
.hd-tab-btn svg { flex-shrink: 0; }
@media (max-width: 600px) {
    .hd-tab-btn { flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 4px; padding: 8px 4px; line-height: 1.3; text-align: center; word-break: keep-all; }
}
.hd-tab-panel { display: none; padding-bottom: 24px; }
.hd-tab-panel.open { display: block; }
.hd-tab-panel.loading { min-height: 100vh; }
#hdWordlistBody .hw-lv-chips,
#hdConvBody .dc-lv-chips { display: none; }

.hd-empty {
    text-align: center; padding: 60px 20px;
    color: var(--color-text-tertiary,#94a3b8);
}
.hd-empty-icon { font-size: 52px; margin-bottom: 14px; }
.hd-empty-title {
    font-size: 17px; font-weight: 700;
    color: var(--color-text-secondary,#64748b); margin-bottom: 8px;
}
.hd-empty-sub { font-size: 14px; }
.hd-empty-nav {
    display: flex; justify-content: center; gap: 10px; margin-top: 20px;
}
.hd-empty-btn {
    padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 600;
    border: 1px solid var(--color-border-secondary,#cbd5e1);
    background: var(--color-background-primary,#fff);
    color: var(--color-text-secondary,#64748b);
    text-decoration: none; transition: all .15s;
}
.hd-empty-btn:hover { border-color: #6366f1; color: #6366f1; }
button.hd-empty-btn { font-family: inherit; cursor: pointer; }
.hd-nocard { display: none; }
.hd-nocard.show { display: block; }
.hd-nocard .hd-empty-icon { font-size: 0; }
.hd-nocard .hd-empty-icon svg { display: block; margin: 0 auto; }