:root {
    --bg-top: #f6f0e7;
    --bg-bottom: #efebe4;
    --panel: rgba(255, 255, 255, 0.94);
    --panel-soft: rgba(249, 244, 236, 0.98);
    --line: rgba(144, 123, 95, 0.16);
    --ink: #21302a;
    --muted: #68756d;
    --accent: #2e5a4f;
    --accent-strong: #20453c;
    --accent-soft: #e6efe9;
    --gold: #af8554;
    --gold-soft: #f5eadb;
    --shadow: 0 24px 60px rgba(35, 44, 40, 0.1);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --safe-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Avenir Next", "Hiragino Sans", "Noto Sans JP", "PingFang SC", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(175, 133, 84, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(46, 90, 79, 0.16), transparent 28%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

button,
input,
textarea {
    font: inherit;
}

button {
    border: 0;
    background: none;
    padding: 0;
    color: inherit;
    cursor: pointer;
}

.guest-app {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px 16px;
}

.phone-shell {
    width: min(430px, 100%);
    min-height: min(920px, calc(100vh - 32px));
    background: rgba(255, 255, 255, 0.38);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 34px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    position: relative;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 20px 12px;
}

.topbar-eyebrow,
.section-kicker,
.hero-label,
.language-eyebrow {
    margin: 0 0 6px;
    color: var(--gold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
}

.topbar-title,
.language-title,
.hero-title,
.section-title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: -0.02em;
}

.topbar-title {
    font-size: 26px;
}

.topbar-contact {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
    color: var(--accent-strong);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.topbar-contact-label {
    color: var(--muted);
    font-weight: 700;
}

.topbar-contact-number {
    color: var(--accent);
    letter-spacing: 0.02em;
}

.demo-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #fdf6e6 0%, #f8eeda 100%);
    border-top: 1px solid var(--gold-soft);
    border-bottom: 1px solid var(--gold-soft);
}

.demo-banner-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 100px;
    line-height: 1.6;
    flex-shrink: 0;
}

.demo-banner-copy {
    font-size: 12px;
    color: var(--ink);
    line-height: 1.5;
}

.language-pill {
    border-radius: 999px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(144, 123, 95, 0.18);
    color: var(--accent-strong);
    font-weight: 700;
    font-size: 13px;
}

.screen {
    display: none;
    overflow-y: auto;
    padding: 0 16px 18px;
    gap: 14px;
}

.screen.is-active {
    display: grid;
    align-content: start;
}

.hero-card,
.section-card,
.card-panel,
.faq-item,
.starter-chip,
.category-chip {
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 8px 20px rgba(45, 55, 49, 0.05);
}

.hero-card {
    padding: 20px;
    display: grid;
    gap: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 240, 232, 0.98) 100%);
}

.hero-copy {
    display: grid;
    gap: 10px;
}

.hero-title {
    font-size: 28px;
    line-height: 1.1;
}

.hero-text,
.section-copy,
.chat-subtitle,
.language-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.ai-entry-button {
    width: 100%;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(46, 90, 79, 0.2);
    background: rgba(230, 239, 233, 0.62);
    color: var(--accent-strong);
    text-align: left;
    display: grid;
    gap: 4px;
}

.ai-entry-button[hidden] {
    display: none;
}

.ai-entry-title {
    font-size: 15px;
    font-weight: 800;
}

