html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    margin: 0;
    height: 100%;
    font-family: 'Poppins', 'Noto Sans JP', sans-serif;
    color: #fff;
    background-color: #000; /* ブート画面の黒を隅まで */
    padding-top: 80px; /* ヘッダーの高さと余白を考慮 */
}

/* Disable iOS/Android long‑press save dialogs on images */
img {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

.pixelated {
    image-rendering: pixelated;
}

#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    transform: scale(1.01);
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 40px;
    box-sizing: border-box;
    z-index: 10000;
    overflow: hidden;
    will-change: opacity, transform;
}

#boot-screen::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    background: repeating-linear-gradient(
        180deg,
        rgba(255,255,255,0.25) 0px,
        rgba(255,255,255,0.25) 2px,
        rgba(0,0,0,0.25) 2px,
        rgba(0,0,0,0.25) 4px
    );
    mix-blend-mode: overlay;
    z-index: 1;
}

#boot-screen.fade-out {
    animation: bootFadeOut 1s ease forwards;
}

#crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    z-index: 10001;
    background:
        repeating-linear-gradient(0deg, rgba(0,0,0,0.3) 0px, rgba(0,0,0,0.3) 2px, transparent 2px, transparent 4px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 2px);
    mix-blend-mode: multiply;
    opacity: 0.25;
    animation: crtFlicker 0.08s steps(1) infinite;
}

#crt-overlay.fade-out {
    animation: crtFade 0.5s ease forwards;
}

#scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: repeating-linear-gradient(0deg,
        rgba(0,0,0,0.9) 0px,
        rgba(0,0,0,0.9) 2px,
        transparent 2px,
        transparent 4px);
    mix-blend-mode: multiply;
    opacity: 0.1;
}

@keyframes crtFlicker {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.3; }
}

@keyframes crtFade {
    to { opacity: 0; visibility: hidden; }
}

.boot-container {
    text-align: left;
    position: relative;
    z-index: 2;
}

.boot-line {
    font-family: 'Share Tech Mono', monospace;
    color: #bcdfff;
    font-size: 1.6em;
    letter-spacing: 0.05em;
    text-shadow: 0 0 5px #bcdfff, 0 0 10px #bcdfff;
    opacity: 0;
    animation: bootSlideIn 0.6s ease forwards;
}

.boot-blink {
    animation: bootSlideIn 0.6s ease forwards, blink 1s steps(1) infinite 1.4s;
}

.boot-diamond {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 2px solid #0f0;
    transform: translate(-50%, -50%) rotate(45deg);
    animation: spinDiamond 2s linear infinite;
    z-index: 0;
}

@keyframes spinDiamond {
    from {
        transform: translate(-50%, -50%) rotate(45deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(405deg);
    }
}

.boot-status {
    color: #0f0;
}

@keyframes bootSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bootFadeOut {
    to { opacity: 0; visibility: hidden; }
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(60deg, #021a3a, #004e92, #021a3a);
    background-size: 200% 200%;
    filter: hue-rotate(0deg);
    animation: gradientShift 15s ease infinite, hueRotate 25s linear infinite;
    z-index: -2; /* 最背面に配置 */
    overflow: hidden; /* はみ出さないように */
}

#bubble-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1; /* 背景とコンテンツの間 */
    will-change: transform;
}


@keyframes gradientShift {
    0% {
        background-position: 0 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

@keyframes hueRotate {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}


header {
    background-color: rgba(0, 0, 0, 0.5); /* 透過した黒 (約50%) */
    margin-top: 20px; /* 上部に余白 */
    max-width: 960px; /* コンテンツの幅に合わせる */
    width: 100%; /* max-widthが適用されるように */
    border-radius: 10px; /* 角を丸く */
    padding: 10px 20px; /* 上下10px、左右20pxのパディング */
    position: fixed; /* 画面上部に固定 */
    top: 0;
    left: 50%; /* 左端を中央に */
    transform: translateX(-50%); /* 自身の幅の半分だけ左にずらす */
    z-index: 100; /* 他の要素より手前に */
    border: 1px solid rgba(0, 191, 255, 0.8); /* 水色の外枠 */
    box-shadow: 0 0 12px rgba(0, 191, 255, 0.6), 0 0 25px rgba(0, 191, 255, 0.4); /* 水色に発光 */
    backdrop-filter: blur(5px); /* 背景を少しぼかす */
}

header nav {
    display: flex;
    justify-content: center;
    width: 100%; /* ヘッダーの全幅を使用 */
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em; /* フォントサイズを小さく */
    padding: 8px 15px; /* パディングを調整 */
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #00bfff; /* ホバー時の色を水色に */
}

nav ul li a.active {
    background-color: #fff; /* クリック時に背景を白に */
    color: #00bfff; /* 文字色を水色に */
    border-radius: 5px;
}

nav ul li a.support-link {
    background-color: #00bfff;
    color: #fff;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a.support-link:hover {
    background-color: #fff;
    color: #00bfff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
}


/* Profile section buttons */
.profile-toggle,
.profile-link-btn {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid #00bfff;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 5px;
}

.profile-toggle:active,
.profile-link-btn:active {
    background-color: #00bfff;
    color: #000;
}

#profile-details {
    margin-top: 20px;
    text-align: left;
}

#profile-details.hidden {
    display: none;
}

main {
    position: relative;
    z-index: 1;
    text-align: left; /* 左寄せに変更 */
    padding-left: 20px; /* 左右に余白を追加 */
    padding-right: 20px;
    /* padding-top: 120px; を削除 */
}

#hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.6); /* 画面全体を覆う黒背景を少し透過 */
    color: #fff;
    z-index: 101; /* ヘッダーより前面に配置 */
    transition: opacity 0.5s ease-in-out;
    will-change: opacity, transform;
}

