:root {
    /* Monotone Pop Theme Variables */
    --bg-color: #ffffff;
    --nav-bg: #f5f5f5;
    /* Light gray for subtle separation */
    --text-primary: #111111;
    /* Almost black */
    --text-secondary: #666666;

    /* Dynamic Accent - Used sparingly */
    --accent-color: #d1d1d1;
    /* Default to light gray for subtle shadow */

    --dot-color: #d0d0d0;

    /* Pop Design Tokens */
    --border-width: 2px;
    /* Slightly thinner but still solid */
    --border-color: #111111;
    --border-radius: 4px;
    /* Sharp/Kakukaku */

    /* Hard Shadow - Tighter */
    --box-shadow: 3px 3px 0px var(--border-color);
    --box-shadow-hover: 5px 5px 0px var(--border-color);
    --transition-speed: 0.15s;

    /* Light Mode Arrow Default */
    --arrow-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23111111' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");


}



* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img {
    /* Standard smooth scaling */
    image-rendering: auto;
    transform: translateZ(0);
    /* Hardware acceleration hint */
    backface-visibility: hidden;
}

body {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    /* Subtle Dot Pattern */
    background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
    background-size: 24px 24px;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* --- Navigation --- */
.character-nav {
    width: 320px;
    background-color: var(--nav-bg);
    display: flex;
    flex-direction: column;
    border-right: var(--border-width) dashed var(--border-color);
    padding: 2rem;
    overflow-y: auto;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.nav-logo {
    font-size: 1.5rem;
    /* Reduced from 2rem */
    font-weight: 900;
    /* Extra bold */
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
    /* Text Stroke effect handled via text-shadow for compatibility */
    text-shadow: 2px 2px 0px var(--accent-color);
    /* Dynamic shadow */
    /* Dynamic shadow */
    transition: transform 0.2s, text-shadow 0.3s;
}

@media (hover: hover) {
    .nav-logo:hover {
        transform: scale(1.05) rotate(-2deg);
    }
}

.nav-logo:active {
    transform: scale(0.95);
}

.nav-description {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.5;
    text-align: center;
    font-weight: 500;
}

/* ... existing */



.profile-quote {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-style: italic;
    background: var(--nav-bg);
    padding: 0.5rem 1rem;
    border: 2px solid var(--text-primary);
    border-radius: 8px;
    display: inline-block;
    box-shadow: 4px 4px 0px var(--text-primary);
    position: relative;
    /* Quotes removed by request */
    -webkit-text-stroke: 3px var(--bg-color);
    paint-order: stroke fill;
    /* Make text pop */
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
}

.nav-item {
    aspect-ratio: 1/1;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    border: var(--border-width) solid var(--border-color);
    background: var(--bg-color);
    transition: all var(--transition-speed);
    position: relative;
    box-shadow: var(--box-shadow);
}

.nav-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 0;
    transition: opacity 0.2s;
    pointer-events: none;
}



.nav-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    /* Focus on face */
    /* transition: filter 0.3s; */
    /* Removed grayscale transition */
}



.nav-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--box-shadow-hover);
}

.nav-item.active {
    border-color: var(--accent-color);
    box-shadow: 3px 3px 0px var(--accent-color);
}

.nav-item.active:hover {
    box-shadow: 5px 5px 0px var(--accent-color);
}

/* --- Filters --- */
.filter-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.nav-filter {
    background-color: var(--bg-color);
    border: var(--border-width) solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem;
    /* Matches glossary link */
    border-radius: var(--border-radius);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
    width: 100%;
    height: 48px;
    /* Force fixed height for alignment */
    line-height: 1.2;
    appearance: none;
    /* Remove default arrow for consistent styling */
    /* Remove default arrow for consistent styling */
    -webkit-appearance: none;
    /* Add custom arrow with SVG */
    background-image: var(--arrow-icon);
    background-position: right 1rem center;
    background-size: 12px 12px;
    background-repeat: no-repeat;
}

.nav-filter:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--box-shadow-hover);
}