.ai-entry-subtitle {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.vr-entry-card {
    background:
        linear-gradient(135deg, rgba(230, 239, 233, 0.9) 0%, rgba(255, 255, 255, 0.96) 56%, rgba(245, 234, 219, 0.92) 100%);
}

.vr-open-button {
    width: 100%;
    min-height: 48px;
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: var(--radius-lg);
    background: var(--accent);
    color: #f7fbf8;
    font-weight: 800;
}

.section-card,
.card-panel {
    padding: 18px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-title {
    font-size: 24px;
}

.text-link {
    padding: 8px 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
}

.quick-grid,
.category-list,
.starter-strip,
.faq-filter-row {
    display: grid;
    gap: 12px;
}

.quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-card,
.category-chip,
.faq-filter {
    width: 100%;
    padding: 16px 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    text-align: left;
    display: grid;
    gap: 6px;
}

.quick-card-title,
.category-chip-title {
    font-weight: 800;
    font-size: 15px;
}

.quick-card-copy,
.category-chip-copy,
.faq-question {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.chat-stream {
    min-height: 360px;
    display: grid;
    align-content: start;
    gap: 12px;
}

.bubble {
    max-width: 86%;
    padding: 14px 16px;
    border-radius: 20px;
    line-height: 1.65;
    font-size: 14px;
    white-space: pre-wrap;
}

.bubble.ai {
    background: var(--panel-soft);
    border-top-left-radius: 8px;
    justify-self: start;
}

.bubble.user {
    background: var(--accent);
    color: #f7fbf8;
    border-top-right-radius: 8px;
    justify-self: end;
}

.bubble.loading {
    color: var(--muted);
}

.starter-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.starter-chip,
.faq-filter {
    padding: 14px;
    text-align: left;
}

.starter-chip-title {
    display: block;
    font-weight: 800;
    margin-bottom: 4px;
}

.starter-chip-copy {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.chat-composer {
    position: sticky;
    bottom: 0;
}

.composer-label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}

.composer-box {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.composer-box textarea {
    flex: 1;
    min-height: 54px;
    max-height: 180px;
    padding: 15px 16px;
    resize: none;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--ink);
}

.composer-box textarea:focus,
.quick-card:focus-visible,
.category-chip:focus-visible,
.faq-filter:focus-visible,
.starter-chip:focus-visible,
.vr-open-button:focus-visible,
.language-option:focus-visible,
.language-contact:focus-visible,
.topbar-contact:focus-visible,
.nav-item:focus-visible,
.ai-entry-button:focus-visible,
.language-pill:focus-visible {
    outline: 2px solid rgba(46, 90, 79, 0.4);
    outline-offset: 2px;
}

.send-button {
    border-radius: 18px;
    padding: 14px 18px;
    background: var(--accent);
    color: #f7fbf8;
    font-weight: 800;
}

.composer-status {
    min-height: 22px;
    margin: 10px 2px 0;
    color: var(--muted);
    font-size: 12px;
}

.vr-panel {
    display: grid;
    gap: 14px;
}

.vr-panorama {
    width: 100%;
    min-height: 360px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    overflow: hidden;
    background: #111;
}

.vr-panorama[hidden] {
    display: none;
}

.vr-room-image {
    width: 100%;
    max-height: 62vh;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    object-fit: contain;
    background: #fff;
    display: block;
}

.vr-room-image[hidden] {
    display: none;
}

.faq-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.faq-item {
    overflow: hidden;
}

.faq-toggle {
    width: 100%;
    padding: 16px;
    display: grid;
    gap: 6px;
    text-align: left;
}

.faq-answer {
    display: none;
    padding: 0 16px 16px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.faq-answer p {
    margin: 0;
}

.faq-answer-image {
    width: 100%;
    height: auto;
    margin: 0 0 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    object-fit: contain;
    background: #fff;
    display: block;
}

.faq-item.is-open .faq-answer {
    display: block;
}

.faq-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faq-filter.is-active,
.category-chip.is-active {
    background: var(--accent-soft);
    border-color: rgba(46, 90, 79, 0.2);
}

.bottom-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 14px var(--safe-bottom);
    border-top: 1px solid rgba(144, 123, 95, 0.14);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
}

.nav-item {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 18px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.nav-item[hidden] {
    display: none;
}

.nav-item.is-active {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.nav-icon {
    font-size: 16px;
    line-height: 1;
}

.language-screen {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(237, 232, 225, 0.92);
    backdrop-filter: blur(18px);
    z-index: 20;
}

.language-screen.is-active {
    display: grid;
}

.language-card {
    width: min(430px, 100%);
    padding: 32px 26px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(144, 123, 95, 0.14);
    box-shadow: var(--shadow);
    display: grid;
    gap: 18px;
    text-align: center;
}

.language-title {
    font-size: 34px;
    line-height: 1.08;
}

.language-actions {
    display: grid;
    gap: 12px;
}

.language-contact {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--gold-soft) 0%, rgba(255, 255, 255, 0.98) 100%);
    border: 1px solid rgba(175, 133, 84, 0.22);
    color: var(--accent-strong);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(175, 133, 84, 0.12);
}

.language-contact-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.language-contact-number {
    font-size: 26px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}

.language-option {
    width: 100%;
    padding: 18px;
    border-radius: 22px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    font-weight: 800;
    font-size: 18px;
}

.empty-state {
    padding: 24px 10px;
    color: var(--muted);
    text-align: center;
    line-height: 1.7;
}

@media (max-width: 430px) {
    .guest-app {
        padding: 0;
    }

    .phone-shell {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
    }

    .language-card {
        border-radius: 28px;
    }

    .vr-panorama {
        min-height: 300px;
    }
}
