/* ============================================================================
   DOWNLOAD.CSS - EcchiBon Manga Archive Download Page Styles
   Self-contained, bulletproof CSS matching main EcchiBon aesthetic (#faf7f2 / #b33a3a)
   Zero dependency on external Tailwind compilation or PurgeCSS
   ============================================================================ */

:root {
    --eb-site-bg: #faf7f2;
    --eb-surface: #ffffff;
    --eb-surface-soft: #fbf9f6;
    --eb-surface-muted: #f2ece4;
    --eb-border: #e8e0d5;
    --eb-border-soft: #ede6dc;
    --eb-border-strong: #dfd6cb;
    --eb-text-primary: #2f2e2c;
    --eb-text-secondary: #4a3b32;
    --eb-text-muted: #7d6b5d;
    --eb-accent: #b33a3a;
    --eb-accent-hover: #992f2f;
    --eb-accent-soft: #fceded;
    --eb-green: #16a34a;
    --eb-green-soft: #dcfce7;
    --eb-amber: #d97706;
    --eb-amber-soft: #fef3c7;
}

/* Base resets for download elements */
.dl-wrap * {
    box-sizing: border-box;
}

/* ============================================================================
   1. Page Container & Header
   ============================================================================ */
.dl-top-banner {
    background-color: var(--eb-accent);
    color: #ffffff;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.dl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}
@media (min-width: 640px) {
    .dl-container {
        padding: 24px 20px 50px;
    }
}
@media (min-width: 1024px) {
    .dl-container {
        padding: 28px 24px 60px;
    }
}

.dl-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--eb-text-muted);
    margin-bottom: 16px;
}
.dl-breadcrumb a {
    color: var(--eb-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.dl-breadcrumb a:hover {
    color: var(--eb-accent);
}
.dl-breadcrumb .sep {
    color: #b5a89b;
}
.dl-breadcrumb .current {
    color: var(--eb-accent);
    font-weight: 600;
}

.dl-page-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--eb-border);
}
@media (min-width: 640px) {
    .dl-page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.dl-page-title-box h1 {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--eb-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}
@media (min-width: 640px) {
    .dl-page-title-box h1 {
        font-size: 1.85rem;
    }
}
.dl-page-title-box p {
    font-size: 0.8125rem;
    color: var(--eb-text-muted);
    margin: 4px 0 0;
}

.dl-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--eb-text-secondary);
    background: #ffffff;
    border: 1px solid #d1c9bf;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
    align-self: flex-start;
}
@media (min-width: 640px) {
    .dl-back-btn {
        align-self: auto;
    }
}
.dl-back-btn:hover {
    border-color: var(--eb-accent);
    color: var(--eb-accent);
}

/* ============================================================================
   2. Manga Overview Card
   ============================================================================ */
.dl-manga-card {
    background: #ffffff;
    border: 1px solid var(--eb-border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(47, 46, 44, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}
@media (min-width: 640px) {
    .dl-manga-card {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }
}

.dl-manga-cover {
    width: 100px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--eb-border);
    background: #faf7f2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.dl-manga-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dl-manga-info {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.dl-badges-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
@media (min-width: 640px) {
    .dl-badges-row {
        justify-content: flex-start;
    }
}

.dl-pill-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 9999px;
    font-weight: 500;
    line-height: 1.25;
}
.dl-tag-gray {
    background: #f5f0ea;
    border: 1px solid #e0d6cb;
    color: #4a3b32;
}
.dl-tag-red {
    background: #fde8e8;
    border: 1px solid #f8b4b4;
    color: var(--eb-accent);
    font-weight: 600;
}

.dl-manga-title {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--eb-text-primary);
    margin: 0 0 4px;
    line-height: 1.4;
    word-break: break-word;
}
.dl-manga-alt-title {
    font-size: 0.8125rem;
    color: var(--eb-text-muted);
    margin: 0;
    word-break: break-word;
}

/* ============================================================================
   3. Redesigned "パッケージ作成タスク & 進行状況" Card
   ============================================================================ */
.dl-task-card {
    background: #ffffff;
    border: 1px solid var(--eb-border);
    border-top: 4px solid var(--eb-accent);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(47, 46, 44, 0.06);
    padding: 20px;
    margin-bottom: 24px;
    overflow: hidden;
}
@media (min-width: 640px) {
    .dl-task-card {
        padding: 28px;
    }
}

