@charset "UTF-8";

/* =========================================
   1. /Core Variables (記憶を構成する色彩)/
========================================= */
:root {
    --pale-gray: #e8e9ec;
    --pearl-white: #fdfdfd;
    --smoky-lilac: #c8bccc;
    --deep-lilac: #8e8494;
    --text-dark: #3a3a40;
    --text-light: #8a8a92;
    --fog-color: rgba(253, 253, 253, 0.95);
    --transition-slow: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    --text-light: rgba(229, 213, 176, 0.7);
}



/* =========================================
   2. /Base & Typography (基本設定)/
========================================= */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Noto Serif JP', serif;
    font-weight: 300;
    background-color: var(--pearl-white);
    color: var(--text-dark);
    letter-spacing: 0.1em;
    line-height: 2.2;
    overflow-x: hidden;
    transition: background-color 1s ease, color 1s ease;
    color: black;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.menu-open { 
    overflow: hidden; 
}

h1, h2, h3 { 
    font-weight: 200; 
    letter-spacing: 0.15em; 
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: all 0.3s ease; 
}

.section-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.section-fade.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* =========================================
   3. /Global Layout (ヘッダー・フッター・座標)/
========================================= */
.top-brand-header {
    padding: 10px 0; 
    text-align: center; 
    position: fixed; 
    top: 0;
    width: 100%;
    z-index: 98;
    background: rgba(253, 253, 253, 0.4); 
    backdrop-filter: blur(8px);
}

.top-logo {
    height: 8vh; 
    width: auto;  
    margin: 0 auto;
    display: block;
    transition: opacity 0.4s ease;
}

.footer {
    padding: 15vh 0 5vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
}

.footer-message {
    margin-bottom: 2rem;
    max-width: 600px;
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* JSで制御するため、CSSは「基本の形」だけにする */

.side-coordinates {
    position: fixed;
    white-space: nowrap;
    user-select: none;
    font-family: 'Cinzel', serif; /* もしあれば、より装飾的なフォント */
    /* JSが var(--move-x) を計算するまでの初期値 */
    --move-x: 0px;
    --move-y: 0px;
}


.secret-sticky-asset {
    display: none; 
}

.secret-sticky-asset img {
    width: 100%;
    height: auto;
}

@keyframes floating-vessel {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.secret-sticky-asset {
    animation: floating-vessel 6s ease-in-out infinite;
}

/* =========================================
   4. /Menu Overlay (聖域の地図)/
========================================= */
.menu-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: var(--fog-color);
    backdrop-filter: blur(15px) grayscale(0.5); 
    z-index: 9999; 
    display: flex;
    align-items: center; justify-content: center;
    opacity: 0; 
    visibility: hidden; 
    pointer-events: none; 
    transition: all var(--transition-slow);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; 
}

.menu-overlay::before {
    content: "SANCTUM";
    position: absolute;
    left: 5vw;
    top: 50%;
    font-size: 20vw;
    font-weight: 900;
    color: var(--text-dark);
    opacity: 0.03;
    letter-spacing: 0.1em;
    pointer-events: none;
    z-index: -1;
    transform: translateY(-50%) translate(var(--move-x, 0), var(--move-y, 0));
    transition: transform 0.2s ease-out;
}

.menu-container.right-aligned {
    display: flex;
    width: 100%;
    max-width: 1000px;
    justify-content: flex-end;
    text-align: right;
}

.menu-list {
    list-style: none;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3rem; 
}

.menu-link { 
    font-size: 2.2rem; 
    color: var(--text-dark); 
    position: relative; 
    display: flex; 
    align-items: baseline;
    gap: 1.5rem;
}

.menu-link::before {
    content: attr(data-index); 
    font-size: 0.8rem;
    font-family: 'Noto Serif JP', serif;
    letter-spacing: 0.2em;
    opacity: 0.5;
    color: var(--deep-lilac);
}

.menu-overlay.active .menu-list li {
    animation: menuSlideIn 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    opacity: 0;
}

.menu-overlay.active .menu-list li:nth-child(1) { animation-delay: 0.1s; }
.menu-overlay.active .menu-list li:nth-child(2) { animation-delay: 0.2s; }
.menu-overlay.active .menu-list li:nth-child(3) { animation-delay: 0.3s; }
.menu-overlay.active .menu-list li:nth-child(4) { animation-delay: 0.4s; }
.menu-overlay.active .menu-list li:nth-child(5) { animation-delay: 0.5s; }
.menu-overlay.active .menu-list li:nth-child(6) { animation-delay: 0.6s; }
.menu-overlay.active .menu-list li:nth-child(7) { animation-delay: 0.7s; }

@keyframes menuSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* =========================================
   5. /Side Controls & Guide (操作ボタン・案内人)/
========================================= */
.side-controls {
    position: fixed;
    bottom: 40px; 
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px; 
    align-items: center;
    z-index: 10000; 
}

.guide-trigger-btn, .menu-toggle-btn {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--pearl-white);
    border: 1px solid var(--smoky-lilac);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    color: var(--text-dark);
}