#hero.hidden {
    opacity: 0;
    pointer-events: none; /* 非表示時にクリックイベントを無効化 */
}

#hero.visible {
    opacity: 1;
    pointer-events: auto;
}



#hero h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-align: center;
    white-space: normal;
}

#hero p {
    font-size: 1.2em;
    text-align: center;
}

.hero-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
    text-align: center;
    width: 100%;
    max-width: 960px;
    z-index: 102;
}


.hero-subtitle {
    font-size: 1em;
    text-align: center;
}

.years-exp {
    display: block;
    text-align: center;
    white-space: nowrap;
}


.content-section {
    padding: 80px 20px;
    margin: 0 auto;
    max-width: 960px;
    background-color: rgba(0, 0, 0, 0.5); /* コンテンツの背景を半透明の黒に (約50%) */
    border-radius: 10px;
    margin-bottom: 40px;
    border: 1px solid rgba(0, 191, 255, 0.8); /* 水色の外枠 */
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.5), 0 0 30px rgba(0, 191, 255, 0.3); /* 発光効果 */
    transition: opacity 0.5s ease-in-out; /* フェードイン/アウトのトランジションのみ */
    backdrop-filter: blur(8px); /* 背景を少しぼかす */
    will-change: opacity; /* レイヤー処理の最適化 */
}

.content-section.hidden {
    opacity: 0;
    pointer-events: none; /* 非表示時にクリックイベントを無効化 */
}

.content-section.visible {
    opacity: 1;
    pointer-events: auto;
}

.content-section h1,
.content-section h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #00bfff; /* 水色 */
}

.content-section p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.artwork-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px; /* アイテム間のスペース */
    margin-top: 40px;
}

.art-placeholder {
    color: #ccc;
    font-size: 1.2em;
    margin-top: 20px;
}

.artwork-item {
    background-color: rgba(0, 0, 0, 0.5); /* アイテムの背景をより濃い黒に */
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    width: 300px; /* アイテムの幅 */
    box-shadow: 0 0 15px rgba(0, 160, 255, 0.2); /* 水色系のシャドウ */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.artwork-item:hover {
    transform: translateY(-5px); /* ホバーで少し浮き上がる */
    box-shadow: 0 0 25px rgba(0, 160, 255, 0.5); /* ホバーでシャドウを強調 */
}

.artwork-item img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    /* margin-bottom: 10px; Removed */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.artwork-item p {
    font-size: 1em;
    color: #ccc;
}

.art-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    padding: 5px;
    box-sizing: border-box;
    max-height: 60px; /* Adjust as needed */
    overflow: hidden; /* Ensure content doesn't spill out */
}

.art-info h3 {
    margin: 0;
    font-size: 1em;
    color: #0f0;
    white-space: nowrap; /* Keep text on a single line */
    overflow: hidden;    /* Hide overflowing content */
    text-overflow: ellipsis; /* Add ellipsis for overflow */
}

.art-info p {
    margin: 0;
    font-size: 0.9em;
    color: #ddd;
    white-space: nowrap; /* Keep text on a single line */
    overflow: hidden;    /* Hide overflowing content */
    text-overflow: ellipsis; /* Add ellipsis for overflow */
}