.dl-task-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--eb-border);
    margin-bottom: 20px;
}

.dl-task-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dl-task-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fceded;
    color: var(--eb-accent);
    border: 1px solid #f5d0d0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dl-task-icon-box svg {
    width: 22px;
    height: 22px;
}

.dl-task-title-text {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--eb-text-primary);
    margin: 0;
    line-height: 1.25;
}
@media (min-width: 640px) {
    .dl-task-title-text {
        font-size: 1.25rem;
    }
}

.dl-task-sub {
    font-size: 0.65rem;
    color: #9b8f84;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 3px;
}

/* Status Pill & Pulsing Dot */
.packaging-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.status-indicator-dot {
    position: relative;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-indicator-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    opacity: 0.4;
    animation: eb-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes eb-ping {
    0% { transform: scale(1); opacity: 0.7; }
    75%, 100% { transform: scale(2.2); opacity: 0; }
}

.packaging-status-pill.status-ready {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.packaging-status-pill.status-ready .status-indicator-dot {
    background: #10b981;
}
.packaging-status-pill.status-ready .status-indicator-dot::after {
    background: #10b981;
    animation: none;
}

.packaging-status-pill.status-processing {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.packaging-status-pill.status-processing .status-indicator-dot {
    background: #f59e0b;
}
.packaging-status-pill.status-processing .status-indicator-dot::after {
    background: #f59e0b;
}

.packaging-status-pill.status-queued {
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}
.packaging-status-pill.status-queued .status-indicator-dot {
    background: #6366f1;
}
.packaging-status-pill.status-queued .status-indicator-dot::after {
    background: #6366f1;
}

.packaging-status-pill.status-failed {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.packaging-status-pill.status-failed .status-indicator-dot {
    background: #ef4444;
}
.packaging-status-pill.status-failed .status-indicator-dot::after {
    background: #ef4444;
    animation: none;
}

/* ============================================================================
   4. Progress Hero Section
   ============================================================================ */
.dl-progress-hero {
    background: #fbf9f6;
    border: 1px solid #eee6dc;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.dl-progress-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.dl-stage-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dl-stage-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f4ece3;
    color: var(--eb-text-muted);
    border: 1px solid #e4dacd;
    flex-shrink: 0;
}

.dl-stage-desc {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--eb-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
@media (min-width: 640px) {
    .dl-stage-desc {
        max-width: 480px;
    }
}

.dl-percent-number {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--eb-accent);
    line-height: 1;
    letter-spacing: -0.02em;
}

.progress-track-wrapper {
    position: relative;
    width: 100%;
    height: 12px;
    background: #ede6dc;
    border-radius: 9999px;
    overflow: hidden;
    padding: 2px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.custom-progress-bar {
    position: relative;
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #b33a3a 0%, #e05353 50%, #b33a3a 100%);
    background-size: 200% 100%;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(179, 58, 58, 0.35);
    overflow: hidden;
}

.custom-progress-bar:not(.completed) {
    animation: eb-bar-wave 2.2s linear infinite;
}

@keyframes eb-bar-wave {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.custom-progress-bar .progress-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: eb-shimmer 1.8s infinite;
}

@keyframes eb-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.custom-progress-bar.completed {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
    box-shadow: 0 1px 4px rgba(22, 163, 74, 0.35);
}

.dl-progress-milestones {
    display: flex;
    justify-content: space-between;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.65rem;
    color: #a3978b;
    margin-top: 6px;
    padding: 0 2px;
}

/* ============================================================================
   5. Stepper Pipeline Grid
   ============================================================================ */
.dl-stepper-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
@media (min-width: 1024px) {
    .dl-stepper-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

.stage-step-card {
    background: #faf7f2;
    border: 1px solid var(--eb-border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}
@media (max-width: 640px) {
    .stage-step-card {
        padding: 10px 12px;
        gap: 8px;
    }
}

.stage-step-card .step-num-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #e6dfd5;
    color: var(--eb-text-muted);
    font-weight: 800;
    font-size: 0.8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
    border: 1px solid #dcd3c6;
}
@media (max-width: 640px) {
    .stage-step-card .step-num-badge {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
}

.stage-step-card .step-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--eb-text-primary);
    line-height: 1.25;
}
@media (max-width: 640px) {
    .stage-step-card .step-name {
        font-size: 0.75rem;
    }
}

.stage-step-card .step-desc {
    font-size: 0.68rem;
    color: var(--eb-text-muted);
    line-height: 1.3;
    margin-top: 2px;
}
@media (max-width: 640px) {
    .stage-step-card .step-desc {
        font-size: 0.625rem;
    }
}

.stage-step-card.active {
    background: #ffffff;
    border-color: var(--eb-accent);
    box-shadow: 0 4px 14px rgba(179, 58, 58, 0.12), 0 0 0 1px rgba(179, 58, 58, 0.15);
    transform: translateY(-1px);
}
.stage-step-card.active .step-num-badge {
    background: var(--eb-accent);
    color: #ffffff;
    border-color: var(--eb-accent);
    box-shadow: 0 2px 6px rgba(179, 58, 58, 0.35);
}
.stage-step-card.active .step-name {
    color: var(--eb-accent);
}

.stage-step-card.completed {
    background: #f7faf5;
    border-color: #a7f3d0;
}
.stage-step-card.completed .step-num-badge {
    background: var(--eb-green);
    color: #ffffff;
    border-color: var(--eb-green);
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
}
.stage-step-card.completed .step-name {
    color: #065f46;
}

/* ============================================================================
   6. Dual-Column Split Grid (Desktop: 7fr / 5fr, Mobile: stacked)
   ============================================================================ */
.dl-split-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
@media (min-width: 1024px) {
    .dl-split-grid {
        display: grid;
        grid-template-columns: 7fr 5fr;
        gap: 20px;
        align-items: stretch;
    }
}

.dl-action-panel {
    background: #fbf9f6;
    border: 1px solid #eee6dc;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.dl-turnstile-wrap {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dl-turnstile-hint {
    font-size: 0.75rem;
    color: var(--eb-text-muted);
    margin-top: 6px;
    text-align: center;
}

.dl-button-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
@media (min-width: 640px) {
    .dl-button-area {
        flex-direction: row;
    }
}

.action-btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    line-height: 1.25;
    letter-spacing: 0.01em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}
@media (min-width: 640px) {
    .action-btn-main {
        width: auto;
        min-width: 250px;
    }
}

.btn-pack-start {
    background: linear-gradient(135deg, #b33a3a 0%, #992f2f 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(179, 58, 58, 0.28);
}
.btn-pack-start:hover:not(:disabled) {
    background: linear-gradient(135deg, #c24141 0%, #a83535 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(179, 58, 58, 0.38);
}
.btn-pack-start:active:not(:disabled) {
    transform: translateY(0);
}
.btn-pack-start:disabled {
    background: #dcd4c8;
    color: #8c8072 !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-download-ready {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
    animation: eb-bounce-soft 2.5s ease-in-out infinite;
}
@keyframes eb-bounce-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.btn-download-ready:hover {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.38);
    color: #ffffff !important;
    animation: none;
}
.btn-download-ready:active {
    transform: translateY(0);
}

.dl-features-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid #eee6dc;
    font-size: 0.7rem;
    color: var(--eb-text-muted);
}
@media (max-width: 639px) {
    .dl-features-row {
        justify-content: center;
        gap: 12px;
    }
}

/* ============================================================================
   7. Live Terminal Console
   ============================================================================ */
.dl-terminal-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 220px;
}

.terminal-container {
    background: #1f1d1b;
    border: 1px solid #38332e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(31, 29, 27, 0.12);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}

.terminal-header {
    background: #171513;
    border-bottom: 1px solid #2e2925;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.terminal-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}
.terminal-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #22c55e; }

.terminal-header-title {
    font-size: 0.7rem;
    color: #b5a89b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    margin-left: 8px;
}

.terminal-live-tag {
    font-size: 0.7rem;
    color: #86efac;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.terminal-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: eb-ping 1.8s infinite;
}

.terminal-body {
    padding: 12px 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
    line-height: 1.6;
    color: #e2dbd1;
    overflow-y: auto;
    flex-grow: 1;
    min-height: 140px;
    max-height: 180px;
}
.terminal-body::-webkit-scrollbar {
    width: 6px;
}
.terminal-body::-webkit-scrollbar-track {
    background: #171513;
}
.terminal-body::-webkit-scrollbar-thumb {
    background: #3e3832;
    border-radius: 3px;
}

.terminal-line {
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
    word-break: break-all;
}
.terminal-time {
    color: #8c8276;
    font-weight: 500;
    flex-shrink: 0;
}
.terminal-msg.success {
    color: #4ade80;
    font-weight: 600;
}
.terminal-msg.warning {
    color: #fbbf24;
}
.terminal-msg.info {
    color: #60a5fa;
}

/* ============================================================================
   8. In-Page Alert Banner
   ============================================================================ */
.packaging-alert-box {
    padding: 14px 18px;
    border-radius: 10px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.packaging-alert-box.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.packaging-alert-box.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.packaging-alert-box.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.btn-alert-action {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}
.btn-alert-primary {
    background: var(--eb-accent);
    color: #ffffff;
}
.btn-alert-warning {
    background: #f59e0b;
    color: #ffffff;
}
.btn-alert-danger {
    background: #ef4444;
    color: #ffffff;
}

/* ============================================================================
   9. Instructions & Notes Card
   ============================================================================ */
.dl-notes-card {
    background: #ffffff;
    border: 1px solid var(--eb-border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(47, 46, 44, 0.04);
}
@media (min-width: 640px) {
    .dl-notes-card {
        padding: 24px;
    }
}

.dl-notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--eb-border);
    margin-bottom: 16px;
}
.dl-notes-header h3 {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--eb-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dl-feedback-trigger {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--eb-accent);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}
.dl-feedback-trigger:hover {
    color: var(--eb-accent-hover);
    text-decoration: underline;
}

.dl-notes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 768px) {
    .dl-notes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

.dl-note-item {
    background: #faf7f2;
    border: 1px solid var(--eb-border);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.dl-note-check {
    color: var(--eb-green);
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.2;
    flex-shrink: 0;
}
.dl-note-content strong {
    display: block;
    color: var(--eb-text-primary);
    font-size: 0.8125rem;
    margin-bottom: 2px;
}
.dl-note-content span {
    display: block;
    color: var(--eb-text-muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

/* ============================================================================
   10. Feedback Modal & Toast
   ============================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
}
.modal-overlay.hidden {
    display: none !important;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--eb-border);
    border-radius: 14px;
    max-width: 500px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.modal-title-text {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--eb-text-primary);
    margin: 0;
}
.modal-sub-text {
    font-size: 0.75rem;
    color: var(--eb-text-muted);
    margin: 4px 0 0;
}
.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--eb-text-muted);
    cursor: pointer;
    padding: 0;
}
.modal-close-btn:hover {
    color: var(--eb-accent);
}

.modal-form-group {
    margin-bottom: 14px;
}
.modal-form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--eb-text-secondary);
    margin-bottom: 4px;
}
.modal-input,
.modal-select,
.modal-textarea {
    width: 100%;
    border: 1px solid var(--eb-border);
    background: #faf7f2;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8125rem;
    color: var(--eb-text-primary);
    outline: none;
    transition: all 0.2s;
}
.modal-input:focus,
.modal-select:focus,
.modal-textarea:focus {
    background: #ffffff;
    border-color: var(--eb-accent);
    box-shadow: 0 0 0 2px rgba(179, 58, 58, 0.15);
}
.modal-textarea {
    resize: none;
    height: 90px;
}

.modal-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}
.modal-cancel-btn {
    padding: 8px 18px;
    border: 1px solid #d1c9bf;
    background: #ffffff;
    color: var(--eb-text-secondary);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}
.modal-submit-btn {
    padding: 8px 22px;
    background: var(--eb-accent);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.modal-submit-btn:hover {
    background: var(--eb-accent-hover);
}

.ee-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 24px;
    border-radius: 40px;
    background: #2f2e2c;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.ee-toast.is-visible {
    opacity: 1;
}

/* ============================================================================
   11. Spinner & Utility Animations
   ============================================================================ */
.icon-spin {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: eb-spin 0.8s linear infinite;
    vertical-align: -2px;
    margin-right: 6px;
}
@keyframes eb-spin {
    to { transform: rotate(360deg); }
}