.guide-trigger-btn {
    transition: opacity 0.4s, visibility 0.4s, background 0.4s, color 0.4s;
}

.guide-trigger-btn:hover {
    background: var(--text-dark);
    color: var(--pearl-white);
}

.menu-toggle-btn { flex-direction: column; gap: 7px; }
.menu-line {
    width: 22px; height: 1px;
    background-color: currentColor;
    transition: transform 0.5s, opacity 0.5s;
}

body.menu-open .menu-toggle-btn {
    background: var(--text-dark);
    color: var(--pearl-white);
    border-color: var(--text-dark);
}
body.menu-open .menu-toggle-btn .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
body.menu-open .menu-toggle-btn .menu-line:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
}

body.menu-open .guide-trigger-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.guide-sanctuary {
    position: fixed !important; 
    bottom: 200px; 
    right: 40px;
    width: 40vw; 
    height:30vw;
    background: var(--fog-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--smoky-lilac);
    border-radius: 2px;
    padding: 25px;
    z-index: 10005;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    display: flex; 
    flex-direction: column;
    visibility: hidden; 
    opacity: 0;
    filter: blur(15px); 
    transform: translateY(-20px); 
    transition: 
        opacity 0.6s ease-in, 
        transform 0.6s ease-in, 
        filter 0.6s ease-in, 
        visibility 0.6s;
}

.guide-sanctuary.active {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    filter: blur(0) !important;
    animation: emergeFromFog 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes emergeFromFog {
    0% { opacity: 0; transform: translateY(40px) scale(0.95); filter: blur(10px); }
    60% { opacity: 1; transform: translateY(-5px) scale(1.02); filter: blur(5px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.guide-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(200,188,204,0.3);
    padding-bottom: 10px;
}
.guide-icon { color: var(--deep-lilac); font-size: 0.8rem; }
.guide-name { font-size: 0.85rem; margin: 0; letter-spacing: 0.2em; color: var(--text-dark); }

.guide-chat-box {
    flex: 1;
    height: 250px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scrollbar-width: none; 
}
.guide-chat-box::-webkit-scrollbar { display: none; }

.guide-message { text-align: left; font-size: 0.9rem; line-height: 2; color: var(--text-dark); margin: 0; }
.user-message { text-align: right; font-size: 0.85rem; color: var(--text-light); font-style: italic; margin: 0; }

.guide-input-area { display: flex; gap: 10px; align-items: center; }
#guide-input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--smoky-lilac);
    padding: 8px 0;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-dark);
    outline: none;
}
.guide-send-btn {
    background: transparent;
    border: 1px solid var(--smoky-lilac);
    color: var(--text-light);
    padding: 4px 12px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: 0.3s;
}
.guide-send-btn:hover { border-color: var(--text-dark); color: var(--text-dark); }

/* =========================================
   6. /Index & Gallery (トップ展示)/
========================================= */
.hero { min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.brand-logo { width: 100%; max-width: 500px; height: auto; margin-bottom: 3rem; }

.concept {
    padding: 5vh 5vw;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; 
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 15vh 5vw;                        
    padding: 10vh 10vw;                   
    max-width: 1400px;                    
    margin: 0 auto;
}

.exhibit {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

a.exhibit-image-wrapper {
    display: block;
    position: relative;
    width: 100%;
    max-width: 500px; 
    aspect-ratio: 1 / 1;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
}

.exhibit-image { width: 100%; height: 100%; transition: transform 2s ease; }

.exhibit-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--fog-color); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.exhibit-image-wrapper:hover .exhibit-overlay { opacity: 1; backdrop-filter: blur(15px); }
.exhibit-image-wrapper:hover .exhibit-image { transform: scale(1.05); }

.overlay-content { text-align: center; opacity: 0; transform: translateY(20px); transition: all 1s ease 0.2s; }
.exhibit-image-wrapper:hover .overlay-content { opacity: 1; transform: translateY(0); }

.price { display: block; font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text-dark); }
.exhibit-details { text-align: center; margin-top: 3rem; max-width: 600px; }
.exhibit-title { font-size: 1.2rem; margin-bottom: 1rem; }
.exhibit-desc { font-size: 0.95rem; color: var(--text-light); line-height: 2; }

/* =========================================
   7. /Products (特別展示レイアウト)/
========================================= */
.product-immersive-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    min-height: 100vh;
    padding-top: 80px; 
    background-color: var(--pearl-white);
    position: relative;
    align-items: center; 
    overflow: hidden;
}

.product-immersive-layout::before {
    content: "F";
    position: absolute;
    top: 50%;
    left: -5vw;
    transform: translateY(-50%);
    font-size: 12vw;
    font-weight: 900;
    color: var(--pale-gray);
    opacity: 0.1;
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
    letter-spacing: 0.2em;
}

.product-visual-column {
    position: relative;
    z-index: 1;
    padding: 60px;
    display: flex;
    justify-content: center; 
}