.artwork-item.square {
    width: 200px;
    height: 200px; /* Explicitly set height to match width */
    box-sizing: border-box; /* Ensure padding/border are included in dimensions */
}

.artwork-item.square img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.artwork-item.square:hover img,
.artwork-item.square:active img {
    filter: grayscale(0%);
}

@media (max-width: 1024px) {
    #hero {
        padding: 0 15px;
        box-sizing: border-box;
    }
    header {
        margin-top: 10px;
        padding: 10px;
        max-width: none;
        border-radius: 0;
        left: 0;
        transform: none;
        background-color: transparent; /* スマホでは黒背景を除去 */
        border: none; /* 枠線も除去 */
        box-shadow: none; /* 発光を除去 */
        backdrop-filter: none; /* ぼかしを除去 */
    }

    header nav {
        position: relative;
        justify-content: flex-start;
    }

    .menu-toggle {
        display: block;
        font-size: 2em; /* ハンバーガーメニューを少し大きく */
    }

    nav ul {
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.9);
        border-radius: 0 0 10px 10px;
        padding: 10px 0;
        display: none;
        margin: 0;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    nav.open ul {
        display: flex;
        opacity: 1;
    }

    nav.closing ul {
        opacity: 0;
    }

    nav ul li {
        margin: 10px 0;
    }

    /* Adjust boot screen for small displays */
    #boot-screen {
        padding: 20px;
    }
    .boot-line {
        font-size: 1.1em;
        line-height: 1.3;
    }

    #hero h1 {
        font-size: 1.3em;
        line-height: 1.2;
        white-space: normal;
    }

    #hero p {
        font-size: 0.9em;
    }

    .hero-subtitle {
        text-align: center;
    }

    .content-section {
        padding: 60px 15px;
    }

    .content-section h1,
    .content-section h2 {
        font-size: 2em;
    }

    .artwork-item {
        width: 100%;
    }

    br.hero-break {
        display: inline;
    }

    .years-exp {
        display: block;
        text-align: center;
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    header {
        margin-top: 15px;
        padding: 15px;
    }

    #hero h1 {
        font-size: 2.8em; /* match PC headline size */
        white-space: normal;
    }

    #hero p {
        font-size: 1.2em; /* match PC subtitle size */
    }

    .hero-subtitle {
        text-align: center;
    }

    .content-section {
        padding: 70px 20px;
    }

    .content-section h1,
    .content-section h2 {
        font-size: 2.2em;
    }

    .artwork-item {
        width: 45%;
    }
}
# Tablet specific centering for My Artwork
@media (min-width: 601px) and (max-width: 1024px) {
    #my-artwork,
    #my-artwork h2,
    #my-artwork .artwork-content {
        text-align: center;
    }

    #my-artwork .artwork-gallery,
    .artwork-filters,
    .sub-filters {
        justify-content: center;
    }
}
#my-artwork {
    text-align: left;
}

#my-artwork h2 {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 760px;
}

#my-artwork .artwork-content {
    margin-left: 0;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 760px;
}

@media (min-width: 768px) {
    #my-artwork .artwork-content,
    #my-artwork h2 {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}


/* Info Section Styles */
#info {
    text-align: left;
}

#info h2 {
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 760px;
}

#info .info-content {
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 760px;
}

#info .info-subheading {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #00bfff;
    font-weight: bold;
}

#update-info {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

#update-info li {
    margin-bottom: 10px;
}


@media (min-width: 768px) {
    #info .info-content,
    #info h2 {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}


/* Commission Section Styles */
#commission {
    text-align: left;
}

#commission h2 {
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 760px;
}

#commission .commission-content {
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 760px;
}

@media (min-width: 768px) {
    #commission .commission-content,
    #commission h2 {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

#commission .commission-heading {
    font-weight: bold;
    color: #ffcc00;
    font-size: 1.2em;
    margin-top: 30px;
}

#commission h3 {
    color: #ffcc00;
}

/* About Section Styles */
#about {
    text-align: left;
}

#about h2 {
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 760px;
}

#about .about-avatar {
    display: block;
    margin: 0 0 20px; /* align avatar with left text */
    width: 150px;
    max-width: 200px;
    height: auto;
    border-radius: 50%;
    flex-shrink: 0;
}

#about .about-content {
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* align content with left line */
    gap: 20px;
}

