:root {
    --primary-color: #c21822;
    --primary-hover: #a0141c;
    --bg-color: #f8f9fa;
    --sidebar-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --bubble-user: #c21822;
    --bubble-ai: #ffffff;

    /* 動的に変わる変数（初期値はアヴァンス用） */
    --chat-bg: #fafafa;
    --chat-accent: #c21822;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    height: 100vh;
    height: 100dvh;
    /* 最新のスマホ対応高さ */
    overflow: hidden;
    touch-action: pan-x pan-y;
}

#app {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100%;
}

/* Sidebar - Only used if nav is needed */
.sidebar {
    display: none;
    /* Separated pages don't need the shared sidebar navigation by default */
}

/* Content Area */
.content {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Chat UI */
.chat-container {
    max-width: 800px;
    margin: 20px auto;
    width: 95%;
    height: calc(100% - 40px);
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .chat-container {
        margin: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        max-width: none;
    }
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
    /* 透過を防ぐ */
    z-index: 10;
    /* メッセージより上に表示 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.chat-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.header-left {
    display: flex;
    align-items: center;
}

.industry-selector {
    position: relative;
    display: inline-block;
}

#industry-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 32px 8px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--chat-accent);
    background-color: var(--white);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

#industry-select:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.status {
    font-size: 12px;
    color: #28a745;
    display: flex;
    align-items: center;
}

.status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
    margin-right: 6px;
}

.chat-messages {
    flex: 1;
    padding: 24px;
    padding-top: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: var(--chat-bg);
    transition: background-color 0.8s ease;
    scroll-padding-top: 10px;
    scroll-behavior: smooth;
}

/* 最初のメッセージが右上のヒント（赤い吹き出し）に被らないように調整 */
.chat-messages>.message:first-child {
    margin-top: 40px;
}

.message {
    display: flex;
    max-width: 80%;
}

.message.ai,
.message.system {
    max-width: 100%;
}

.message.system {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
}

.bubble {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 15px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message.system .bubble,
.message.ai .bubble {
    background-color: #ffffff !important;
    /* AIの回答は常に白背景 */
    color: var(--text-color);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.message.user .bubble {
    background-color: var(--chat-accent);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

/* Quick Replies 統合先へ移動 */

/* Estimate Widget */
.estimate-card {
    background: var(--white);
    border: 2px solid var(--chat-accent);
    border-radius: 16px;
    padding: 20px;
    margin: 10px 0;
    width: 100%;
    max-width: 100%;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease;
}

.estimate-card h4 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--chat-accent);
}

.estimate-slider {
    width: 100%;
    margin: 15px 0;
    accent-color: var(--chat-accent);
}

.estimate-result {
    text-align: center;
    background: var(--chat-bg);
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
}

.estimate-price {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--chat-accent);
}

.estimate-label {
    font-size: 12px;
    color: var(--text-muted);
}

.estimate-submit {
    width: 100%;
    padding: 10px;
    background-color: var(--chat-accent);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.3s;
}

.estimate-submit:hover {
    opacity: 0.9;
}

/* Link Button from AI */
/* Product Image in Chat */
.chat-product-img {
    margin: 10px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.chat-product-img img {
    width: 100%;
    display: block;
}

.chat-link-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: var(--chat-accent);
    color: var(--white);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.chat-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    color: var(--white);
}

/* Roulette Widget */
.roulette-card {
    background: var(--white);
    border: 2px solid var(--chat-accent);
    border-radius: 16px;
    padding: 20px;
    margin: 10px 0;
    text-align: center;
    max-width: 100%;
}

.roulette-display {
    font-size: 24px;
    font-weight: 700;
    margin: 20px 0;
    min-height: 40px;
    color: var(--chat-accent);
}

.roulette-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--chat-accent);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

/* Coupon Widget */
.coupon-card {
    background: linear-gradient(135deg, #fff9c4 0%, #fff176 100%);
    border: 2px dashed #fbc02d;
    border-radius: 12px;
    padding: 20px;
    margin: 10px 0;
    text-align: center;
    position: relative;
    max-width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #333;
}

.coupon-card::before,
.coupon-card::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--chat-bg);
    border-radius: 50%;
    top: 50%;
    margin-top: -10px;
}