.main-image-wrapper {
    width: 100%;
    max-width: 500px; 
    aspect-ratio: 1 / 1.2;
    overflow: hidden;
    background-color: var(--pearl-white);
    box-shadow: 0 40px 100px rgba(0,0,0,0.05);
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease, filter 0.5s ease, transform 1.2s ease;
}

.main-image.switching { opacity: 0.4; filter: blur(15px); }
.main-image:hover { transform: scale(1.05); }

.thumbnail-list {
    display: flex;
    gap: 20px;
    margin-top: 2.5rem;
    width: 80vw;
    max-width: 500px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.thumbnail-list::-webkit-scrollbar { display: none; }

.thumbnail {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.3;
    filter: grayscale(1);
    transition: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.thumbnail.active, .thumbnail:hover { opacity: 1; filter: grayscale(0); transform: scale(1.1); }

.product-narrative-column {
    position: relative;
    z-index: 1;
    padding: 60px;
    display: flex;
    justify-content: flex-start;
}

/* --- Spec Block (号数・素材) --- */
.fragment-specs {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    border-left: 1px solid var(--smoky-lilac);
    padding-left: 1.5rem;
}
.spec-item { display: flex; flex-direction: column; }
.spec-label { font-size: 0.7rem; color: var(--text-light); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.5rem; }
.spec-value { font-size: 0.95rem; color: var(--text-dark); }

/* --- Craftsmanship Section --- */
.craftsmanship-note {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--pale-gray);
}
.craft-title { font-size: 0.9rem; letter-spacing: 0.3em; margin-bottom: 1.5rem; color: var(--text-dark); }
.craft-text { font-size: 0.9rem; line-height: 2.2; color: var(--text-light); font-style: italic; }

/* --- Handling Links --- */
.manifesto-links {
    margin: 4rem 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* ★左揃えに強制 */
    gap: 1rem;
    text-align: left;        /* ★念のためテキストも左へ */
}
.ritual-link {
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: underline;
    text-underline-offset: 5px;
    transition: color 0.4s;
   
}
.ritual-link:hover { color: var(--text-dark); }

.narrative-content {
    max-width: 480px; 
    text-align: left;
}

.product-header {
    border-bottom: 1px solid var(--pale-gray);
    margin-bottom: 3rem;
    padding-bottom: 2rem;
}

.exhibit-number {
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.refined-product-title {
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 200;
}

.refined-product-price {
    font-size: 1.6rem;
    color: var(--text-dark);
}

.refined-product-desc {
    font-size: 1.05rem;
    line-height: 2.2;
    color: var(--text-dark);
    margin-bottom: 4rem;
    overflow-wrap: break-word;
}

/* =========================================
   8. /Cart & Quantity (記憶の準備室)/
========================================= */
.cart-page {
    padding: 15vh 5vw 10vh;
    max-width: 800px;
    margin: 0 auto;
    min-height: 70vh;
}
.cart-title { text-align: center; font-size: 2rem; color: var(--text-dark); margin-bottom: 0.5rem; }
.cart-subtitle { text-align: center; font-size: 0.9rem; color: var(--text-light); letter-spacing: 0.2em; margin-bottom: 4rem; }
.cart-empty { text-align: center; margin: 10vh 0; color: var(--text-dark); }

.cart-item {
    display: flex; align-items: center; gap: 2rem;
    border-bottom: 1px solid var(--pale-gray);
    padding: 2rem 0;
}
.cart-item-img {
    width: 100px; height: 100px;
    background-size: cover; background-position: center;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.05);
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 1.2rem; margin: 0 0 0.5rem 0; font-weight: 300; }
.cart-item-price { font-size: 0.9rem; color: var(--text-dark); margin-bottom: 0.5rem; }
.cart-item-remove { font-size: 0.8rem; color: var(--smoky-lilac); cursor: pointer; transition: color 0.3s; }
.cart-item-remove:hover { color: var(--text-dark); }
.cart-item-subtotal { font-size: 1.2rem; font-family: 'Noto Serif JP', serif; }

/* カート内の商品名リンク：装飾を消しつつ、ホバー時に少しだけ記憶を揺らす */
.cart-item-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.4s ease;
}

.cart-item-link:hover {
    opacity: 0.6; /* 触れると少し透ける演出 */
}

.cart-total { text-align: right; font-size: 1.8rem; margin: 3rem 0; border-bottom: 1px solid var(--text-dark); padding-bottom: 1rem; }
.total-label { font-size: 1rem; color: var(--text-light); margin-right: 1rem; }

.checkout-actions { display: flex; gap: 2vw; justify-content: center; margin-top: 4rem; }
.btn-guest { background-color: transparent; color: var(--text-dark); }
.btn-guest:hover { background-color: var(--pale-gray); }
.btn-login { background-color: var(--text-dark); color: var(--pearl-white); }
.btn-login:hover { background-color: transparent; color: var(--text-dark); }

