html {
    touch-action: manipulation;
}

:root {
    --primary-color: #3f51b5;
    --secondary-color: #ff4081;
    --bg-color: #f5f5f5;
    --card-bg: #fff;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    touch-action: manipulation;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url('images/bg_schoolyard.png');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    z-index: -1;
}

#app-container {
    display: flex;
    min-height: 100vh;
}

#sidebar {
    background-color: var(--primary-color);
    color: white;
    width: 250px;
    /*    padding: 2rem 1rem;*/
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: fixed;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 500;
    overflow-y: auto;
    overflow-x: hidden;
}

#sidebar-contents {
    width: 220px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

#sidebar h1 {
    margin: 0;
    font-size: 1.5rem;
    text-align: center;
}

#CPCP-bannerlogo {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    width: 100%;
}

#CPCP-banner {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px 0px 15px 0px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    width: 100%;
}

#CPCP-banner h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#CPCP-banner p {
    margin: 0;
    font-size: 1rem;
    color: #e0e0e0;
}

#sidebar-inventory-wrapper {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px 15px;
    margin: 10px 0;
    width: 85%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.inventory-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.inventory-info .material-symbols-rounded {
    font-size: 24px;
    color: #ffd700;
}

.inventory-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.inventory-text .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.inventory-text .value {
    font-size: 1rem;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
}

#sidebar-footer {
    width: 100%;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

#volume-wrapper {
    width: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.volume-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.9rem;
}

#volume-slider {
    width: 100%;
    cursor: pointer;
}

#spectrogram-canvas {
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 5px;
    display: block;
}

#btn-rerun-tutorial,
#btn-reset {
    width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

#btn-rerun-tutorial {
    background-color: #4CAF50;
    font-size: 0.9rem;
}

#btn-reset {
    background-color: #e24f4f;
    font-size: 1rem;
}

#btn-rerun-tutorial:hover,
#btn-reset:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

#btn-rerun-tutorial:active {
    transform: translateY(0);
}

.action-btn-small {
    background: rgba(255, 152, 0, 0.8);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.action-btn-small:hover {
    background: rgba(255, 152, 0, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.action-btn-small:active {
    transform: translateY(0);
}

nav {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

nav button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.8rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

nav button:hover,
nav button.active {
    background: rgba(255, 255, 255, 0.4);
    transform: translateX(5px);
}

nav button .material-symbols-rounded {
    font-size: 24px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

nav button.active .material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

main {
    padding: 2rem;
    margin-left: 250px;
    /* Offset for the fixed sidebar */
    flex-grow: 1;
    max-width: calc(100vw - 250px);
}

.view {
    display: none;
}

.active-view {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
    margin-left: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Album Section Styles */
.album-stats-container {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    color: white;
}

.stats-text {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.completion-bar-outer {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 5px;
}

.completion-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    transition: width 0.5s ease-out;
}

.album-sub-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
}

.album-rarity-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.album-rarity-btn:hover {
    background: #f1f5f9;
}

.album-rarity-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.locked-card {
    filter: grayscale(100%) brightness(30%);
    pointer-events: none;
    opacity: 0.7;
}

.secret-card {
    background-color: #000 !important;
    color: #fff !important;
    filter: none !important;
    opacity: 1 !important;
    border-color: #444 !important;
    pointer-events: none !important;
}

.secret-card .card-name {
    color: #fff !important;
    font-size: 0.8rem !important;
    /* Slightly smaller to fit "シークレット" */
}

.card-charactor {
    position: relative;
}

.secret-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    pointer-events: none;
    z-index: 2;
}

.locked-card .card-power,
.locked-card .card-rarity,
.locked-card .card-club,
.secret-card .card-power,
.secret-card .card-rarity,
.secret-card .card-club {
    visibility: hidden;
}

/* Album Card Customizations */
#album-grid .card {
    background-color: #000 !important;
    border-color: #333;
}

#album-grid .card .card-power {
    display: none;
}

#album-grid .card .club-text {
    display: none;
}

#album-grid .card .card-club {
    background-color: #000;
}

#album-grid .card .card-name {
    color: #fff;
    padding-top: 5px;
}

/* Tutorial Section Styles */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.tutorial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.tutorial-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tutorial-text {
    padding: 15px;
    color: rgb(0, 0, 0);
}

.tutorial-text h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #4facfe;
    border-bottom: 1px solid rgba(79, 172, 254, 0.3);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.tutorial-text p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
}



.gacha-banners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Gacha Settings Toggle */
.gacha-settings {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 0.95rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: #fbbf24;
    /* SSR Gold */
}