/* --- Glossary Link --- */
.glossary-link-container {
    margin-bottom: 2rem;
}

.glossary-link {
    display: block;
    width: 100%;
    padding: 0.8rem;
    text-align: center;
    background-color: var(--bg-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
    height: 48px;
    /* Force fixed height for alignment */
    line-height: 1.2;
    /* Reset line height specifically */
    display: flex;
    /* Use flex to center text vertically */
    align-items: center;
    justify-content: center;
}

@media (hover: hover) {
    .glossary-link:hover {
        /* background-color: var(--text-primary); Removed hover color change */
        /* color: var(--bg-color); */
        transform: translate(-2px, -2px);
        box-shadow: var(--box-shadow-hover);
    }
}

.glossary-link:active {
    /* background-color: var(--text-primary); Removed active color change */
    /* color: var(--bg-color); */
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0px var(--border-color);
}



/* --- Gallery --- */
.gallery-section {
    margin-top: 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 3rem;
}

.gallery-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
    text-transform: uppercase;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
    /* Thinner/Lighter shadow using semi-transparent grey */
}

/* --- Main Content --- */
.main-content {
    flex-grow: 1;
    padding: 3rem;
    overflow-y: auto;
    position: relative;
}

.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    /* Changed from 100% to avoid overflow clipping */
    color: var(--text-primary);
    text-align: center;
    background: var(--bg-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    max-width: 700px;
    margin: auto;
    overflow: visible;
    /* Allow icon to hang out */
    margin-top: 30px;
    /* Increased margin for icon space */
    position: relative;
    /* Context for pseudo-element */
    /* overflow: hidden; Removed to allow icon to extend out */
}

.welcome-screen::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 280px;
    /* Covers top area (Icon + Title + Desc) */
    background-image: url('./assets/images/work_cover.gif');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    /* Manually match top corners */

    /* Fade out at the bottom */
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

/* Ensure content sits above background */
.welcome-screen>* {
    position: relative;
    z-index: 1;
}

/* Spin Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}



.welcome-icon-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--box-shadow);
    background: var(--bg-color);
    margin-bottom: 1rem;
    margin-top: -70px;
    /* Pull it up to overlap border */
    position: relative;
    z-index: 10;
    overflow: hidden;
    /* Ensure image stays in circle */
}

.welcome-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    /* Animation */
    animation: spin 10s linear infinite;
    /* Always rotating slowly */
}

.welcome-icon-container:hover .welcome-icon {
    animation: spin 0.2s linear infinite;
    /* Super fast spin on hover */
}

.welcome-screen h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.15);
}

/* --- Links Section --- */
.related-link-container {
    margin-top: 1.5rem;
    text-align: center;
}

.related-c-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-color);
    border: var(--border-width) solid var(--text-primary);
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: var(--box-shadow);
}

.related-c-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--box-shadow-hover);
    background: var(--nav-bg);
}

.related-c-btn:active {
    transform: translate(0, 0);
    box-shadow: none;
}

.links-section {
    width: 100%;
    margin: 2rem 0 0 0;
    /* Reduced bottom margin */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.links-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.links-row .links-group {
    flex: 1;
    min-width: 240px;
    /* Collapse to stack if too narrow */
}

.links-group {
    width: 100%;
}

.gallery-group {
    margin-bottom: 1.5rem;
    /* Add extra spacing */
}

.links-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    text-align: left;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--border-color);
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
}

.link-button {
    display: block;
    padding: 0.6rem 1rem;
    background: var(--bg-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
}

.link-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--box-shadow-hover);
}

.link-button:active {
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0px var(--border-color);
}

.link-button-large {
    font-size: 0.95rem;
    padding: 0.8rem 1.2rem;
}

/* --- Birthday Intro --- */
.birthday-intro {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}



/* --- Character Profile --- */
.profile-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    animation: bounceIn 0.5s forwards;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    70% {
        opacity: 1;
        transform: scale(1.02);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.profile-hero-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top;
    /* Focus on face */
    border-radius: var(--border-radius);
    border: var(--border-width) solid var(--border-color);
    box-shadow: 8px 8px 0px var(--border-color);
    background: var(--bg-color);
}