.coupon-card::before {
    left: -12px;
}

.coupon-card::after {
    right: -12px;
}

.coupon-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}

.coupon-code {
    display: block;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 10px 0;
    color: #d32f2f;
}

.coupon-limit {
    font-size: 11px;
    color: #555;
}

/* Retail Coupon Widget */
.retail-coupon-gallery {
    padding: 10px 0;
    gap: 15px;
}

.retail-coupon-card {
    flex: 0 0 160px;
    aspect-ratio: 1 / 1.1;
    background-color: #fcfaf5;
    border: 1px solid #e0d8c8;
    border-radius: 12px;
    padding: 15px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", serif;
    color: #5c5243;
    box-shadow: 0 4px 12px rgba(92, 82, 67, 0.08);
    position: relative;
    overflow: hidden;
}

.retail-coupon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(45deg, #e0d8c8, #e0d8c8 10px, transparent 10px, transparent 20px);
}

.rc-title {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.rc-discount {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0d8c8;
    padding-bottom: 10px;
    width: 100%;
    color: #a33;
}

.rc-code-label {
    font-size: 9px;
    color: #8c8273;
    margin-bottom: 2px;
}

.rc-code {
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    background: #f4eee1;
    padding: 4px 8px;
    border-radius: 4px;
}

.rc-desc {
    font-size: 9px;
    color: #8c8273;
    line-height: 1.4;
}

/* Style Gallery (Horizontal Scroll) */
.style-gallery {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
    margin: 10px 0;
    scrollbar-width: none;
    /* Firefox用：スクロールバーを隠す */
    -ms-overflow-style: none;
    /* IE用 */
}

.style-gallery::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari用：スクロールバーを隠す */
}

.style-card {
    flex: 0 0 200px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

.style-card:hover {
    transform: translateY(-5px);
}

.style-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.style-info {
    padding: 12px;
    text-align: center;
}

.style-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.style-select-btn {
    width: 100%;
    padding: 8px;
    background-color: var(--chat-accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

/* Gift Diagnosis Widget */
.gift-card {
    background: #fff;
    border: 2px solid #f48fb1;
    /* 優しいピンク */
    border-radius: 16px;
    padding: 20px;
    margin: 10px 0;
    width: 100%;
    max-width: 100%;
    box-shadow: var(--shadow);
}

.gift-card h4 {
    color: #ad1457;
    margin-bottom: 15px;
    font-size: 16px;
}

.gift-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gift-opt-btn {
    padding: 10px;
    background: #fce4ec;
    border: 1px solid #f48fb1;
    border-radius: 8px;
    color: #ad1457;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.gift-opt-btn:hover {
    background: #f48fb1;
    color: #FFFFFF
}

/* Before After Slider */
.ba-slider-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 400px;
    margin: 10px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    user-select: none;
}

.ba-before,
.ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* コンテナの最大幅に合わせる */
    height: 100%;
    background-size: cover;
    background-position: left center;
}

.ba-after-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    border-right: 2px solid #fff;
}

.ba-slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 3px solid var(--chat-accent);
    border-radius: 50%;
    margin-left: -20px;
    top: 50%;
    margin-top: -20px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.ba-slider-handle::before,
.ba-slider-handle::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.ba-slider-handle::before {
    border-right: 8px solid var(--chat-accent);
    margin-right: 2px;
}

.ba-slider-handle::after {
    border-left: 8px solid var(--chat-accent);
    margin-left: 2px;
}

.ba-range-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 4;
}



.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--chat-bg);
    transition: background-color 0.8s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Quick Replies Scroll Hint */
.quick-replies {
    display: flex !important;
    gap: 10px;
    padding: 10px 0;
    padding-right: 40px;
    /* フェード用の余白 */
    overflow-x: auto !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    background-color: var(--chat-bg);
    border: none;
    position: relative;
}

.quick-replies::-webkit-scrollbar {
    display: none;
}

.quick-replies-container {
    position: relative;
    overflow: hidden;
}