input:focus+.slider {
    box-shadow: 0 0 1px #fbbf24;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.gacha-banner {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gacha-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.gacha-banner-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

/* Rarity Color Filters for Banner Images */
.banner-rare .gacha-banner-img {
    filter: sepia(1) saturate(3) hue-rotate(180deg);
    /* Blue tint */
}

.banner-super-rare .gacha-banner-img {
    filter: sepia(1) saturate(3) hue-rotate(280deg);
    /* Pink/Purple tint */
}

.banner-ssr .gacha-banner-img {
    filter: sepia(1) saturate(5) hue-rotate(10deg);
    /* Gold tint */
}

.banner-header {
    padding: 1rem;
    min-height: 120px;
    text-align: center;
    color: white;
}

.banner-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.banner-header p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Banner Colors */
.banner-normal {
    border-color: #94a3b8;
}

.banner-normal .banner-header {
    background: #64748b;
}

.banner-rare {
    border-color: #60a5fa;
}

.banner-rare .banner-header {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.banner-super-rare {
    border-color: #f472b6;
}

.banner-super-rare .banner-header {
    background: linear-gradient(135deg, #ec4899, #be185d);
}

.banner-ssr {
    border-color: #fbbf24;
    animation: glow 2s infinite alternate;
}

.banner-ssr .banner-header {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.2), inset 0 0 5px rgba(245, 158, 11, 0.1);
        border-color: #fbbf24;
    }

    to {
        box-shadow: 0 0 15px rgba(245, 158, 11, 0.6), inset 0 0 10px rgba(245, 158, 11, 0.2);
        border-color: #f59e0b;
    }
}

.banner-actions {
    display: flex;
    padding: 1rem;
    gap: 1rem;
}

.banner-actions button {
    flex: 1;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 0.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    line-height: 1.4;
}

.banner-actions button:hover:not(:disabled) {
    background-color: #e91e63;
    transform: scale(1.02);
}

.banner-actions button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.banner-actions button .cost {
    font-size: 0.75rem;
    font-weight: normal;
    opacity: 0.9;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    min-height: 270px;
}

.card {
    background-color: var(--club-bg, var(--card-bg));
    border: 3px solid var(--club-color, #ccc);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 250px;
    padding: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--club-color, rgba(0, 0, 0, 0.2));
    z-index: 100;
}

.card img {
    width: 130px;
    height: 170px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    background: #e2e8f0;
}

.card-empty-slot {
    min-width: 242px;
    min-height: 242px;
    background-color: #f1f5f9;
    border: 3px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: background-color 0.2s, border-color 0.2s;
}

.card-empty-slot::before {
    content: "add_circle";
    font-family: 'Material Symbols Rounded';
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.card-empty-slot::after {
    content: "空き";
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0.7;
}

.card-empty-slot:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
    color: #64748b;
}

.card-charactor {
    width: 270px;
    height: 380px;
    border-radius: 4px;
    overflow: hidden;
    background: #e2e8f0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.card-charactor img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    /* 顔の高さに合わせる */
    transform: scale(2.5);
    /* 1.5倍に拡大して顔を強調 */
    transform-origin: center 15%;
    background: transparent;
    margin-bottom: 0;
}

/* Rarity Backgrounds */
.card.N .card-charactor {
    background: #ffffff;
}

.card.R .card-charactor {
    background-size: cover;
    background-position: center;
    background: linear-gradient(to bottom right, #ffffff, #3b82f6);
}

.card.SR .card-charactor {
    background-image: url("images/sr.png");
    background-size: cover;
    background-position: center;
    /*    background: linear-gradient(to bottom right, #f472b6, #ec4899);*/
}

.card.SSR .card-charactor {
    background-image: url("images/ssr.png");
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

/* Sweeping Shimmer Effect */
.card.SSR .card-charactor::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: ssr-shimmer 3s infinite;
    z-index: 2;
    pointer-events: none;
}

/* Sparkling Particles Effect */
.card.SSR .card-charactor::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, #fff 1px, transparent 1px),
        radial-gradient(circle at 70% 10%, #fff 1.5px, transparent 1.5px),
        radial-gradient(circle at 40% 80%, #fff 1px, transparent 1px),
        radial-gradient(circle at 80% 50%, #fff 1.2px, transparent 1.2px),
        radial-gradient(circle at 10% 90%, #fff 1px, transparent 1px);
    background-size: 100% 100%;
    animation: ssr-sparkle 2s infinite alternate;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
}

@keyframes ssr-shimmer {
    0% {
        left: -150%;
    }

    30% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

@keyframes ssr-sparkle {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.4;
        transform: scale(1);
    }
}

.card-name {
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
    margin-top: -5px;
    margin-bottom: 0.2rem;
}

.card-motto {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    color: #000000;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    width: 240px;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    border: 2px solid #e2e8f0;
    line-height: 1.4;
}

.card:hover .card-motto {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Balloon Triangle */
.card-motto::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.card-rarity {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.card-rarity.N {
    color: #555;
}

.card-rarity.R {
    color: #2196F3;
    font-weight: bold;
}

.card-rarity.SR {
    color: #9C27B0;
    font-weight: bold;
}

.card-rarity.SSR {
    color: #FF9800;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(255, 152, 0, 0.3);
}

/* Prominent Power Badge */
.card-options.deck-options {
    z-index: 5;
    pointer-events: auto;
    right: 3px;
}

.option-icon-badge {
    transition: transform 0.2;
    cursor: help;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0, 40, 0, 0.7);
    /* Dark green background */
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.option-icon-badge.buff {
    color: #4ade80;
    /* Vibrant green */
}

.option-icon-badge.debuff {
    color: #f87171;
    /* Vibrant red */
}

.club-icon-mini {
    font-family: 'Material Symbols Rounded';
    font-size: 1rem;
    vertical-align: middle;
    margin-right: 4px;
    font-variation-settings: 'FILL' 1;
}

.mobile-text {
    display: none;
}

.option-icon-badge:hover {
    transform: scale(1.2);
    background: rgba(0, 60, 0, 0.9);
}

.option-icon-badge .material-symbols-rounded {
    /* Ensure icon is crisp */
    font-size: 1.1rem;
}

.option-percent {
    font-size: 0.75rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.card-power {
    position: absolute;
    bottom: 13px;
    left: 3px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: auto;
}

.card-club {
    background-color: var(--club-bg, var(--card-bg));
    position: absolute;
    top: 2px;
    width: 70%;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    border-radius: 4px;
}

.effects-title-badge {
    background: #334155;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-right: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pwr-badge {
    background: #2e293b;
    color: #f8fafc;
    width: 70px;
    padding: 4px 0;
    border-radius: 4px;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid #0f172a;
}

.pwr-badge .pwr-label {
    display: block;
    font-size: 0.7rem;
    line-height: 1;
}

.pwr-badge .base-pwr {
    font-size: 1.1rem;
    color: #fcd34d;
}

.pwr-badge .bonus-pos {
    color: #4ade80;
    font-size: 0.85rem;
    margin-left: 2px;
}

.pwr-badge .bonus-neg {
    color: #f87171;
    font-size: 0.85rem;
    margin-left: 2px;
}

.club-text {
    font-size: 0.75rem;
    font-weight: bold;

    color: #f8fafc;
    text-align: center;
    position: relative;
    width: 100%;
    padding: 4px 0px 0px 0px;
    border-radius: 4px;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.6rem;
}

#album-grid .club-text {
    display: none !important;
}

.deck-status {
    position: absolute;
    bottom: 100px;
    background: #4CAF50a0;
    color: white;
    font-size: 1.5rem;
    padding: 20px 50px;
    border-radius: 4px;
    width: 200px;
    display: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.card-status {
    position: absolute;
    top: -5px;
    right: -5px;
}

.card-status img {
    width: 70px;
    height: 70px;
    rotate: 10deg;
    background: transparent;
}

.card.in-deck .deck-status {
    display: block;
}

/* Field Grid System */
.bases-grid {
    display: contents;
}

.base-container {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 0 auto 1rem auto;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 160px;
    width: fit-content;
    min-width: 400px;
    max-width: 100%;
    position: relative;
    padding-right: 80px;
}

.base-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 0;
    border-left: none;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
}

.base-actions button {
    background: #64748b;
    color: white;
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.base-actions button:hover {
    background: #475569;
    transform: translateY(-2px);
}

.base-actions button:active {
    transform: translateY(0);
}

.base-actions .btn-quick-save {
    background-color: #3b82f6;
}

.base-actions .btn-quick-load {
    background-color: #10b981;
}

/* Quick Save/Load Feedback Balloon */
.quick-feedback-balloon {
    position: absolute;
    background: #334155;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    animation: balloon-fade-in-out 1.5s ease-out forwards;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.quick-feedback-balloon::after {
    content: '';
    position: absolute;
    border: 6px solid transparent;
}

/* Position balloon to the left on PC (default) */
@media (min-width: 769px) {
    .quick-feedback-balloon {
        right: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
    }

    .quick-feedback-balloon::after {
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        border-left-color: #334155;
    }
}

/* Position balloon above on Mobile (Changed to Below per user request) */
@media (max-width: 768px) {
    .quick-feedback-balloon {
        top: calc(100% + 10px);
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        animation: balloon-fade-in-out-bottom 1.5s ease-out forwards;
    }

    .quick-feedback-balloon::after {
        bottom: 100%;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        border-bottom-color: #334155;
    }
}

@keyframes balloon-fade-in-out {
    0% {
        opacity: 0;
        margin-bottom: -5px;
    }

    15% {
        opacity: 1;
        margin-bottom: 0;
    }

    85% {
        opacity: 1;
        margin-bottom: 0;
    }

    100% {
        opacity: 0;
        margin-bottom: 5px;
    }
}

@keyframes balloon-fade-in-out-bottom {
    0% {
        opacity: 0;
        margin-top: -5px;
    }

    15% {
        opacity: 1;
        margin-top: 0;
    }

    85% {
        opacity: 1;
        margin-top: 0;
    }

    100% {
        opacity: 0;
        margin-top: 5px;
    }
}

.base-container:hover {
    border-color: #cbd5e1;
    transform: translateX(4px);
}

.base-container.active-base {
    position: sticky;
    top: 10px;
    z-index: 500;
    border-color: #3b82f6;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(59, 130, 246, 0.5);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.base-header {
    text-align: left;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    border-right: 1px solid #e2e8f0;
    padding-right: 1.5rem;
    min-width: 160px;
    flex-shrink: 0;
}

.base-header h3 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
}

.base-bonus {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0 0 0.5rem 0;
    font-weight: bold;
}

.base-power {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    gap: 2px;
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    margin: 8px 0;
    border: 1px solid rgba(245, 158, 11, 0.3);
    min-width: 160px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.power-label {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.75rem;
    opacity: 0.9;
}

.base-power .material-symbols-rounded {
    font-size: 1rem;
    font-variation-settings: 'FILL' 1;
}

.base-power .power-val {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    /* Make the number larger */
    letter-spacing: 0.5px;
}

.base-count {
    font-size: 0.9rem;
    color: #ffffff;
    margin: 8px 0 0 0;
    background: #2563eb;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    font-weight: bold;
    align-items: center;
    gap: 4px;
}

.base-count::before {
    content: "セット済み：";
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: normal;
}

.count-val {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    font-family: 'Courier New', Courier, monospace;
}

.base-effects {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    min-height: 160px;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: flex-start;
    flex-shrink: 0;
}

.effect-badge {
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.effect-badge.positive {
    color: #10b981;
    /* Green */
    border-color: rgba(16, 185, 129, 0.3);
}

.effect-badge.negative {
    color: #ef4444;
    /* Red */
    border-color: rgba(239, 68, 68, 0.3);
}

.base-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: center;
    padding: 0 1rem;
    overflow-x: auto;
    height: 260px;
    min-width: 250px;
}

/* Make cards in bases slightly smaller to fit better */
.base-cards .card {
    width: 220px;
    height: 220px;
    padding: 10px;
    flex-shrink: 0;
}

.base-cards .card-charactor {
    width: 250px;
    height: 250px;
}

.base-cards .card-name {
    font-size: 0.8rem;
}

.card-count {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.card-delete-btn {
    position: absolute;
    top: -5px;
    left: -5px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s, transform 0.2s;
    z-index: 10;
}

.card-delete-btn:hover {
    background-color: #d32f2f;
    transform: scale(1.1);
}

.card-favorite-btn {
    position: absolute;
    top: 70px;
    right: 10px;
    background: transparent;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s, font-variation-settings 0.2s;
    z-index: 10;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.card-favorite-btn .material-symbols-rounded {
    font-size: 56px;
    font-variation-settings: 'FILL' 0;
    -webkit-text-stroke: 1.5px #000;
}

.card-favorite-btn-active {
    position: absolute;
    top: 70px;
    right: 10px;
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s, font-variation-settings 0.2s;
    z-index: 10;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    color: #ffeb3b;
    text-shadow: 0 0 10px rgba(255, 235, 59, 0.5), 0 0 5px rgba(0, 0, 0, 0.3);
}

.card-favorite-btn-active .material-symbols-rounded {
    font-size: 56px;
    font-variation-settings: 'FILL' 1;
    -webkit-text-stroke: 1.5px #000;
}

.card-favorite-btn:hover {
    transform: scale(1.1);
}

/* --- Gacha Animation Overlay --- */
#gacha-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#gacha-animation-overlay.hidden-view {
    display: none !important;
}

#gacha-animation-overlay .card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 90%;
    min-height: 50vh;
}

#gacha-animation-overlay .skip-hint {
    position: absolute;
    bottom: 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    animation: pulseText 2s infinite;
}

@keyframes pulseText {
    0% {
        opacity: 0.4;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.4;
        transform: scale(0.98);
    }
}

/* Animation Card States */
.anim-card-hidden {
    opacity: 0;
    transform: scale(0) rotateY(-180deg);
}

.anim-card-reveal {
    animation: revealCard 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes revealCard {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateY(-90deg) translateY(50px);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotateY(0) translateY(0);
    }
}

/* Extra glow for animation SSR/SR */
.anim-card-reveal.SSR {
    box-shadow: 0 0 30px rgba(255, 152, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.6);
    animation: revealCard 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, ssrFloat 3s ease-in-out infinite 0.8s;
}

.anim-card-reveal.SR {
    box-shadow: 0 0 20px rgba(156, 39, 176, 0.6);
}

@keyframes ssrFloat {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

/* CPCP Counter Animation */
.cpcp-increase {
    animation: cpcp-pop 0.3s ease-out;
}

@keyframes cpcp-pop {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0px rgba(255, 255, 255, 0);
    }

    50% {
        transform: scale(1.1);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
        color: #fff;
    }

    100% {
        transform: scale(1);
        text-shadow: 0 0 0px rgba(255, 255, 255, 0);
    }
}

/* Tutorial System */
#tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    pointer-events: none;
    transition: opacity 0.5s;
}

#tutorial-overlay.hidden {
    opacity: 0;
    pointer-events: none !important;
}

#tutorial-spotlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    mask: radial-gradient(circle at center, transparent 100px, black 110px);
    -webkit-mask: radial-gradient(circle at center, transparent 100px, black 110px);
    pointer-events: none;
    transition: mask 0.3s, -webkit-mask 0.3s;
}

#tutorial-modal {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 450px;
    min-width: 280px;
    pointer-events: auto;
    z-index: 2001;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#tutorial-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

#tutorial-text {
    font-size: 1.1rem;
    line-height: 1.5;
    text-align: left;
    margin: 0;
}

#btn-tutorial-next {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#btn-tutorial-next.hidden {
    display: none;
}

@keyframes pulseHighlight {
    0% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
        filter: brightness(1);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 1);
        filter: brightness(1.2);
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
        filter: brightness(1);
    }
}

