:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #173044;
    background: #f4f7f9;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: linear-gradient(180deg, #fff 0, #f4f7f9 18rem); }
button, textarea, select { font: inherit; }
.concierge { width: min(100% - 2rem, 760px); margin: 0 auto; padding: 1.25rem 0 2rem; }
.service-header { padding: .4rem 0 1.25rem; border-bottom: 1px solid #d8e1e6; }
.service-identity { padding-left: .75rem; border-left: 3px solid #087c88; }
.venue-name { margin: 0 0 .08rem; color: #405867; font-size: .78rem; font-weight: 750; letter-spacing: .06em; }
.service-header h1 { margin: 0; color: #102d43; font-size: 1.22rem; line-height: 1.25; }

.welcome { padding: 2.2rem 0 1.5rem; }
.welcome-copy { text-align: center; }
.welcome-label { margin: 0 0 .6rem; color: #087c88; font-size: .78rem; font-weight: 750; letter-spacing: .04em; }
.welcome h2 { margin: 0; color: #102d43; font-size: clamp(1.65rem, 7vw, 2.35rem); line-height: 1.38; letter-spacing: .01em; }
.welcome-copy > p:last-child { margin: .9rem 0 0; color: #5b6c78; font-size: .95rem; line-height: 1.8; }
.suggestions { margin-top: 2rem; }
.suggestions h3, .chat > h2 { margin: 0 0 .75rem; color: #455e6d; font-size: .82rem; letter-spacing: .03em; }
.suggestion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.suggestion { display: flex; min-width: 0; min-height: 3.5rem; align-items: center; gap: .55rem; padding: .75rem .8rem; color: #173b50; text-align: left; background: #fff; border: 1px solid #ccdce3; border-radius: .65rem; box-shadow: 0 3px 12px rgb(18 48 71 / 5%); cursor: pointer; font-size: .9rem; font-weight: 700; line-height: 1.35; }
.suggestion span { flex: 0 0 1.45rem; color: #087c88; text-align: center; font-size: .76rem; }
.suggestion:hover { border-color: #087c88; background: #f6fbfb; }
button:focus-visible, textarea:focus-visible, .answer-table-scroll:focus-visible { outline: 3px solid rgb(0 119 136 / 28%); outline-offset: 2px; }

.scope-field { margin: 0 0 1rem; padding: 1rem; background: #edf6f7; border: 1px solid #c8dfe2; border-radius: .7rem; }
.scope-field label { display: block; margin-bottom: .45rem; color: #233f51; font-size: .85rem; font-weight: 750; }
.scope-field select { width: 100%; padding: .7rem .8rem; color: #173044; background: #fff; border: 1px solid #9fbac4; border-radius: .45rem; }
.scope-field select:focus-visible { outline: 3px solid rgb(0 119 136 / 28%); outline-offset: 2px; }

.chat { padding: .35rem 0 0; }
.conversation { margin-bottom: 1.4rem; }
.conversation[hidden] { display: none; }
.speaker-label { margin: 0 0 .4rem; color: #617480; font-size: .75rem; font-weight: 750; }
.user-turn { display: flex; flex-direction: column; align-items: flex-end; margin: 0 0 1.4rem auto; }
.user-message { max-width: 88%; margin: 0; padding: .72rem .95rem; color: #fff; overflow-wrap: anywhere; background: #087c88; border-radius: 1rem 1rem .25rem 1rem; font-size: .94rem; line-height: 1.6; }
.assistant-turn { min-width: 0; }
.assistant-dot { display: inline-block; width: .55rem; height: .55rem; margin-right: .4rem; background: #ec6d45; border-radius: 50%; }
.answer { min-width: 0; overflow-wrap: anywhere; color: #243e4e; line-height: 1.75; }
.answer[aria-busy="true"] { min-height: 3.5rem; padding: 1rem; color: #536d7a; background: #f3f7f8; border-radius: .55rem; }
.answer h1, .answer h2, .answer h3 { color: #123047; line-height: 1.35; }
.answer h1:first-child, .answer h2:first-child, .answer h3:first-child, .answer p:first-child { margin-top: 0; }
.answer h1 { margin: 1.6em 0 .7em; padding-bottom: .45rem; border-bottom: 2px solid #9fbfcd; font-size: 1.5rem; }
.answer h2 { margin: 1.5em 0 .65em; padding: .45rem .65rem; border-left: 4px solid #087c88; background: #e9f3f4; font-size: 1.22rem; }
.answer h3 { margin: 1.35em 0 .5em; padding-bottom: .25rem; border-bottom: 1px solid #c7dce5; font-size: 1.06rem; }
.answer-section { margin: 1rem 0; padding: 1rem 1.1rem; background: #fbfdfe; border: 1px solid #d2e0e6; border-radius: .55rem; }
.answer-section > h2:first-child { margin-top: 0; }
.answer-section > :last-child { margin-bottom: 0; }
.answer p { margin: .75rem 0; }
.answer ul, .answer ol { margin: .75rem 0; padding-left: 1.6rem; }
.answer li { margin: .3rem 0; padding-left: .15rem; }
.answer strong { color: #075d68; font-weight: 750; }
.answer blockquote { margin: 1rem 0; padding: .8rem 1rem; color: #3d5663; background: #f8fbfc; border: 1px solid #d6e3e8; border-left: 4px solid #7899a7; border-radius: .3rem; font-size: .94rem; }
.answer blockquote p { margin: 0; }
.answer-table-scroll { max-width: 100%; margin: 1rem 0; overflow-x: auto; border: 1px solid #c7d8df; border-radius: .4rem; -webkit-overflow-scrolling: touch; }
.answer table { width: 100%; min-width: 36rem; border-spacing: 0; border-collapse: collapse; background: #fff; font-size: .92rem; }
.answer th, .answer td { padding: .65rem .75rem; text-align: left; white-space: nowrap; border-right: 1px solid #d9e4e9; border-bottom: 1px solid #d9e4e9; }
.answer th { color: #264b5d; background: #e3eef2; font-weight: 700; }
.answer tbody tr:nth-child(even) { background: #f7fafb; }
.answer tr:last-child td { border-bottom: 0; }
.answer th:last-child, .answer td:last-child { border-right: 0; }
.boat-number-badge { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; box-sizing: border-box; border-radius: .3rem; font-weight: 800; line-height: 1; }
.boat-number-badge--1 { color: #17242b; background: #fff; border: 1px solid #71838b; }
.boat-number-badge--2 { color: #fff; background: #202529; border: 1px solid #202529; }
.boat-number-badge--3 { color: #fff; background: #c92b32; border: 1px solid #a91f26; }
.boat-number-badge--4 { color: #fff; background: #1764b0; border: 1px solid #12518f; }
.boat-number-badge--5 { color: #202720; background: #f4d52c; border: 1px solid #bda20d; }
.boat-number-badge--6 { color: #fff; background: #16834b; border: 1px solid #10693b; }

#chat-form label { display: block; margin-bottom: .45rem; color: #233f51; font-size: .85rem; font-weight: 750; }
.composer { display: flex; min-width: 0; align-items: stretch; gap: .6rem; padding: .45rem; background: #f7f9fa; border: 1px solid #bfcfd6; border-radius: .7rem; }
.composer textarea { display: block; min-width: 0; width: 100%; min-height: 3.2rem; max-height: 9rem; padding: .55rem .5rem; resize: vertical; color: #173044; background: transparent; border: 0; line-height: 1.5; }
.composer textarea:focus-visible { outline: 0; }
.composer:focus-within { border-color: #087c88; box-shadow: 0 0 0 3px rgb(0 119 136 / 14%); }
.composer button { display: flex; flex: 0 0 auto; min-width: 5rem; min-height: 3.2rem; align-items: center; justify-content: center; gap: .35rem; padding: .65rem .9rem; color: #fff; background: #087c88; border: 0; border-radius: .5rem; cursor: pointer; font-weight: 750; }
.composer button:hover { background: #056a74; }
.composer button:disabled { opacity: .6; cursor: wait; }
.error { min-height: 1.4em; margin: .55rem 0 0; color: #a21b1b; font-size: .85rem; }
.service-footer { padding: 1.25rem .5rem 0; color: #687a84; text-align: center; font-size: .72rem; line-height: 1.6; }
.service-footer p { margin: 0; }

.concierge.chat-started .welcome { padding: 1rem 0; }
.concierge.chat-started .welcome-copy { display: none; }
.concierge.chat-started .suggestions { margin: 0; }
.concierge.chat-started .suggestions h3 { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.concierge.chat-started .suggestion-grid { display: flex; gap: .5rem; padding: .2rem .1rem .5rem; overflow-x: auto; }
.concierge.chat-started .suggestion { flex: 0 0 auto; min-height: 2.7rem; padding: .55rem .7rem; box-shadow: none; font-size: .8rem; }
.concierge.chat-started .suggestion span { display: none; }
.concierge.chat-started .chat { padding: 1.25rem; background: #fff; border: 1px solid #dce5e9; border-radius: .9rem; box-shadow: 0 .7rem 2rem rgb(18 48 71 / 7%); }
.concierge.chat-started .chat > h2 { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 640px) {
    .concierge { padding-top: 2rem; }
    .welcome { padding-top: 3rem; }
    .mobile-break { display: none; }
    .suggestion-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .suggestion { min-height: 4rem; padding: .85rem 1rem; }
    .concierge.chat-started .chat { padding: 1.65rem; }
}

@media (max-width: 480px) {
    .concierge { width: min(100% - 1.25rem, 760px); padding-top: .75rem; }
    .service-header { padding-bottom: .8rem; }
    .service-header h1 { font-size: 1.08rem; }
    .welcome { padding-top: 1.65rem; }
    .suggestions { margin-top: 1.5rem; }
    .concierge.chat-started .chat { padding: 1rem; }
    .composer { gap: .35rem; }
    .composer button { min-width: 3.35rem; padding: .6rem; }
    .composer .send-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    .answer { font-size: .95rem; }
    .answer h1 { font-size: 1.3rem; }
    .answer h2 { padding: .4rem .55rem; font-size: 1.15rem; }
    .answer h3 { font-size: 1.03rem; }
    .answer-section { padding: .8rem; }
    .answer blockquote { padding: .7rem .8rem; font-size: .9rem; }
    .answer-table-scroll::before { display: block; width: max-content; margin: .3rem .5rem .2rem auto; color: #526d79; content: "横にスクロールできます →"; font-size: .72rem; line-height: 1.4; }
    .answer table { min-width: 34rem; font-size: .84rem; }
    .answer-table-scroll:has(table tr > :nth-child(4)) table { min-width: 34rem; }
    .answer-table-scroll:not(:has(table tr > :nth-child(4)))::before { display: none; }
    .answer-table-scroll:not(:has(table tr > :nth-child(4))) table { min-width: 100%; table-layout: auto; }
    .answer-table-scroll:not(:has(table tr > :nth-child(4))) th,
    .answer-table-scroll:not(:has(table tr > :nth-child(4))) td { white-space: normal; overflow-wrap: anywhere; }
    .answer th, .answer td { padding: .5rem .6rem; }
    .boat-number-badge { width: 1.6rem; height: 1.6rem; font-size: .9rem; }
}
