* {
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
body {
    margin: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fb;
    color: #1e293b;
    padding-bottom: 20px;
}
header {
    background: #1e293b;
    color: white;
    padding: 16px 20px;
    font-size: 1.6rem;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
nav {
    display: flex;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 64px;
    z-index: 10;
}
nav button {
    flex: 1;
    padding: 12px 0;
    font-size: 1rem;
    background: none;
    border: none;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}
nav button.active {
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
}
.tab {
    display: none;
    padding: 20px;
    animation: fade 0.2s ease;
}
.tab.active {
    display: block;
}
@keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.upload-area {
    border: 2px dashed #94a3b8;
    border-radius: 24px;
    padding: 32px 16px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 20px;
}
.upload-area.dragover {
    background: #e0f2fe;
    border-color: #3b82f6;
}
#preview {
    text-align: center;
}
#preview-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.6; transform: none; }
.grid-selector {
    display: grid;
    gap: 2px;
    background: #cbd5e1;
    border: 1px solid #94a3b8;
    margin: 20px 0;
}
.cell {
    aspect-ratio: 1 / 1;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    background-size: cover;
    background-position: center;
}
.cell.hidden-selected {
    background: #fecaca;
    border: 2px solid #ef4444;
}
.puzzle-card {
    background: white;
    border-radius: 20px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: 0.1s;
}
.puzzle-card:active { background: #f1f5f9; }
.puzzle-title { font-weight: bold; font-size: 1.1rem; }
.puzzle-meta { font-size: 0.8rem; color: #475569; margin-top: 6px; }
.timer {
    font-family: monospace;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
}
.game-over {
    background: #ef4444;
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 40px;
    margin: 10px 0;
}
.complete {
    background: #10b981;
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 40px;
    margin: 10px 0;
}
.hidden-reveal {
    animation: pop 0.3s ease-out;
}
@keyframes pop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
input, select {
    width: 100%;
    padding: 12px;
    margin: 8px 0 16px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 1rem;
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.badge {
    background: #e2e8f0;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.75rem;
}

/* =====================================================
   ファイル: static_slidelimits/css/style.css
   追加内容: 隠しマス出現時のアニメーション
   ===================================================== */

.hidden-reveal {
    animation: pop 0.4s ease-out;
}

@keyframes pop {
    0% {
        transform: scale(0.5);
        opacity: 0.3;
        filter: brightness(0.5);
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
        filter: brightness(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        filter: brightness(1);
    }
}

@media (max-width: 480px) {
    .tab { padding: 16px; }
}

.ad-opera-wrap {
    text-align: right;   /* ← これで全体が右寄せになる */
}

.ad-opera {
    display: inline-block;
    position: relative;
    margin-top: 10px;
}

.ad-opera img {
    width: 180px;
    border-radius: 8px;
}

.ad-opera-popup {
    position: absolute;
    bottom: 100%;
    right: 0;
    transform: translateY(-8px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.ad-opera:hover .ad-opera-popup {
    opacity: 1;
}