/* 右端のフェード効果（固定配置） */
.quick-replies-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--chat-bg) 80%);
    pointer-events: none;
    z-index: 10;
    /* 矢印よりは下、ボタンよりは上 */
}

.quick-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    background: #fff;
    border: 1.5px solid var(--chat-accent);
    color: var(--chat-accent);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.quick-btn:hover {
    background: var(--chat-accent);
    color: #fff;
    transform: translateY(-1px);
}

.input-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    position: relative;
}

/* 隙間に表示するスワイプ誘導ヒント（両方向矢印） */
.input-form::before {
    content: '\27F7';
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    font-weight: 300;
    color: var(--chat-accent);
    opacity: 0.6;
    pointer-events: none;
    animation: swipe-pulse 2s infinite;
}

@keyframes swipe-pulse {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.6;
    }
}

#chat-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 16px;
    resize: none;
    outline: none;
    background: var(--white);
    transition: border-color 0.3s;
    min-height: 44px;
}

#chat-input:focus {
    border-color: var(--chat-accent);
}

#send-btn {
    background-color: var(--chat-accent);
    color: var(--white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 業種別の形状変更 */
.chat-container[data-genre="restaurant"] #send-btn {
    border-radius: 22px 4px 22px 4px;
}

.chat-container[data-genre="beauty"] #send-btn {
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(216, 27, 96, 0.3);
}

.chat-container[data-genre="realestate"] #send-btn {
    border-radius: 4px;
}

.chat-container[data-genre="medical"] #send-btn {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
    animation: pulse-cute 2s infinite;
}

@keyframes pulse-cute {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.chat-container[data-genre="retail"] #send-btn {
    border-radius: 12px 12px 2px 2px;
}

#send-btn:hover {
    filter: brightness(0.9);
    transform: translateY(-2px) scale(1.05);
}

#send-btn:active {
    transform: translateY(0) scale(0.95);
}


#send-btn svg {
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    display: block;
    /* 余白除去 */
}

/* 塗りつぶしが必要なアイコンの調整 */
.chat-container[data-genre="medical"] #send-btn svg,
.chat-container[data-genre="restaurant"] #send-btn svg,
.chat-container[data-genre="realestate"] #send-btn svg,
.chat-container[data-genre="retail"] #send-btn svg {
    fill: currentColor;
    stroke: none;
}


/* スクロール下端ボタン (Gemini風) */
#scroll-bottom-btn {
    position: absolute;
    bottom: 140px;
    /* 少し上に移動 */
    right: 25px;
    width: 44px;
    height: 44px;
    background-color: var(--white);
    border: 1.5px solid var(--chat-accent);
    color: var(--chat-accent);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 100;
    transition: transform 0.2s, opacity 0.2s;
}

#scroll-bottom-btn:hover {
    transform: translateY(-2px);
    background-color: var(--bg-color);
}

#scroll-bottom-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-color);
}

/* Medical Timetable */
.timetable-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin: 10px 0;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.timetable-card h4 {
    font-size: 14px;
    color: #1976d2;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.medical-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: center;
}

.medical-table th,
.medical-table td {
    border: 1px solid #e0e0e0;
    padding: 8px 4px;
}

.medical-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.medical-table .day-sun {
    color: #d32f2f;
}

.medical-table .day-sat {
    color: #1976d2;
}

.medical-table .status-open {
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

.medical-table .status-closed {
    color: #999;
}

.timetable-footer {
    margin-top: 10px;
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}

/* Typing Indicator Animations */
.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 14px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background-color: var(--chat-accent);
    border-radius: 50%;
    display: inline-block;
    animation: dot-blink 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Access Card Widget */
.access-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin: 10px 0;
    width: 100%;
    max-width: 100%;
    box-shadow: var(--shadow);
}