.tutorial-highlight {
    animation: pulseHighlight 1s infinite !important;
    z-index: 2002 !important;
    position: relative !important;
    pointer-events: auto !important;
}

/* Base Locking System */
.base-locked {
    position: relative;
    overflow: hidden !important;
}

.base-locked .base-cards,
.base-locked .base-effects,
.base-locked .base-power,
.base-locked .base-count {
    filter: blur(4px);
    pointer-events: none;
    opacity: 0.6;
}

.base-locked .base-actions {
    display: none !important;
}

.base-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.lock-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: white;
    text-align: center;
}

.lock-icon {
    font-size: 3rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.btn-unlock {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    line-height: 1.2;
}

.btn-unlock:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-unlock:active {
    transform: scale(0.95);
}

.unlock-cost {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: normal;
}

.hidden-base {
    display: none !important;
}

/* Deck Feedback */
.deck-shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    border-color: #ef4444 !important;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Click Effect */
.click-floating-text {
    position: fixed;
    pointer-events: none;
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.5rem;
    z-index: 3000;
    animation: floatUpAndFade 0.8s ease-out forwards;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8), 0 0 10px rgba(76, 175, 80, 0.4);
}

@keyframes floatUpAndFade {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }

    20% {
        transform: translate(-50%, -100%) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -250%) scale(1);
        opacity: 0;
    }
}