.profile-info {
    flex: 2;
    padding-top: 0.25rem;
    /* Reduced from 1rem */
    padding-bottom: 1rem;
    position: relative;
    /* Context for absolute positioning */
    display: flex;
    /* Restore Flex */
    flex-direction: column;
    justify-content: flex-start;
}

.background-logo {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    /* Adjust size as needed */
    height: auto;
    opacity: 0.1;
    /* Very faint */
    z-index: -1;
    /* Behind text */
    pointer-events: none;
}

.wide-logo {
    width: 250px;
    top: 1rem;
    right: -1rem;
}

@media (prefers-color-scheme: dark) {
    .background-logo {
        filter: invert(1);
        /* Invert black to white for dark mode */
        opacity: 0.1;
        /* Keep it faint */
    }
}

.profile-title {
    font-size: 1.2rem;
    font-weight: 700;
    background-color: var(--nav-bg);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border: var(--border-width) solid var(--border-color);
    border-radius: 50px;
    display: inline-block;
    width: fit-content;
    margin-bottom: 1rem;
    box-shadow: 2px 2px 0px var(--border-color);
}

.profile-name {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-primary);
    /* Restored Accent Color Shadow */
    text-shadow: 4px 4px 0px color-mix(in srgb, var(--accent-color), transparent 70%);
}

.profile-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 2rem;
    list-style-type: none;
    padding-left: 0;
    background: var(--bg-color);
    padding: 1.5rem;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.profile-description li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-weight: 500;
}

.profile-description li::before {
    content: "■";
    /* Square bullet for sharp look */
    color: var(--text-primary);
    position: absolute;
    left: 0;
    font-size: 0.8em;
    top: 0.4em;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: auto;
}

.stats-under-image {
    margin-top: 1.5rem;
    /* Space from image */
    justify-content: center;
    /* Center items if they wrap */
}

.stat-card {
    background: var(--bg-color);
    padding: 0.8rem;
    /* Slightly reduced padding */
    border-radius: var(--border-radius);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--box-shadow);
    transition: transform 0.2s;
    flex: 1 1 auto;
    /* Allow growth and shrinking */
    min-width: fit-content;
    /* Ensure text fits */
    text-align: center;
    /* Center text inside card */
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
    border-bottom: 1px solid var(--text-primary);
    display: inline-block;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}



.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--box-shadow);
    transition: all 0.2s;
}

.gallery-item:hover {
    transform: translate(-3px, -3px) rotate(1deg);
    box-shadow: 6px 6px 0px var(--border-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.2s;
}

.gallery-empty {
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
    padding: 3rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-color);
}

/* --- Glossary --- */
.glossary-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 8px 8px 0px var(--border-color);
}

.glossary-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 4px solid var(--nav-bg);
}

.glossary-list {
    display: grid;
    gap: 1.5rem;
}

.glossary-category {
    margin-bottom: 3rem;
}

.glossary-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: var(--border-width) solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.glossary-item {
    padding: 1.5rem;
    border: 2px solid var(--nav-bg);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    margin-bottom: 2rem;
}