.access-card h4 {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.access-address {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.map-wrapper {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.map-route-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background-color: var(--chat-accent);
    color: var(--white);
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.map-route-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.map-route-btn.secondary {
    background-color: var(--white);
    color: var(--chat-accent);
    border: 1.5px solid var(--chat-accent);
}

.pc-map-note {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    font-size: 11px;
    color: #666;
    line-height: 1.5;
}

.pc-map-note p {
    margin-bottom: 10px;
}

/* Customer Voice Widget */
.voice-container {
    background: #fff;
    border: 2px solid #fce4ec;
    border-radius: 20px;
    padding: 20px;
    margin: 10px 0;
    width: 100%;
    max-width: 100%;
    box-shadow: var(--shadow);
}

.voice-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.voice-item {
    background: #fffafa;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #f8bbd0;
}

.voice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px dashed #f8bbd0;
    padding-bottom: 5px;
}

.voice-name {
    font-size: 13px;
    font-weight: 700;
    color: #880e4f;
}

.voice-rating {
    color: #ffb300;
    font-size: 12px;
    letter-spacing: 1px;
}

.voice-text {
    font-size: 12px;
    color: #444;
    line-height: 1.6;
}

/* Panorama Widget */
.panorama-widget {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 15px;
    margin: 10px 0;
    width: 100%;
    max-width: 100%;
    box-shadow: var(--shadow);
}

.panorama-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.panorama-header h4 {
    font-size: 15px;
}

.panorama-hint {
    font-size: 10px;
    color: var(--chat-accent);
    font-weight: 700;
    animation: side-hint 2s infinite;
}

@keyframes side-hint {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.panorama-viewport {
    width: 100%;
    height: 180px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 10px;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #eee;
    background-color: #000;
}

.panorama-viewport::-webkit-scrollbar {
    height: 4px;
}

.panorama-viewport::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.panorama-img {
    height: 100%;
    width: 200%;
    /* 強制的に横長にする */
    object-fit: cover;
    /* 縦横比を維持しつつ、はみ出した部分をトリミング */
    object-position: center center;
    /* 中央を中心にトリミング */
    display: block;
    max-width: none;
    pointer-events: none;
    /* ドラッグ時の画像選択を防ぐ */
}

.panorama-desc {

    font-size: 11px;
    color: #666;
    margin-top: 10px;
    line-height: 1.5;
}



@keyframes dot-blink {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.clinic-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
}

.clinic-animal {
    display: inline-block;
    animation: animal-bounce 0.6s infinite alternate ease-in-out;
}

@keyframes animal-bounce {
    from {
        transform: translateY(0) rotate(0deg);
    }

    to {
        transform: translateY(-8px) rotate(10deg);
    }
}

.loading-text {
    font-size: 11px;
    color: #666;
    font-weight: 600;
}

/* Page Specific Adjustments */
.admin-page .sidebar {
    display: none;
}

.admin-page .content {
    padding: 40px 20px;
    overflow-y: auto;
}

/* Admin UI */
.admin-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 40px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-color);
}

.admin-logo {
    font-size: 24px;
    font-weight: 700;
}

.admin-logo .sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 10px;
    font-weight: 400;
}

.admin-section {
    margin-bottom: 40px;
}

.admin-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.description {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}


.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.required {
    color: var(--primary-color);
}

input[type="url"],
input[type="text"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
}

input:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(194, 24, 34, 0.1);
}

.url-list input {
    margin-bottom: 12px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    animation: fadeIn 0.3s ease forwards;
}

/* Petal Animation */
.sakura-petal {
    position: fixed;
    top: -20px;
    width: 15px;
    height: 15px;
    background-color: #ffb7c5;
    border-radius: 15px 0 15px 0;
    z-index: 9999;
    pointer-events: none;
    animation: petal-fall linear forwards;
    box-shadow: 0 0 5px rgba(255, 183, 197, 0.5);
}

@keyframes petal-fall {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) rotate(720deg) scale(1.2);
        opacity: 0;
    }
}

/* Coach Mark (Tooltip Hint) */
.coach-mark {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--chat-accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2000;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: coach-float 2s infinite ease-in-out;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top right;
}

.coach-mark-arrow {
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--chat-accent);
}

@keyframes coach-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

.coach-mark.hidden {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    #app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 12px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        margin-bottom: 0;
    }

    .nav-links {
        display: flex;
        gap: 8px;
    }

    .nav-links li {
        margin-bottom: 0;
        padding: 8px 12px;
    }

    .nav-links span {
        display: none;
    }

    .tab-content {
        padding: 16px;
    }
}