.unlock-star {
    position: fixed;
    pointer-events: none;
    z-index: 3000;
    font-size: 2rem;
    animation: unlock-star-animation 1s ease-out forwards;
}

@keyframes unlock-star-animation {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5) rotate(45deg);
    }

    100% {
        transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* Shop Section Styles */
.shop-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    width: 100%;
}

.shop-item {
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.shop-item.highlight {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.shop-item-icon {
    font-size: 3rem;
    color: #4facfe;
}

.shop-item.highlight .shop-item-icon {
    color: #ffd700;
}

.shop-item h3 {
    margin: 0;
    font-size: 1.25rem;
    color: white;
}

.shop-item p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
    color: white;
}

.shop-buy-btn {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: none;
    background: #64748b;
    color: white;
    font-weight: bold;
    cursor: not-allowed;
    opacity: 0.7;
    font-size: 1rem;
}

/* Sticky Note Styles */
.sticky-note {
    background: #ffeb3b;
    color: #333;
    padding: 2rem;
    width: 300px;
    min-height: 250px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    transform: rotate(-3deg);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    border-bottom-right-radius: 40px 5px;
}

.sticky-note::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.05);
}

.sticky-note-content {
    font-family: 'Comic Sans MS', 'HG行書体', cursive;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    font-weight: bold;
    word-break: break-all;
}