.glossary-item dt {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.glossary-item dd {
    color: var(--text-primary);
    line-height: 1.6;
    margin-left: 0;
    font-weight: 500;
}

/* --- Responsive Design --- */
/* --- Responsive Design --- */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        height: auto;
        /* Allow full page scroll on mobile */
        overflow: visible;
        /* Disable body scroll lock for mobile feel */
    }

    body {
        overflow: auto;
        /* Re-enable body scroll */
        height: auto;
    }

    /* Navigation Bar */
    .character-nav {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: var(--border-width) dashed var(--border-color);
        padding: 1rem;
        position: sticky;
        top: 0;
        z-index: 100;
        background-color: var(--nav-bg);
    }

    .nav-logo {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .nav-description {
        display: block;
        /* Show description */
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .nav-controls {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .filter-container,
    .glossary-link-container {
        display: block;
        margin-bottom: 0;
        flex: 1;
        /* Equal width */
    }

    .nav-grid {
        display: flex;
        overflow-x: auto;
        gap: 1rem;
        padding: 0.5rem;
        /* Increased padding */
        padding-top: 1rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    /* Compact Stats for Mobile */
    .profile-container {
        gap: 1.5rem;
    }

    /* Welcome Screen Title */
    .welcome-screen h1 {
        font-size: 1.8rem;
    }

    .stats-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .stats-under-image {
        margin-top: 1rem;
    }

    .stat-card {
        padding: 0.5rem 0.8rem;
        flex: 1 1 0;
        /* Force equal width regardless of content */
        min-width: 0;
        /* Allow shrinking */
        text-align: center;
    }

    .stat-label {
        font-size: 0.7rem;
        margin-bottom: 0.1rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    .profile-title {
        font-size: 1rem;
        padding: 0.3rem 0.8rem;
        margin-bottom: 0.5rem;
        /* Reverted spacing */
    }

    .gallery-section {
        margin-top: 1rem;
        /* Further reduced from 3rem */
        padding-bottom: 2rem;
    }

    .gallery-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .filter-container {
        display: block;
        margin-bottom: 0.5rem;
    }

    .glossary-link-container {
        margin-bottom: 0.5rem;
    }

    .nav-controls {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        /* Reduced nav controls margin */
    }

    .nav-grid {
        display: flex;
        overflow-x: auto;
        gap: 0.8rem;
        padding-bottom: 0.5rem;
        padding-top: 0.5rem;
        /* Reduced top padding for icons */
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll */
    }

    .nav-item {
        flex: 0 0 70px;
        /* Fixed width for icons */
        scroll-snap-align: start;
    }

    .nav-name {
        font-size: 0.5rem;
        line-height: 1;
        /* Smaller text */
        padding: 1px 0;
    }

    /* Main Content */
    .main-content {
        padding: 1.5rem;
        width: 100%;
        overflow: visible;
    }

    /* Profile */
    .profile-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .background-logo {
        top: 0;
        /* Revert negative top */
        width: 100px;
        /* Smaller default logo */
    }

    .wide-logo {
        width: 150px;
        /* Smaller wide logo */
        top: 0.5rem;
        /* Slight offset */
    }

    .profile-hero-img {
        aspect-ratio: 1/1;
        /* Square image on mobile usually looks better/compact */
        /* Or keep portrait but max-height? Let's try 3/4 but with max-height */
        aspect-ratio: 3/4;
        max-height: 50vh;
        margin: 0 auto;
        width: auto;
        display: block;
    }

    .profile-name {
        font-size: 2.5rem;
        /* Smaller name */
        margin-bottom: 1.5rem;
        /* Re-increased spacing */
    }

    .profile-info {
        text-align: center;
        /* Center align text on mobile */
    }

    .profile-quote {
        margin-bottom: 2.5rem;
        /* Increased spacing on mobile */
    }

    .profile-description {
        text-align: left;
        /* Keep description left-aligned */
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        /* 2 columns for stats */
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        /* Smaller thumbnails */
        gap: 0.8rem;
    }

    /* Birthday Section */
    .birthday-section {
        margin-top: 2rem;
    }

    .birthday-title {
        font-size: 1.2rem;
    }

    /* Work Page Mobile Styles */
    .work-container {
        padding-bottom: 3rem;
    }

    .work-header-content {
        padding: 1.5rem;
    }

    .work-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .work-cover {
        max-height: 180px;
    }

    .work-status-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .work-status-date {
        font-size: 1.2rem;
        padding: 0.2rem 0.8rem;
    }

    .plan-section {
        margin-bottom: 3rem;
    }

    .plan-section-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .plan-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .plan-name {
        font-size: 1.3rem;
    }

    .plan-price {
        font-size: 1.1rem;
        padding: 0.25rem 0.7rem;
    }

    .cheap-label {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    .detail-list li {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }

    .plan-flow {
        font-size: 0.8rem;
        margin-top: 1rem;
        padding-top: 0.8rem;
    }

    .caution-block {
        padding: 0.8rem;
        font-size: 0.85rem;
    }

    .work-decoration-gif {
        width: 100px !important;
        bottom: 0.3rem;
        right: 0.3rem;
    }

    /* Illustration Image Container - Stack on Mobile */
    #illImageContainer {
        height: 300px !important;
        margin-top: 1rem;
    }

    #illPagination {
        margin-top: 0.8rem !important;
    }

    /* V-Gra Card */
    .vgra-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .vgra-card h3 {
        font-size: 1rem !important;
    }

    .vgra-card p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* Table of Contents */
    .work-toc {
        padding: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .work-toc-links {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .work-toc-link {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    /* Guidelines Section */
    .guideline-block {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .guideline-header {
        font-size: 1.1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .guideline-content h3 {
        font-size: 1rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }

    .guideline-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .guideline-content ul {
        font-size: 0.9rem;
    }

    .copy-box {
        padding: 0.8rem;
        font-size: 0.8rem;
    }

    /* Contact Section */
    .contact-card {
        padding: 1.5rem;
    }

    .contact-check-area {
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .contact-sub-label {
        font-size: 0.95rem;
    }

    .contact-checklist li {
        font-size: 0.9rem;
        padding-left: 1.2rem;
    }

    .contact-method-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .contact-method-item {
        padding: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .method-label {
        font-size: 0.75rem;
        min-width: auto;
    }

    .method-value {
        font-size: 1rem;
        word-break: break-all;
    }

    .contact-note {
        font-size: 0.85rem;
        margin-top: 1rem;
    }

    /* Skeb Note */
    .skeb-note {
        font-size: 0.75rem;
        margin-top: 0.6rem;
    }
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border: 4px solid #fff;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    padding: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

/* --- Birthday Section --- */
.birthday-section {
    margin-top: 1rem;
    /* Reduced from 2rem */
    width: 100%;
    max-width: 700px;
}

.birthday-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 0.5rem;
}

.birthday-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    justify-content: center;
}

.birthday-card {
    background: var(--bg-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
}

.birthday-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--box-shadow-hover);
}

.birthday-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    margin-bottom: 0.5rem;
    background: var(--bg-color);
}

.birthday-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.birthday-info {
    text-align: center;
}

.birthday-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.birthday-name {
    display: block;
    font-size: 0.95rem;
    font-weight: 900;
    margin-bottom: 0.3rem;
}

.birthday-days {
    display: inline-block;
    font-size: 0.75rem;
    background: var(--nav-bg);
    color: var(--text-primary);
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-weight: 700;
}

/* --- Wavebox Widget --- */
.wavebox-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    /* Larger size */
    height: auto;
    z-index: 1000;
    transition: transform 0.2s, filter 0.2s;
    /* ensure it stays on top */
}

.wavebox-widget img {
    width: 100%;
    height: auto;
    display: block;
    /* Remove inline spacing */
}

.wavebox-widget:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.wavebox-widget:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .wavebox-widget {
        width: 60px;
        /* Smaller on mobile */
        bottom: 15px;
        right: 15px;
    }
}

/* --- Banner Section --- */
.banner-group {
    margin-top: 2rem;
}

.banner-container {
    text-align: center;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    /* border: var(--border-width) solid var(--border-color); Removed for softer look */
    /* Optional: Add subtle shadow or keep flat */
}

.site-banner {
    max-width: 100%;
    height: auto;
    border: none;
    margin-bottom: 0.5rem;
}

/* External Banner Links */
.external-banner-link {
    display: inline-flex;
    padding: 6px;
    border: 1px solid #e5e5e5;
    /* Lighter border */
    background: #fff;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: transform 0.2s, box-shadow 0.2s;
}

.external-banner-link:hover {
    transform: translate(-1px, -1px);
    /* Reduced movement */
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
    /* Shadow compensates for lift */
}

.banner-note {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.banner-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--nav-bg);
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.input-label {
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    white-space: nowrap;
    color: var(--text-secondary);
}

.input-group input {
    background: transparent;
    border: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}


/* --- Cursor Sparkle Effect --- */
.cursor-sparkle {
    position: fixed;
    pointer-events: none;
    color: var(--accent-color, var(--text-primary));
    /* Dynamic color with fallback */
    z-index: 9999;
    font-weight: bold;
    user-select: none;
    animation: sparkle-anim 1s forwards;
    opacity: 0.8;
}

@keyframes sparkle-anim {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0);
        opacity: 0;
    }
}

/* --- Work Page Styles --- */
.work-container {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 5rem;
    animation: fadeIn 0.5s;
}

.work-header {
    margin-bottom: 2rem;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--box-shadow);
}

.work-cover {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    display: block;
}

.work-header-content {
    background: var(--bg-color);
    padding: 2rem;
    text-align: center;
}

.work-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-shadow: 2px 2px 0px var(--accent-color);
}

.work-status-card {
    background: var(--bg-color);
    border: 2px solid var(--text-primary);
    padding: 1rem;
    text-align: center;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    background-image: repeating-linear-gradient(45deg,
            var(--bg-color),
            var(--bg-color) 10px,
            rgba(0, 0, 0, 0.03) 10px,
            rgba(0, 0, 0, 0.03) 20px);
}

.work-status-label {
    font-weight: 700;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.work-status-date {
    font-size: 1.5rem;
    font-weight: 900;
    color: #e74c3c;
    /* Alert color */
    background: #fff;
    padding: 0.2rem 1rem;
    border-radius: 4px;
    display: inline-block;
}

.plan-section {
    margin-bottom: 4rem;
}

.plan-section-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    border-bottom: 4px solid var(--text-primary);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.plan-card {
    background: var(--bg-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.plan-flow {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px dotted var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.plan-flow strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
    font-weight: 700;
}

.plan-bg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.plan-bg-media.active {
    opacity: 0.08;
}

.work-decoration-gif {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 150px;
    height: auto;
    z-index: 2;
    pointer-events: none;
    opacity: 1;
}

.plan-card>*:not(.plan-bg-media):not(.work-decoration-gif) {
    position: relative;
    z-index: 1;
}



.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 1rem;
}

.plan-name {
    font-size: 1.6rem;
    font-weight: 900;
    text-shadow: 2px 2px 0px var(--accent-color);
}

.cheap-label {
    display: inline-block;
    font-size: 0.8rem;
    color: #fff;
    background: #5fab85;
    /* Subtle Sage Green */
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 0.5rem;
    vertical-align: middle;
    font-weight: 700;
    text-shadow: none;
    transform: translateY(-2px);
}

.plan-price {
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--nav-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* Illustration Plan Layout */
.ill-plan-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.ill-image-wrapper {
    flex: 0 0 280px;
}

@media (max-width: 768px) {
    .ill-plan-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .ill-image-wrapper {
        flex: 1;
        width: 100%;
    }
}


/* Guidelines Section */
.guideline-section {
    margin-bottom: 4rem;
}

.guideline-block {
    background: var(--bg-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.guideline-header {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 0.5rem;
}

.guideline-marker {
    display: none;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 4px;
    border: 2px solid var(--border-color);
}

.marker-red {
    background: #ff7675;
}

.marker-yellow {
    background: #ffeaa7;
}

.marker-blue {
    background: #74b9ff;
}

.guideline-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.guideline-content h3:first-child {
    margin-top: 0;
}

.guideline-content p,
.guideline-content li {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.guideline-content ul {
    list-style-type: none;
    /* Custom bullets if needed, or default inside */
    padding-left: 0;
}

.guideline-content ul li {
    position: relative;
    padding-left: 1rem;
}

.guideline-content ul li::before {
    content: "・";
    position: absolute;
    left: 0;
    font-weight: bold;
}

.copy-box {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    overflow-x: auto;
    margin-top: 1rem;
    user-select: all;
    /* Make selection easy */
}

.payment-list li {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.8;
}

.guideline-text-primary {
    color: var(--text-primary) !important;
}

.plan-body {
    line-height: 1.6;
}

.plan-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.plan-example-img {
    width: 100%;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.detail-list {
    list-style: none;
    padding: 0;
}

.detail-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    line-height: 1.5;
}

.detail-list li::before {
    content: "✔️";
    position: absolute;
    left: 0;
    font-size: 0.9rem;
    top: 0.2rem;
}

.detail-list li.warning::before {
    content: "⚠️";
}

.caution-block {
    background: transparent;
    border: 1px dashed var(--border-color);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.contact-section {
    text-align: center;
    background: transparent;
    padding: 0;
    margin-bottom: 3rem;
}

/* Contact Card Redesign (Simplified) */
.contact-card {
    background: var(--bg-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    text-align: left;
}

.contact-check-area {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px dashed var(--border-color);
}

.contact-method-area {
    margin-top: 1rem;
}

.contact-sub-label {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    /* Softer label */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-checklist li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.contact-checklist li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--text-primary);
    font-weight: bold;
}

.check-link {
    color: var(--text-primary);
    text-decoration: underline;
    font-weight: 700;
    cursor: pointer;
}

.text-link {
    color: var(--text-primary);
    /* Blend in with text */
    text-decoration: underline;
}

.warning-text {
    font-weight: 700;
}

.warning-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.2rem;
}

.contact-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-method-item {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
}



.method-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    min-width: 60px;
    /* Align labels */
}

.method-value {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    flex-grow: 1;
}

.select-all {
    user-select: all;
    cursor: pointer;
}

.contact-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 1.5rem;
}

/* V-Gra Card */
.vgra-card {
    background: #fdfdfd;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 3rem;
    /* Spacing from next section */
    box-shadow: var(--box-shadow);
    line-height: 1.8;
}

.skeb-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.8rem;
    line-height: 1.5;
}

/* Table of Contents */
.work-toc {
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 2rem;
}

.work-toc-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
}

.work-toc-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.work-toc-link {
    display: block;
    padding: 0.5rem 0.8rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    text-align: center;
    transition: all var(--transition-speed);
}

.work-toc-link:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* --- Content Card (Alternative to Welcome Screen for variable height) --- */
.content-card {
    background: #fff;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    /* Increased vertical padding from 1rem */
    box-shadow: var(--box-shadow);
    max-width: 700px;
    width: 100%;
    /* Ensure it takes full width up to max-width */
    margin: 0 auto;
    /* Center like welcome-screen */
    color: var(--text-primary);
    text-align: center;
    box-sizing: border-box;
    /* Ensure padding doesn't affect width calculation */
}

/* --- Glossary Image --- */
/* --- Glossary Image --- */
.glossary-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    /* Ensure padding matches original if needed, typically handled by .glossary-item definition elsewhere but we are overriding/extending */
}

.glossary-content {
    flex: 1;
    order: 1;
    /* Content first */
}

.glossary-image {
    position: relative;
    top: auto;
    right: auto;
    order: 2;
    /* Image second */
    max-width: 100px;
    max-height: 100px;
    border-radius: var(--border-radius);
    opacity: 0.9;
    /* Slightly more visible by default */
    padding: 0.4rem;
    /* Increased spacing */
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s;
    flex-shrink: 0;
    margin-top: 0.5rem;
    /* Align with text top */
    background: #fff;
    border: 1px solid #e5e5e5;
    /* Lighter border */
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.05);
    /* Very subtle shadow */
}

.glossary-image:hover {
    opacity: 1;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .glossary-item {
        gap: 1rem;
        padding: 1rem;
    }

    .glossary-image {
        max-width: 70px;
        max-height: 70px;
        margin-top: 0.2rem;
    }
}