.manual-help {
    --manual-help-gold: #9a6b08;
    --manual-help-gold-dark: #704d00;
    --manual-help-blue: #205f9f;
    --manual-help-ink: #202633;
    --manual-help-muted: #667085;
    --manual-help-line: #dfe4ea;
    --manual-help-soft: #f5f7fa;
    width: min(100%, 1120px);
    margin: 0 auto;
    color: var(--manual-help-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", Meiryo, sans-serif;
}

.manual-help *,
.manual-help *::before,
.manual-help *::after {
    box-sizing: border-box;
}

.manual-help__hero {
    padding: 22px 26px;
    border-radius: 18px 18px 0 0;
    color: #fff;
    background: linear-gradient(135deg, #7d5906, #b58515);
    box-shadow: 0 10px 28px rgba(39, 45, 55, .12);
}

.manual-help__hero h1 {
    margin: 0 0 6px;
    color: inherit;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.3;
}

.manual-help__hero p {
    margin: 0;
    color: inherit;
    line-height: 1.7;
}

.manual-help__eyebrow {
    margin-bottom: 4px !important;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .9;
}

.manual-help__tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--manual-help-line);
    border-top: 0;
    background: #fff;
}

.manual-help__tab {
    min-height: 54px;
    padding: 12px 16px;
    border: 0;
    border-bottom: 3px solid transparent;
    color: var(--manual-help-muted);
    background: #fff;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.manual-help__tab + .manual-help__tab {
    border-left: 1px solid var(--manual-help-line);
}

.manual-help__tab:hover,
.manual-help__tab:focus-visible {
    color: var(--manual-help-blue);
    background: #f7faff;
    outline: 3px solid rgba(32, 95, 159, .2);
    outline-offset: -3px;
}

.manual-help__tab.is-active {
    border-bottom-color: var(--manual-help-blue);
    color: var(--manual-help-blue);
}

.manual-help__panel {
    border: 1px solid var(--manual-help-line);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    background: var(--manual-help-soft);
}

.manual-help__bot-panel {
    min-height: 560px;
    padding: 22px;
}

.manual-help__bot-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.manual-help__bot-tools label {
    margin: 0;
    color: var(--manual-help-muted);
    font-size: .88rem;
    font-weight: 650;
}

.manual-help__bot-tools select {
    min-height: 42px;
    padding: 8px 34px 8px 12px;
    border: 1px solid var(--manual-help-line);
    border-radius: 10px;
    color: var(--manual-help-ink);
    background: #fff;
}

.manual-help__suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.manual-help__suggestions button,
.manual-help__guide-button {
    padding: 8px 12px;
    border: 1px solid #c9d3df;
    border-radius: 999px;
    color: var(--manual-help-ink);
    background: #fff;
    font: inherit;
    font-size: .82rem;
    cursor: pointer;
}

.manual-help__suggestions button:hover,
.manual-help__suggestions button:focus-visible,
.manual-help__guide-button:hover,
.manual-help__guide-button:focus-visible {
    border-color: var(--manual-help-blue);
    color: var(--manual-help-blue);
    background: #eef5fc;
    outline: 2px solid rgba(32, 95, 159, .18);
}

.manual-help__log {
    min-height: 300px;
    max-height: 560px;
    padding: 2px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.manual-help__empty {
    padding: 18px;
    border: 1px dashed #bbc5d1;
    border-radius: 14px;
    color: var(--manual-help-muted);
    background: #fff;
}

.manual-help__message {
    width: fit-content;
    max-width: min(92%, 800px);
    padding: 13px 15px;
    border-radius: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.72;
}

.manual-help__message--question {
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    color: #fff;
    background: var(--manual-help-blue);
}

.manual-help__message--answer,
.manual-help__message--error {
    align-self: flex-start;
    border: 1px solid var(--manual-help-line);
    border-bottom-left-radius: 5px;
    background: #fff;
}

.manual-help__message--error {
    color: #9b1c1c;
    background: #fff8f7;
}

.manual-help__thinking {
    align-self: flex-start;
    color: var(--manual-help-muted);
    font-size: .86rem;
}

.manual-help__thinking::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 8px;
    display: inline-block;
    border-radius: 50%;
    background: var(--manual-help-blue);
    animation: manual-help-pulse .8s ease-in-out infinite alternate;
}

@keyframes manual-help-pulse {
    to { opacity: .25; }
}

.manual-help__guide-list {
    margin-top: 13px;
    padding-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px dashed var(--manual-help-line);
}

.manual-help__guide-button {
    color: var(--manual-help-blue);
    font-weight: 750;
}

.manual-help__composer {
    position: sticky;
    bottom: 0;
    margin-top: 18px;
    padding-top: 14px;
    display: flex;
    align-items: stretch;
    gap: 9px;
    background: linear-gradient(to top, var(--manual-help-soft) 78%, rgba(245, 247, 250, 0));
}

.manual-help__composer textarea {
    min-width: 0;
    min-height: 54px;
    max-height: 150px;
    flex: 1;
    resize: none;
    padding: 13px 14px;
    border: 2px solid var(--manual-help-line);
    border-radius: 13px;
    color: var(--manual-help-ink);
    background: #fff;
    font: inherit;
    line-height: 1.5;
}

.manual-help__composer textarea:focus {
    border-color: var(--manual-help-blue);
    outline: 3px solid rgba(32, 95, 159, .15);
}

.manual-help__composer button {
    min-width: 82px;
    padding: 0 20px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: var(--manual-help-blue);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.manual-help__composer button:disabled {
    cursor: wait;
    opacity: .48;
}

.manual-help__note {
    margin: 8px 0 0;
    color: var(--manual-help-muted);
    font-size: .75rem;
    text-align: center;
}

.manual-help__manual-panel {
    padding: 0;
    overflow: hidden;
    background: #fff;
}

.manual-help__frame {
    width: 100%;
    height: max(680px, 72vh);
    display: block;
    border: 0;
    background: #fff;
}

.manual-help__public {
    width: min(100% - 32px, 1280px);
    margin: 32px auto;
}

.manual-help__public-copy {
    margin: 0 0 18px;
    color: var(--manual-help-muted);
    text-align: center;
}

.manual-help__public .manual-help__frame {
    border: 1px solid var(--manual-help-line);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(39, 45, 55, .1);
}

.manual-help__sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 767px) {
    .manual-help__hero {
        padding: 18px;
        border-radius: 14px 14px 0 0;
    }

    .manual-help__hero p:not(.manual-help__eyebrow) {
        font-size: .88rem;
    }

    .manual-help__tab {
        min-height: 50px;
        padding: 10px 8px;
        font-size: .9rem;
    }

    .manual-help__bot-panel {
        min-height: 500px;
        padding: 14px 10px;
    }

    .manual-help__bot-tools {
        align-items: stretch;
        flex-direction: column;
        gap: 5px;
    }

    .manual-help__bot-tools select {
        width: 100%;
    }

    .manual-help__suggestions {
        flex-wrap: nowrap;
        margin-inline: -10px;
        padding: 0 10px 5px;
        overflow-x: auto;
    }

    .manual-help__suggestions button {
        flex: 0 0 auto;
    }

    .manual-help__message {
        max-width: 98%;
    }

    .manual-help__composer textarea {
        min-height: 76px;
    }

    .manual-help__composer button {
        min-width: 68px;
        padding: 0 13px;
    }

    .manual-help__frame {
        height: 78vh;
        min-height: 560px;
    }

    .manual-help__public {
        width: min(100% - 20px, 1280px);
        margin: 20px auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .manual-help__log { scroll-behavior: auto; }
    .manual-help__thinking::before { animation: none; }
}