.sticky-note-signature {
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 0.85rem;
    font-weight: normal;
    color: #666;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {

    *,
    *::before,
    *::after {
        box-sizing: border-box !important;
    }

    html,
    body {
        width: 100%;
        position: relative;
        /* Remove aggressive overflow-x: hidden to prevent clipping */
    }

    #app-container {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }

    #sidebar {
        z-index: 500;
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        flex-direction: row;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom, 15px);
        gap: 0;
        border-right: none;
        border-top: 2px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
        border-radius: 12px 12px 0 0;
        backdrop-filter: blur(10px);
        background: rgba(63, 81, 181, 0.9);
        overflow: hidden;
        /* Prevent rogue overflow */
    }

    #CPCP-bannerlogo,
    #btn-rerun-tutorial {
        display: none !important;
    }

    #sidebar-contents {
        flex: 1;
        /* Take remaining space */
        min-width: 0;
        /* Allow shrinking */
        gap: 0;
    }

    #CPCP-banner {
        width: 20%;
        padding: 5px 10px;
        background: none;
        box-shadow: none;
        flex-direction: column;
        gap: 2px;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        align-items: center;
        justify-content: center;
    }

    #CPCP-banner h2 {
        font-size: 0.9rem;
        margin: 0;
    }

    #CPCP-banner p {
        display: block;
        font-size: 0.55rem;
        margin-top: 2px;
        opacity: 0.8;
    }

    #btn-clicker {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
        margin: 5px;
    }

    .desktop-text {
        display: none;
    }

    .mobile-text {
        font-size: 10px;
        display: inline;
    }

    #sidebar-inventory-wrapper {
        display: none;
        /* Hide in bottom bar */
    }

    nav {
        flex-direction: row;
        justify-content: space-around;
        padding: 5px 0;
        gap: 5px;
    }

    nav button {
        flex: 1;
        /* Each button takes equal share */
        min-width: 0;
        /* Allow shrinking below text/icon width if necessary */
        flex-direction: column;
        align-items: center;
        padding: 5px 2px;
        font-size: 0.65rem;
        /* Slightly smaller to fit better */
        gap: 2px;
        background: none;
        border-radius: 0;
    }

    nav button:hover,
    nav button.active {
        background: none;
        transform: none;
        color: #ffd700;
    }

    nav button .material-symbols-rounded {
        font-size: 20px;
    }

    #sidebar-footer {
        display: none;
        /* Hide spectrogram and rerun tutorial on mobile footer area */
    }

    main {
        margin-left: 0;
        margin-bottom: 0 !important;
        padding-bottom: calc(280px + env(safe-area-inset-bottom, 30px)) !important;
        /* Offset for bottom nav + safe area */
        padding-left: 0;
        padding-right: 0;
        padding-top: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .view h2 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
        margin-top: 5px;
        padding-left: 2px;
        /* Absolute minimal margin for title */
    }

    .view {
        padding: 0 !important;
        margin: 0 !important;
    }

    .gacha-banners-grid {
        grid-template-columns: 1fr;
        /* Stack banners */
    }

    .card {
        width: 100% !important;
        /* Fill grid cell */
        min-width: 0 !important;
        /* Allow shrinking */
        margin: 0 !important;
        /* Spacing handled by gap */
        padding: 5px !important;
        box-sizing: border-box !important;
    }

    .card-container {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        padding: 10px !important;
        width: 100% !important;
        min-height: auto !important;
        justify-content: stretch !important;
    }

    .card-charactor {
        width: 100% !important;
        height: 200px !important;
        min-width: 0 !important;
    }

    .card-img-container {
        height: 120px;
    }

    .card-motto {
        /* Adjust tooltip on mobile */
        width: 180px;
        font-size: 0.8rem;
        left: 50%;
        transform: translateX(-50%);
        bottom: 110%;
    }

    .card-motto::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Scaling internal card elements for smaller mobile cards */
    .card-power {
        bottom: 8px !important;
        left: 2px !important;
        transform: scale(0.8) !important;
        transform-origin: bottom left !important;
    }

    .card-club {
        top: 2px !important;
        width: 95% !important;
        transform: scale(0.8) !important;
        transform-origin: top center !important;
    }

    .card-status {
        top: -5px !important;
        right: -5px !important;
        transform: scale(0.7) !important;
        transform-origin: top right !important;
    }

    .card-delete-btn,
    .card-favorite-btn,
    .card-favorite-btn-active {
        transform: scale(0.7) !important;
    }

    .card-favorite-btn,
    .card-favorite-btn-active {
        top: 40px !important;
        right: -10px !important;
    }

    .tab-container {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
    }

    .deck-container {
        flex-direction: column;
        align-items: center;
    }

    .deck-slot {
        width: 100%;
        max-width: 300px;
    }

    #backup-controls {
        margin-top: 5px !important;
        padding: 5px !important;
        font-size: 0.7rem !important;
    }

    #backup-controls button {
        padding: 4px !important;
        font-size: 0.7rem !important;
    }

    #backup-controls div {
        font-size: 0.65rem !important;
        margin-bottom: 4px !important;
    }

    /* Compact Deck Card Scaling (Work Section) */
    .base-container .card,
    .card-empty-slot {
        width: calc(20% - 4px) !important;
        height: auto !important;
        aspect-ratio: 2 / 3.4 !important;
        /* Reverted to closer to previous height */
        min-width: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        border: 2px solid var(--club-color) !important;
        background: var(--club-bg) !important;
        border-radius: 6px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .card-empty-slot::before {
        font-size: 1.2rem !important;
        margin-bottom: 2px !important;
    }

    .card-empty-slot::after {
        font-size: 0.5rem !important;
    }

    .base-container .card-charactor,
    .base-container .card-empty-slot {
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        position: relative !important;
        border: none !important;
        /* Border is now on .card */
        background: none !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .base-container .card-charactor img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .base-container .card-power {
        position: absolute !important;
        bottom: 2px !important;
        left: 2px !important;
        z-index: 5 !important;
        width: auto !important;
        display: flex !important;
        justify-content: flex-start !important;
    }

    .base-container .pwr-badge {
        width: 43px !important;
        padding: 1px 0 !important;
        font-size: 0.45rem !important;
        line-height: 1 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        border: none !important;
        box-shadow: none !important;
    }

    .base-container .pwr-badge .pwr-label {
        display: block !important;
        font-size: 0.35rem !important;
    }

    .base-container .pwr-badge .base-pwr {
        font-size: 1.0rem !important;
    }

    .base-container .pwr-badge .bonus-pos,
    .base-container .pwr-badge .bonus-neg {
        font-size: 0.7rem !important;
    }

    .base-container .card-club {
        display: block !important;
        position: absolute !important;
        top: 2px !important;
        left: 2px !important;
        width: auto !important;
        z-index: 5 !important;
        background: rgba(0, 0, 0, 0.4) !important;
        border-radius: 4px !important;
        padding: 1px 2px !important;
    }

    .base-container .club-text {
        font-size: 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    .base-container .club-icon-mini {
        display: block !important;
        font-size: 1.0rem !important;
    }

    .base-container .card-name {
        display: none !important;
    }

    .base-container .card-status {
        top: -2px !important;
        right: -2px !important;
        z-index: 6 !important;
    }

    .base-container .card-status img {
        width: 35px !important;
        height: 35px !important;
    }

    .base-container .deck-options {
        position: absolute !important;
        bottom: 2px !important;
        right: 2px !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
        z-index: 5 !important;
        width: auto !important;
    }

    .base-container .option-icon-badge {
        padding: 0px 1.5px !important;
        white-space: nowrap !important;
    }

    .base-container .option-percent {
        font-size: 0.42rem !important;
        letter-spacing: -0.2px !important;
        line-height: 1 !important;
    }

    .base-container .option-icon-badge .material-symbols-rounded {
        font-size: 0.55rem !important;
    }

    .deck-status {
        width: 100% !important;
        height: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        padding: 12px 0 !important;
        font-size: 0.7rem !important;
        border-radius: 0 0 8px 8px !important;
        text-align: center !important;
        line-height: 1 !important;
        box-shadow: none !important;
        z-index: 10 !important;
    }

    .base-container .deck-status {
        font-size: 0.6rem !important;
        padding: 6px 0 !important;
        z-index: 5 !important;
    }

    /* Base Container Mobile Fixes */
    #field-section.active-view {
        display: flex !important;
        flex-direction: column !important;
    }

    .bases-grid {
        display: contents !important;
    }

    #field-section.active-view>*:not(.bases-grid) {
        order: 100 !important;
    }

    .base-container {
        flex-direction: column !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 0 0.25rem 0 !important;
        min-height: auto !important;
        box-sizing: border-box !important;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
    }

    #base-tamari {
        order: 1 !important;
    }

    #base-council {
        order: 2 !important;
    }

    #base-dance {
        order: 3 !important;
    }

    #base-cafe {
        order: 4 !important;
    }

    #base-portal {
        order: 5 !important;
    }

    #base-workshop {
        order: 6 !important;
    }

    .base-header {
        width: 100% !important;
        min-width: 0 !important;
        padding: 5px 10px !important;
        border-right: none !important;
        border-bottom: 2px solid rgba(0, 0, 0, 0.1) !important;
        text-align: center !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2px !important;
    }

    .base-header h3 {
        order: 1 !important;
        margin: 0 !important;
        font-size: 1.1rem !important;
    }

    .base-power {
        order: 2 !important;
        margin: 0 !important;
        padding: 4px 8px !important;
        min-width: 0 !important;
        width: auto !important;
        flex-direction: row !important;
        gap: 5px !important;
        display: inline-flex !important;
    }

    .base-power .power-label {
        font-size: 0.7rem !important;
    }

    .base-bonus {
        display: block !important;
        width: 100% !important;
        order: 3 !important;
        font-size: 0.75rem !important;
        margin: 0 !important;
    }

    .base-effects {
        display: none !important;
    }

    .base-count {
        display: none;
        order: 4 !important;
        width: 100% !important;
        font-size: 0.75rem !important;
        margin: 0 !important;
    }

    .inventory-filters {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
        justify-content: center !important;
        padding: 15px !important;
    }

    .inventory-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .inventory-actions button {
        width: 100% !important;
        margin: 0 !important;
    }

    #option-filters-group {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .inventory-filters label {
        text-align: center !important;
        margin-bottom: 2px !important;
    }

    .inventory-filters select {
        width: 100% !important;
        padding: 8px !important;
        font-size: 1rem !important;
    }

    .inventory-filters>div {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 4px !important;
    }

    #animation-cards-container {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 1.5rem !important;
        width: 100% !important;
        margin: 0 auto !important;
        grid-template-columns: none !important;
    }

    #animation-cards-container .card {
        width: 160px !important;
        min-width: 160px !important;
        max-width: 160px !important;
        height: auto !important;
        aspect-ratio: auto !important;
        flex: 0 0 auto !important;
    }

    .base-container .card-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: flex-start !important;
        gap: 4px !important;
        width: 100% !important;
        padding: 6px 4px 0px 4px !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .base-actions {
        order: 0 !important;
        flex-direction: row !important;
        position: static !important;
        transform: none !important;
        border-left: none !important;
        padding: 0 !important;
        margin-right: 8px !important;
        justify-content: center !important;
        width: auto !important;
        gap: 5px !important;
        background: none !important;
    }

    .base-actions button {
        width: 44px !important;
        height: 44px !important;
    }

    .sticky-note-content {
        font-family: 'Comic Sans MS', 'HG行書体', cursive;
        font-size: 0.85rem;
        line-height: 1.6;
        text-align: center;
        font-weight: bold;
        word-break: break-all;
    }

    /* Scale cards slightly more on mobile within bases if needed */
    /* The following rule is replaced by the "Compact Deck Card Scaling" block above */
    /*
    .base-container .card {
        width: 140px !important;
        min-width: 140px !important;
    }
    */
}