#about .about-text {
    flex: 1;
    width: 100%; /* ensure text lines align */
}

@media (min-width: 768px) {
    #about .about-content {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    #about .about-avatar {
        width: 200px;
    }
}

@media (max-width: 1024px) {
    #about .about-avatar {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        margin: 0 auto 10px;
        display: block;
    }

    #about,
    #about h2 {
        text-align: center;
    }

    #about .about-content {
        align-items: center;
    }

    #about .about-text p:first-child {
        margin-top: 0;
    }
}

@media (max-width: 1024px) {
    #my-artwork,
    #my-artwork h2,
    #my-artwork .artwork-content {
        text-align: center;
    }

    #my-artwork .artwork-gallery,
    .artwork-filters,
    .sub-filters {
        justify-content: center;
    }
}

.email {
    font-size: 1rem; /* match button text size */
}


.contact-heading {
    font-size: 1.3em;
    font-weight: bold;
    margin-top: 10px;
    text-align: left;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Network Link Section */
#network-link {
    text-align: left;
}

#network-link h2 {
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 760px;
}
.network-heading {
    text-align: left;
    margin-top: 10px;
    font-size: 1.3em;
    font-weight: bold;
}

.network-links {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.network-links li {
    margin: 0;
}

#support h2 {
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 760px;
}

#support .network-links {
    display: block;
    gap: 0;
    margin: 0 0 10px 0;
}

#support .network-links li {
    margin-bottom: 10px;
    margin-left: 0;
}

/* Highlight network link buttons when pressed */
.network-links .profile-link-btn:active {
    background-color: #bcdfff;
    color: #000;
}

#network-link .network-link-content,
#support .support-content {
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 760px;
}

@media (min-width: 768px) {
    #network-link .network-link-content,
    #network-link h2,
    #support .support-content,
    #support h2 {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* Artwork Filter Buttons */
.artwork-filters,
.sub-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn,
.sub-btn {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid #00bfff;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.filter-btn.active,
.sub-btn.active {
    background-color: #00bfff;
    color: #000;
}

.sub-filters.hidden {
    display: none;
}

/* Suggestive popup */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.popup.visible {
    opacity: 1;
    pointer-events: auto;
}

.popup-content {
    background: #222;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    width: min(600px, 90%);
}

#mailinglist-popup .popup-content {
    width: min(600px, 90%);
}

.popup-content button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.popup-content .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.lightbox.visible {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    background: #111;
    padding: 10px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 5px;
}

.lightbox-text {
    max-width: 300px;
}

.lightbox-text h3 {
    color: #0f0;
    margin-top: 0;
    animation: glow 1.5s ease-in-out infinite alternate;
}

.lightbox-text p {
    margin-bottom: 0;
}

@media (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
    .lightbox-content {
        flex-direction: column;
        text-align: center;
    }

.lightbox-text {
    max-width: none;
    margin-top: 10px;
}
}

@media (max-width: 1024px) and (orientation: portrait) {
    .hero-text {
        max-width: 100%;
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #0f0, 0 0 10px #0f0, 0 0 20px #0f0;
    }
    to {
        text-shadow: 0 0 8px #0f0, 0 0 15px #0f0, 0 0 30px #0f0;
    }
}

@media (max-width: 1024px) and (orientation: portrait) {
    #hero h1,
    .years-exp {
        white-space: normal;
    }
}

/* Tablet portrait adjustments */
@media (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
    #hero h1 {
        font-size: 2.4em;
        white-space: normal;
    }

    .years-exp {
        white-space: normal;
    }

}

@media (orientation: portrait) and (min-width: 1025px) {
    header {
        margin-top: 20px;
        padding: 20px;
    }

    #hero h1 {
        font-size: 2.8em;
        white-space: normal;
    }

    #hero p {
        font-size: 1.2em;
    }

    .content-section {
        padding: 80px 20px;
    }

    .content-section h1,
    .content-section h2 {
        font-size: 2.4em;
    }

    .artwork-item {
        width: 45%;
    }

    .lightbox-content {
        flex-direction: column;
        text-align: center;
    }

    .lightbox-text {
        max-width: none;
        margin-top: 10px;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    body {
        font-size: 0.9em;
    }

    #hero h1 {
        font-size: 1.1em;
    }

    #hero p {
        font-size: 0.85em;
    }

    nav ul li a {
        font-size: 1em;
        padding: 8px 15px;
    }

    .about-content {
        align-items: center;
        text-align: center;
    }

    .about-text {
        text-align: center;
    }

    .about-avatar {
        width: 150px;
        height: 150px;
        max-width: none;
        border-radius: 50%;
        margin: 0 auto 10px;
    }

    .about-text p:first-child {
        margin-top: 0;
    }

    .artwork-gallery {
        gap: 10px;
    }

    .artwork-item {
        width: 48%;
    }

    .artwork-item.square img {
        height: 160px;
    }
}