.quantity-control-wrapper {
    display: flex !important;
    flex-direction: row !important; 
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
}

.quantity-form { margin: 0; display: flex; align-items: center; }

.qty-btn {
    background: transparent;
    border: 1px solid #ddd;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.1rem; color: var(--text-dark);
    transition: all 0.3s ease; line-height: 1;
}

.qty-btn:hover:not(:disabled) {
    border-color: var(--text-dark);
    background: var(--text-dark);
    color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.qty-btn:disabled { opacity: 0.2; cursor: default; border-color: #eee; }

.quantity-display {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.2rem; min-width: 2rem; text-align: center; color: var(--text-dark);
}

/* =========================================
   9. /Static Pages & Forms (静的ページ・入力器)/
========================================= */
.static-page-layout {
    padding-bottom: 100px;
    min-height: 100vh;
    background-color: #fdfdfd; 
    color: #3a3a40;           
    display: flex;
    flex-direction: column;
    align-items: center;      
    transition: background 1.0s ease, color 1.0s ease;
}

.static-page-container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding-top: 8vh; 
}

.static-page-title {
    font-size: 2.8rem;
    font-weight: 200;
    margin-bottom: 5rem;
    letter-spacing: 0.2em;
    text-align: center;
}

.static-content-body { line-height: 2.8; letter-spacing: 0.12em; }

.vessel-field { margin-bottom: 3.5rem; position: relative; }
.vessel-label { display: block; font-size: 0.8rem; color: #8a8a92; margin-bottom: 1rem; letter-spacing: 0.15em; }

.vessel-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 0.5rem;
    font-family: 'Noto Serif JP', serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    transition: all 0.4s ease;
    outline: none;
}

textarea.vessel-input { min-height: 120px; resize: none; line-height: 2; }
.vessel-input:focus { border-bottom-color: #3a3a40; }

.btn-whisper, .btn-auth {
    background: transparent;
    border: 1px solid #3a3a40;
    color: #3a3a40;
    padding: 15px 50px;
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    cursor: pointer;
    transition: all 0.6s var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.btn-whisper:hover, .btn-auth:hover { background: #3a3a40; color: #fdfdfd; letter-spacing: 0.5em; }
.btn-auth { width: 100%; margin-top: 1rem; }

.auth-vessel { width: 100%; max-width: 400px; margin-top: 2rem; }
.auth-switcher { margin-top: 3rem; text-align: center; font-size: 0.85rem; color: #8a8a92; letter-spacing: 0.1em; }
.auth-switcher a { color: #3a3a40; text-decoration: underline; text-underline-offset: 5px; margin-left: 0.5em; }
.auth-error { color: #8b0000; font-size: 0.8rem; margin-bottom: 2rem; text-align: center; }

.legal-vessel { margin-top: 8rem; padding-top: 4rem; border-top: 1px solid #e8e9ec; width: 100%; }
.legal-vessel-title { font-size: 0.9rem; letter-spacing: 0.4em; color: #3a3a40; margin-bottom: 3rem; text-align: center; }
.legal-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; max-width: 600px; margin: 0 auto; }
.legal-item-label { font-size: 0.75rem; color: #8a8a92; letter-spacing: 0.1em; }
.legal-item-content { font-size: 0.85rem; color: #3a3a40; line-height: 2; }

/* =========================================
   10. /Dreams (テーマ別世界観)/
========================================= */
.dream-normal {
    --pearl-white: #fdfdfd;   
    --text-dark: #3a3a40;     
    --text-light: #8a8a92;    
    --fog-color: rgba(253, 253, 253, 0.95);
}
.dream-normal body { color: var(--text-light) !important; }
.dream-normal h1, .dream-normal h2, .dream-normal h3,
.dream-normal .menu-title, .dream-normal .cart-title, .dream-normal .refined-product-title { color: var(--text-dark) !important; }
.dream-normal .exhibit-title, .dream-normal .refined-product-price { color: var(--text-dark) !important; }
.dream-normal .exhibit-desc, .dream-normal .refined-product-desc { color: var(--text-light) !important; }
.dream-normal .product-header, .dream-normal .menu-divider { border-bottom-color: var(--smoky-lilac) !important; }
.dream-normal .side-coordinates { color: var(--text-dark) !important; opacity: 0.6; }

.dream-void {
    --pearl-white: #111113;  
    --text-dark: #fcfcfc;    
    --text-light: #9da0a4;   
    --fog-color: rgba(17, 17, 19, 0.98);
}
.dream-void body { color: var(--text-light) !important; }
.dream-void h1, .dream-void h2, .dream-void h3, .dream-void .menu-title, .dream-void .cart-title, .dream-void .refined-product-title {
    color: var(--text-dark) !important; 
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}
.dream-void .hero p, .dream-void .hero h1 { color: var(--text-dark) !important; font-weight: 300; text-shadow: 0 0 15px rgba(255, 255, 255, 0.2); }
.dream-void .concept p, .dream-void .concept-text { color: #e0e0e0 !important; line-height: 2.5; }
.dream-void .exhibit-title, .dream-void .refined-product-price { color: var(--text-dark) !important; }
.dream-void .exhibit-desc, .dream-void .refined-product-desc, .dream-void .shipping-note, .dream-void .btn-outline { color: var(--text-light) !important; }
.dream-void .side-coordinates { color: #66666c !important; }
.dream-void .footer-message, .dream-void .copyright { color: #55555a !important; }
.dream-void .menu-link:hover { color: #ffffff !important; text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
.dream-void .product-header, .dream-void .menu-divider { border-bottom-color: rgba(255, 255, 255, 0.1) !important; }
.dream-void .exhibit-number, .dream-void .cart-subtitle { color: var(--text-light) !important; letter-spacing: 0.3em; }
.dream-void .static-page-layout { background: #0a0a0a; color: #eee; }
.dream-void .cart-item, .dream-void .cart-total-area { border-color: rgba(255, 255, 255, 0.1) !important; }
.dream-void .qty-btn { border-color: #444; color: #eee; }
.dream-void .vessel-input { color: #eee !important; border-bottom-color: rgba(255, 255, 255, 0.2); }
.dream-void .vessel-input:focus { border-bottom-color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }

.dream-crimson {
    --pearl-white: #000000;    
    --text-dark: #ffffff;      
    --text-light: #00ffff;     
    --fog-color: rgba(0, 0, 0, 0.95);
}
.dream-crimson body {
    background-color: #000000 !important;
    color: #ffffff !important;
}
.dream-crimson .guide-sanctuary {
    background: rgba(0, 0, 0, 0.98) !important;
    border: 1px solid var(--text-light);
    color: var(--text-light) !important;
}
.dream-crimson .guide-name, 
.dream-crimson .guide-message { color: #ffffff !important; }
.dream-crimson #guide-input { 
    color: #ffffff; 
    border-bottom-color: var(--text-light);
    background: transparent;
}
.dream-crimson .static-page-layout,
.dream-crimson .cart-page {
    background-color: #000000 !important;
    color: #ffffff !important;
}
.dream-crimson .shipping-note,
.dream-crimson .exhibit-desc,
.dream-crimson .cart-subtitle,
.dream-crimson .cart-total-area p,
.dream-crimson .total-label {
    color: var(--text-light) !important;
    opacity: 1 !important;
}

.noise-fragment {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: screen;
    opacity: 0.6;
}
.noise-fragment.pixel { background: #00ffff; }
.noise-fragment.line { background: #00ffff; height: 1px !important; }
.noise-fragment.cross { background: none !important; }
.noise-fragment.cross::before, .noise-fragment.cross::after {
    content: ''; position: absolute; background: #00ffff;
}
.noise-fragment.cross::before { width: 100%; height: 1px; top: 50%; }
.noise-fragment.cross::after { width: 1px; height: 100%; left: 50%; }
.noise-fragment.frame { border: 1px solid #00ffff; background: none !important; }

.dream-dawn {
    --pearl-white: #fffaf0;   
    --text-dark: #432818;     
    --text-light: #7a6a5a;    
    --fog-color: rgba(255, 250, 240, 0.95);
}
.dream-dawn body { color: var(--text-light) !important; }
.dream-dawn h1, .dream-dawn h2, .dream-dawn h3, .dream-dawn .menu-title, .dream-dawn .cart-title, .dream-dawn .refined-product-title { color: var(--text-dark) !important; }
.dream-dawn .hero p, .dream-dawn .hero h1 { color: var(--text-dark) !important; }
.dream-dawn .concept p, .dream-dawn .concept-text { color: #5a4a3a !important; line-height: 2.5; }
.dream-dawn .exhibit-title, .dream-dawn .refined-product-price { color: var(--text-dark) !important; }
.dream-dawn .exhibit-desc, .dream-dawn .refined-product-desc, .dream-dawn .shipping-note, .dream-dawn .btn-outline { color: var(--text-light) !important; }
.dream-dawn .product-header, .dream-dawn .menu-divider { border-bottom-color: rgba(67, 40, 24, 0.1) !important; }
.dream-dawn .side-coordinates { color: var(--text-dark) !important; opacity: 0.6; }
.dream-dawn .static-page-layout { background: #fdfcf0; }
.dream-dawn .qty-btn { border-color: #d4af37; color: #d4af37; }
.dream-dawn .vessel-input { border-bottom-color: rgba(212, 175, 55, 0.3); }
.dream-dawn .vessel-input:focus { border-bottom-color: #d4af37; }
.dream-secret {
    --pearl-white: #fff5f7; 
    --text-dark: #005f6b;
    --text-light: #4a8e99;
    --fog-color: rgba(255, 245, 247, 0.95);
}
/* Secretテーマ背景を他と統一（グラデーションを削除） */
.dream-secret body { background: var(--pearl-white); }
.dream-secret body, .dream-secret h1, .dream-secret h2, .dream-secret h3, .dream-secret .static-page-title, .dream-secret .menu-link {
    color: var(--text-dark) !important;
    text-shadow: 0 0 12px rgba(0, 95, 107, 0.4);
}
.dream-secret .side-coordinates { color: var(--text-dark) !important; opacity: 0.9; text-shadow: 0 0 10px rgba(0, 95, 107, 0.3); }
.dream-secret h1, .dream-secret h2, .dream-secret .static-page-title { background: none; -webkit-background-clip: border-box; -webkit-text-fill-color: currentcolor; animation: none; }
.dream-secret .menu-list li { border-bottom-color: rgba(0, 95, 107, 0.2) !important; }
.dream-secret .static-page-layout { background: var(--pearl-white); }
.dream-secret .cart-item-name, .dream-secret .cart-grand-total, .dream-secret .qty-btn { color: #005f6b !important; border-color: rgba(0, 95, 107, 0.3); }
.dream-secret .vessel-input { color: #005f6b !important; border-bottom-color: rgba(0, 95, 107, 0.2); }
.dream-secret .vessel-input:focus { border-bottom-color: #005f6b; text-shadow: 0 0 8px rgba(0, 95, 107, 0.2); }

/* --- 完売表示の視認性調整 (Normal, Dawn, Secret) --- */

.dream-normal .btn-whisper.disabled,
.dream-dawn .btn-whisper.disabled,
.dream-secret .btn-whisper.disabled {
    /* 枠線を少しだけ見える薄い黒に */
    border-color: rgba(0, 0, 0, 0.15) !important;
    /* 文字を読みやすい薄い黒に */
    color: rgba(0, 0, 0, 0.4) !important;
    background: transparent !important;
    cursor: not-allowed;
}

/* 完売時の下の注釈テキストも読みやすく調整 */
.dream-normal .sold-out-vessel .shipping-note,
.dream-dawn .sold-out-vessel .shipping-note,
.dream-secret .sold-out-vessel .shipping-note {
    color: rgba(0, 0, 0, 0.5) !important;
}

/* =========================================
   11. /Special Interactions (儀式と住人専用装飾)/
========================================= */
.btn-ritual-container { margin-top: 5rem; position: relative; display: flex; align-items: center; gap: 2rem; }

.btn-crystallize {
    position: relative; background: transparent; border: none; color: var(--text-dark); font-family: inherit; font-size: 1.1rem;
    letter-spacing: 0.3em; padding: 1.5rem 0; cursor: pointer; overflow: hidden; transition: all 1s var(--transition-slow); display: flex; align-items: center;
}

.btn-crystallize::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--deep-lilac), transparent); transform: translateX(-100%); transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-crystallize:hover { letter-spacing: 0.45em; opacity: 0.7; }
.btn-crystallize:hover::after { transform: translateX(100%); }
.btn-crystallize.crystallizing { pointer-events: none; letter-spacing: 0.8em; filter: blur(5px); opacity: 0; }

.is-logged-in .side-coordinates { color: #d4af37; text-shadow: 0 0 15px rgba(212, 175, 55, 0.4); font-weight: 400; }
.is-logged-in .btn-whisper, .is-logged-in .btn-ritual-container .btn-crystallize { border-color: #d4af37; color: #3a3a40; }
.is-logged-in .btn-whisper::after { background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.8), transparent) !important; }
.is-logged-in a:hover { text-shadow: 0 0 8px rgba(212, 175, 55, 0.3); }
.is-logged-in .menu-link:hover { color: #d4af37 !important; letter-spacing: 0.1em; }

.btn-whisper:active, 
.qty-btn:active {
    transform: scale(0.97); 
    opacity: 0.8;            
    transition: transform 0.1s;
}

.btn-whisper.disabled {
    border-color: rgba(229, 213, 176, 0.1) !important;
    color: rgba(229, 213, 176, 0.2) !important;
    cursor: not-allowed;
    background: transparent;
    pointer-events: none; 
}

.sold-out-image {
    filter: grayscale(80%) sepia(20%) brightness(0.7);
    transition: filter 0.8s ease;
}

.order-card {
    border: 1px solid rgba(229, 213, 176, 0.2) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.order-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.3); 
    border-color: rgba(229, 213, 176, 0.6) !important;
}

.status-tag {
    display: inline-block;
    background-color: var(--crimson-accent) !important;
    color: var(--ivory) !important;
    padding: 0.3rem 1rem !important;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    border-radius: 1px;
    box-shadow: 0 0 15px rgba(138, 3, 3, 0.4);
    text-transform: uppercase;
}

/* =========================================
   12. /Global Responsive (800px未満の調律)/
   PC向け(800px以上)の基本スタイルは上記1〜11で定義し、
   スマホ向け(800px未満)はすべてこの中に集約しています。
========================================= */
@media (max-width: 800px) {
    /* --- スマホロゴ調整 --- */
    .top-logo { height: 60px; }

    /* --- 商品レイアウト調整 --- */
    .product-immersive-layout { grid-template-columns: 1fr; }
    .visual-sticky-container { position: relative; height: auto; padding: 5vh 5vw; }
    .menu-container { flex-direction: column; gap: 3rem; width: 90%; align-items: stretch; padding: 10vh 0; }

    /* --- 特定商取引法グリッド調整 --- */
    .legal-grid { grid-template-columns: 1fr; gap: 0.5rem; }
    .legal-item-label { margin-top: 1.5rem; }

    /* --- 根本的な横揺れ封じとレイアウト修正 --- */
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    * {
        box-sizing: border-box;
    }

    .product-immersive-layout { 
        display: block; 
        padding-top: 100px; 
    }
    .refined-product-title {
        font-size: 1.8rem;
        width: 100%;
        overflow-wrap: break-word; 
    }
    .btn-crystallize, .btn-whisper, .btn-auth {
        width: 100%; 
        max-width: 100%;
        min-width: 0; 
        padding: 1.5rem 1rem;
        letter-spacing: 0.2em;
        box-sizing: border-box;
    }

    /* --- ディテール・文字サイズ調整 --- */
    body {
        font-size: 16px; 
        line-height: 1.7;
    }
    .static-page-title { 
        font-size: 1.8rem !important; 
        margin-bottom: 3rem; 
        padding: 0 5vw;
        line-height: 1.2;
        word-wrap: break-word;
    }
    .visual-sticky-container { 
        position: relative; 
        top: 0; 
        height: auto; 
        padding: 2vh 5vw; 
    }
    .main-image-wrapper { 
        max-width: 100%; 
        aspect-ratio: 1 / 1; 
    }
    .refined-product-price { 
        font-size: 1.5rem; 
        border-left: none; 
        border-bottom: 1px solid var(--deep-lilac); 
        padding: 0 0 10px 0; 
        display: inline-block;
    }
    .refined-product-desc { font-size: 1.1rem; line-height: 2; }
    .narrative-content { max-width: 100%; }

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 5vh 5vw;                        
    padding: 10vh 10vw;                   
    max-width: 1400px;                    
    margin: 0 auto;
}

    /* --- 案内人 (Guide) のスマホ対応・生命感の調律 --- */
    .guide-sanctuary {
        width: 90vw; 
        left: 5vw; 
        right: 5vw; 
        height: 60vh; 
        padding: 20px;
        bottom: calc(130px + env(safe-area-inset-bottom));
        box-sizing: border-box; 
        transition: bottom 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    }
    .guide-input-area {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        box-sizing: border-box;
    }
    #guide-input {
        flex: 1;
        min-width: 0; 
        font-size: 16px; 
    }
    .guide-send-btn {
        flex-shrink: 0; 
        white-space: nowrap; 
        padding: 8px 15px;
    }
    .guide-chat-box {
        height: calc(100% - 100px); 
    }

    /* --- カート (Cart) 横長レイアウト・サイズ調律 --- */
    .cart-page {
        padding: 100px 5vw 8vh; 
        width: 100%;
        box-sizing: border-box;
    }
    .cart-item {
        flex-direction: row !important; 
        flex-wrap: wrap;               
        align-items: center;
        justify-content: space-between;
        text-align: left;
        padding: 1.5rem 0;
        gap: 0.8rem;
        border-bottom: 1px solid var(--pale-gray);
    }
    .cart-item-info {
        flex: 1;           
        min-width: 120px;
        width: auto;
    }
    .cart-item-name {
        font-size: 1rem !important; 
        margin-bottom: 0.2rem;
        font-weight: 400; 
        line-height: 1.3;
    }
    .cart-item-price {
        font-size: 0.8rem;
        color: var(--text-light);
    }
    .quantity-control-wrapper {
        margin: 0;
        gap: 0.5rem;
        order: 2; 
        justify-content: center;
    }
    .qty-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    .quantity-display {
        font-size: 1.1rem;
        min-width: 1.5rem;
    }
    .cart-item-subtotal-area {
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
        text-align: right;
        width: auto !important;
        order: 3;
    }
    .cart-item-subtotal {
        font-size: 1rem !important;
        display: block;
        font-family: 'Noto Serif JP', serif;
    }
    .cart-remove-form {
        order: 4;
        margin-left: 0.5rem;
    }
    .cart-total-area {
        margin-top: 4rem;
        text-align: center !important; 
        border-top: 1px solid var(--text-dark);
        padding: 2rem 0;
    }
    .cart-total-area p {
        font-size: 1.2rem; 
        margin-bottom: 0.8rem;
    }
    .cart-total { 
        font-size: 2.2rem !important; 
        margin: 3rem 0; 
    }
    .final-total-display {
        font-size: 1.8rem !important;
        margin-top: 1rem;
        display: block;
        letter-spacing: 0.05em;
    }
    .checkout-actions {
        display: flex;
        justify-content: center; 
        width: 100%;
        margin-top: 3rem;
    }
    #checkout-link.btn-whisper, .checkout-actions .btn-whisper {
        width: auto !important;      
        min-width: 200px;            
        display: inline-block !important;
        padding: 1.2rem 2.5rem !important;
        font-size: 1.1rem !important;
        margin: 0 auto;              
        box-sizing: border-box;
        transition: transform 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    }

    /* サムネイルリストの幅を制限して端を見やすくする */
    .thumbnail-list {
        width: 75vw;           /* 画面幅の80%に制限 */
        margin: 2rem auto 0;   /* 中央に配置 */
        justify-content: flex-start; /* スクロール開始位置は左から */
        padding: 10px 0;
        gap: 10px;             /* 間隔を少し詰めて密度を上げる */
    }

    .thumbnail {
        flex: 0 0 55px;        /* スマホでは少し押しやすくサイズアップ */
        width: 55px;
        height: 55px;
    }


    .fragment-specs {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }
    .craftsmanship-note { margin-top: 4rem; }
    .manifesto-links { align-items: flex-start; /* ★左揃えに強制 */
    text-align: left; }
}
    /* --- メニュー・ボタンの動的演出 (生命感) --- */
    .menu-container.right-aligned {
        justify-content: center;
        text-align: center;
        width: 100%;
    }
    .menu-list {
        align-items: center;
        gap: 0.8rem; 
        padding: 0;
    }
    .menu-link {
        font-size: 1.3rem; 
        flex-direction: column;
        align-items: center;
        gap: 0.3rem; 
    }
    .menu-link::before {
        font-size: 0.8rem;
        opacity: 0.5;
        letter-spacing: 0.1em;
    }
    .side-controls {
        bottom: calc(20px + env(safe-area-inset-bottom));
        right: 20px;
        transition: bottom 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    }
    .guide-trigger-btn, .menu-toggle-btn { 
        width: 50px; 
        height: 50px; 
    }
    .guide-trigger-btn:active, 
    .menu-toggle-btn:active {
        transform: scale(0.9); 
        transition: transform 0.1s ease;
    }

    @keyframes menuSlideIn {
        0% {
            opacity: 0;
            transform: translateY(30px) scale(0.9);
        }
        70% {
            transform: translateY(-5px) scale(1.05); 
        }
        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    /* --- 極小画面 (450px未満相当) への配慮 --- */
    .static-page-container { width: 92%; }
    .btn-whisper, .btn-auth, .btn-crystallize {
        font-size: 0.85rem;
        padding: 1.2rem 1.5rem;
        letter-spacing: 0.2em;
    }
    .refined-product-desc { font-size: 0.95rem; line-height: 2.2; }
}

@keyframes scan { 100% { left: 100%; } }

/* --- 霧の地盤（初期ブラー層） --- */
#dream-shroud {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease;

    /* 1層目のボケ（ベース） */
    filter: blur(var(--base-blur, 2px)); 
    opacity: var(--shroud-opacity, 0.9);

  -webkit-mask-image: radial-gradient(
        circle at var(--x, 50%) var(--y, 50%),
        transparent 0,
        transparent var(--r, 100px),
        black calc(var(--r, 100px) + 80px) /* 200→80に短縮：すぐボケ始める */
    );
    mask-image: radial-gradient(
        circle at var(--x, 50%) var(--y, 50%),
        transparent 0,
        transparent var(--r, 100px),
        black calc(var(--r, 100px) + 80px)
    );
}

/* --- 上に乗る深い霧（グラデーション・ブラー層） --- */
#dream-shroud::after {
    content: '';
    position: absolute;
    inset: 0;
 background-image: var(--dynamic-image, url('assets/images/default_scenery.png'));
    background-size: cover;
    background-position: center;

    /* 2層目のボケ（1層目より強く設定） */
    filter: blur(var(--extra-blur, 40px));
    
   /* 数値を1層目と揃え、グラデーションの幅を狭める */
    -webkit-mask-image: radial-gradient(
        circle at var(--x, 50%) var(--y, 50%),
        transparent 0,
        transparent calc(var(--r, 100px) + 40px), 
        black calc(var(--r, 100px) + 150px) /* 400→150に短縮：霧がすぐ濃くなる */
    );
    mask-image: radial-gradient(
        circle at var(--x, 50%) var(--y, 50%),
        transparent 0,
        transparent calc(var(--r, 100px) + 40px),
        black calc(var(--r, 100px) + 150px)
    );
}

/* --- テーマ別：ブラーの強さと画像の設定 --- */
/* Void: 深淵（画像が何であれ、深く暗くボケる） */
.dream-void {
    --base-blur: 10px;
    --extra-blur: 20px;
    --shroud-opacity: 0.98;
}

/* Dawn: 夜明け（画像が何であれ、薄く明るくボケる） */
.dream-dawn {
    --base-blur: 5px;
    --extra-blur: 10px;
    --shroud-opacity: 0.96;
}

.dream-secret {
    --base-blur: 7px;
    --extra-blur: 40px;
}