/* --- Ranking Section Styles --- */
#ranking-section {
    color: #ececf0;
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
}

#ranking-section h2 {
    color: #ffd700;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

#ranking-container {
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

#ranking-section .page-header {
    text-align: center;
    margin-bottom: 3rem;
}

#ranking-section .page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700 20%, #fff 60%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

#ranking-section .page-header p {
    color: rgba(255, 255, 255, 0.5);
}

.rank-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.rank-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.rank-header:hover {
    background: rgba(255, 255, 255, 0.08);
}

.rank-num {
    font-size: 2rem;
    font-weight: 800;
    width: 3.5rem;
    text-align: center;
}

.rank-info {
    flex: 1;
}

.user-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    display: block;
}

.prod-rate {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffd700;
}

.prod-rate span {
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

.rank-detail {
    display: none;
    padding: 0 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-card.open .rank-detail {
    display: block;
}

.base-group {
    margin-top: 2rem;
}

.base-label {
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.base-power-tag {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.ranking-deck {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

/* Scale down cards to fit in ranking */
.ranking-deck .card {
    transform-origin: top left;
    zoom: 0.75;
    transform: scale(0.75);
    margin: 0 -62px -95px 0;
    flex-shrink: 0;
}

@supports (zoom: 0.75) {
    .ranking-deck .card {
        transform: none;
        margin: 0;
    }
}

.update-time {
    text-align: right;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 2rem;
}

/* Mobile Overrides for Ranking */
@media (max-width: 768px) {
    #ranking-section .page-header h1 {
        font-size: 1.8rem;
    }

    .prod-rate {
        font-size: 1.4rem;
    }

    .rank-header {
        padding: 1rem;
        gap: 0.8rem;
    }

    .rank-num {
        font-size: 1.5rem;
        width: 2rem;
    }

    .ranking-deck {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 6px 4px 0px 4px !important;
        overflow: visible !important;
    }

    .ranking-deck .card {
        width: calc(20% - 4px) !important;
        height: auto !important;
        aspect-ratio: 2 / 3.4 !important;
        zoom: 1 !important;
        transform: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 6px !important;
        border: 2px solid var(--club-color) !important;
        background: var(--club-bg) !important;
    }

    .ranking-deck .card-charactor {
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
    }

    .ranking-deck .card-power {
        left: -5px !important;
    }

    .ranking-deck .pwr-badge {
        width: 43px !important;
        padding: 0px 0 !important;
        font-size: 0.45rem !important;
        background: rgba(0, 0, 0, 0.5) !important;
        border: none !important;
        box-shadow: none !important;
    }

    .ranking-deck .base-pwr {
        font-size: 1.0rem !important;
    }

    .ranking-deck .bonus-pos,
    .ranking-deck .bonus-neg {
        font-size: 0.7rem !important;
    }

    .ranking-deck .card-club {
        display: block !important;
        position: absolute !important;
        top: 2px !important;
        left: 2px !important;
        background: rgba(0, 0, 0, 0.4) !important;
        border-radius: 4px !important;
        padding: 1px 2px !important;
    }

    .ranking-deck .club-text {
        font-size: 0 !important;
    }

    .ranking-deck .club-icon-mini {
        font-size: 1.0rem !important;
        margin: 0 !important;
    }

    .ranking-deck .card-name {
        display: none !important;
    }

    .ranking-deck .card-status {
        scale: 0.6;
        top: -8px !important;
        right: -8px !important;
    }

    .ranking-deck .deck-status {
        font-size: 0.6rem !important;
        padding: 6px 0 !important;
    }

    .ranking-deck .deck-options {
        scale: 0.6;
        bottom: -10px !important;
        right: -15px !important;
        gap: 2px !important;
    }
}

/* Pagination Styling */
.ranking-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 2rem;
    flex-wrap: wrap;
    padding-bottom: 3rem;
}

.page-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    min-width: 40px;
}

.page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffd700;
    color: #ffd700;
}

.page-btn.active {
    background: #ffd700;
    color: #000;
    border-color: #ffd700;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Ranking Tabs Style */
.ranking-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 0 10px;
}

.rank-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.rank-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.rank-tab.active {
    background: #ffd700;
    color: #000;
    border-color: #ffd700;
}

@media (max-width: 768px) {
    .ranking-tabs {
        gap: 4px;
        margin-bottom: 1.5rem;
    }

    .rank-tab {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

/* User Highlighting */
.rank-card.is-me {
    border: 2px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
}

.rank-card.is-me .rank-num {
    color: #ffd700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-card.is-me .user-name {
    color: #ffd700 !important;
}

.me-badge {
    background: #ffd700;
    color: #000;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    margin-left: 10px;
    vertical-align: middle;
}

/* Official Website Banner Styles */
.official-banner-container {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 1.0);
}

.official-banner-container a {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.official-banner-container a:hover {
    transform: scale(1.05);
}

.official-banner-container .banner-text {
    color: #000000;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.official-banner-container .banner-img {
    max-width: 320px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s;
    background-color: #ffffff;
}

.official-banner-container a:hover .banner-img {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}
/* Special Thanks Styles */
#special-thanks-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, 100px);
    gap: 15px;
    justify-content: center;
    padding: 20px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: transparent;
}

.special-thanks-card {
    width: 100px;
    height: 140px;
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.3);
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(4px);
    background: var(--thanks-bg, rgba(255,255,255,0.1));
}

.special-thanks-card:hover {
    transform: translateY(-10px) scale(1.1);
    box-shadow: 0 12px 24px rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.8);
}