/* PC-specific center alignment for hero subtitle */
@media (min-width: 1025px) {
    .hero-subtitle {
        text-align: center;
    }
}

/* Corner avatar overlay */
#corner-avatar {
    position: fixed;
    bottom: 25px;
    right: 25px;
    height: 50vh;
    width: auto;
    z-index: 1000;
    transition: opacity 0.6s ease;
}

#corner-avatar.hidden {
    opacity: 0;
    pointer-events: none;
}

#corner-avatar.visible {
    opacity: 1;
    pointer-events: auto;
}

#corner-avatar:hover {
    opacity: 0.5;
}

@media (max-width: 1024px) {
    #corner-avatar {
        display: none !important;
    }
}

/* Utility class for hiding elements */
.is-hidden {
    display: none !important; /* Use !important to ensure it overrides other display properties */
}

/* Highlight for Suggestive Art and Old Art filter buttons */
.filter-btn[data-filter="suggestive"],
.filter-btn[data-filter="oldart"] {
    background-color: rgba(0, 191, 255, 0.2); /* Light blue-green with transparency */
    border-color: #00bfff; /* Keep existing border color */
    box-shadow: 0 0 8px rgba(0, 191, 255, 0.6); /* Subtle glow */
}

.filter-btn[data-filter="suggestive"]:hover,
.filter-btn[data-filter="oldart"]:hover {
    background-color: rgba(0, 191, 255, 0.4); /* Slightly more opaque on hover */
}

.filter-btn[data-filter="suggestive"].active,
.filter-btn[data-filter="oldart"].active {
    background-color: #00bfff; /* Keep active state as is */
    color: #000;
}

.filter-btn.confirmed-flag {
    background-color: rgba(0, 191, 255, 0.6); /* Brighter blue-green */
    box-shadow: 0 0 12px rgba(0, 191, 255, 0.8); /* More prominent glow */
}

.filter-btn.confirmed-flag:hover {
    background-color: rgba(0, 191, 255, 0.8); /* Even brighter on hover */
}

#cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 480px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 15px;
    box-sizing: border-box;
    z-index: 1000;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: opacity 0.3s ease-in-out;
}

#cookie-banner.hidden {
    opacity: 0;
    pointer-events: none;
}

#cookie-banner.visible {
    opacity: 1;
    pointer-events: auto;
}

#cookie-banner .cookie-buttons {
    margin-top: 10px;
    text-align: right;
}

#cookie-customise-panel.hidden {
    display: none;
}

#cookie-customise-panel.visible {
    display: block;
}

#cookie-banner button {
    margin-left: 10px;
    padding: 6px 12px;
    background-color: #00bfff;
    border: none;
    color: #000;
    cursor: pointer;
}

#cookie-banner button:hover {
    background-color: #0090cc;
}

#cookie-banner a {
    color: #00bfff;
}

/* === Newsletter popup width fix === */
#subscribe-modal,
.newsletter-modal {
    /* 既存選択子に合わせて両方用意（どちらかヒットすればOK） */
}

/* パネル本体（右から出る細い箱） */
#subscribe-modal .modal-panel,
.newsletter-modal .modal-panel {
    width: min(72rem, 90vw) !important;   /* ≒ 1152px を上限に画面の90%まで */
    max-width: 90vw !important;
    /* もし固定値があるなら打ち消す */
    flex: 0 0 auto !important;
}

/* 画面幅に応じて調整 */
@media (max-width: 768px) {
    #subscribe-modal .modal-panel,
    .newsletter-modal .modal-panel {
        width: 95vw !important;   /* モバイルはほぼ全幅 */
    }
}

/* 内側のフォーム/iframe を親幅いっぱいに */
#subscribe-modal .modal-panel iframe,
#subscribe-modal .modal-panel form,
.newsletter-modal .modal-panel iframe,
.newsletter-modal .modal-panel form {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    display: block;
}

/* 余白と可読性（任意） */
#subscribe-modal .modal-panel .container,
.newsletter-modal .modal-panel .container {
    padding: 1.25rem 1.5rem;
}