.thanks-img-container {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    border: 1px solid rgba(255,255,255,0.2);
}

.special-thanks-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    transform: scale(2.2);
    transform-origin: center 15%;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.special-thanks-card:hover img {
    transform: scale(2.4);
}

.special-thanks-card .thanks-name {
    font-size: 0.75rem;
    color: white;
    text-align: center;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
    word-break: break-all;
    line-height: 1.2;
}

/* Mobile Special Thanks Overrides */
@media (max-width: 768px) {
    #special-thanks-container.card-container.special-thanks {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        padding: 3px !important;
        justify-content: center !important;
    }
    .special-thanks-card {
        width: auto !important;
        height: auto !important;
        min-height: 120px !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .thanks-img-container {
        width: 100% !important;
        height: 100% !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }
    .special-thanks-card img {
        transform: scale(2.0) !important;
        transform-origin: center 15% !important;
    }
    .special-thanks-card .thanks-name {
        font-size: 0.6rem !important;
        line-height: 1.1 !important;
    }
}

/* Name Overlay Fix */
.special-thanks-card .thanks-name {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    padding: 6px 2px !important;
    backdrop-filter: blur(4px) !important;
    z-index: 10 !important;
    margin: 0 !important;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-sizing: border-box !important;
}

/* Tutorial Banner Styles */
.tutorial-banner-area {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.banner-card {
    width: 100%;
    max-width: 640px;
    padding: 0 !important;
    overflow: hidden;
}

.banner-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 21;
    overflow: hidden;
    line-height: 0;
}

.banner-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}
