:root {
    --gold: #d4af37;
    --gold-light: #f4d03f;
    --gold-dark: #b8860b;
    --ink: #1a1a2e;
    --ink-light: #2d2d44;
    --paper: #faf8f5;
    --paper-dark: #e8e4dc;
    --vermillion: #e74c3c;
    --vermillion-dark: #c0392b;
    --indigo: #34495e;
    --indigo-light: #5d6d7e;
    --sakura: #ffb7c5;
    --sakura-dark: #ff91a4;
    --bamboo: #27ae60;
    --bamboo-dark: #1e8449;
    --ocean: #3498db;
    --ocean-dark: #2980b9;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-strong: 0 12px 48px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 30px rgba(212, 175, 55, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    background: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 和風背景パターン */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        repeating-linear-gradient(45deg,
            transparent,
            transparent 50px,
            rgba(255, 255, 255, 0.01) 50px,
            rgba(255, 255, 255, 0.01) 51px);
    pointer-events: none;
    z-index: 0;
}

/* 浮遊する桜の花びら */
.sakura-particle {
    position: fixed;
    width: 12px;
    height: 12px;
    background: var(--sakura);
    opacity: 0.6;
    border-radius: 50% 0 50% 50%;
    pointer-events: none;
    z-index: 1;
    animation: sakura-fall linear infinite;
}

@keyframes sakura-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.app-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ヘッダー */
.game-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fade-in-down 0.8s ease-out;
}

@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-title {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--gold);
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(212, 175, 55, 0.4);
    letter-spacing: 0.15em;
    position: relative;
    display: inline-block;
}

.game-title::before,
.game-title::after {
    content: '◆';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.4em;
    color: var(--gold-dark);
    opacity: 0.7;
}

.game-title::before {
    left: -1.5em;
}

.game-title::after {
    right: -1.5em;
}

.game-subtitle {
    font-size: 0.95rem;
    color: var(--paper-dark);
    letter-spacing: 0.3em;
    margin-top: 8px;
    opacity: 0.8;
}

/* メインレイアウト */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 30px;
    max-width: 1400px;
    width: 100%;
    animation: fade-in-up 0.8s ease-out 0.2s both;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* アテナ様セクション */
.athena-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.athena-portrait {
    position: relative;
    width: 200px;
    height: 200px;
}

.athena-frame {
    position: absolute;
    inset: -10px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    opacity: 0.5;
    animation: rotate-slow 20s linear infinite;
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.athena-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        var(--shadow-strong),
        var(--shadow-glow),
        inset 0 -5px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.athena-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.athena-face:hover img {
    transform: scale(1.05);
}

.athena-face.thinking {
    animation: thinking-pulse 1.5s ease-in-out infinite;
}

.athena-face.happy {
    animation: happy-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        var(--shadow-strong),
        0 0 50px rgba(212, 175, 55, 0.5);
}

.athena-face.worried {
    animation: worried-shake 0.5s ease-in-out;
}

.athena-face.angry {
    box-shadow:
        var(--shadow-strong),
        0 0 50px rgba(231, 76, 60, 0.5);
}

@keyframes thinking-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

@keyframes happy-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-15px);
    }

    75% {
        transform: translateY(5px);
    }
}

@keyframes worried-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }
}

.athena-name {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.1em;
}

.message-bubble {
    background: var(--paper);
    border-radius: 20px;
    padding: 20px;
    max-width: 250px;
    min-height: 80px;
    position: relative;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ink);
    transition: all 0.3s ease;
}

.message-bubble::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border: 12px solid transparent;
    border-bottom-color: var(--paper);
}

.message-bubble.new-message {
    animation: message-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes message-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ゲームボード */
.game-board-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.board-wrapper {
    background: linear-gradient(145deg, #5d4e37, #3d3225);
    padding: 20px;
    border-radius: 16px;
    box-shadow:
        var(--shadow-strong),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    position: relative;
}

.board-wrapper::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid var(--gold);
    border-radius: 12px;
    opacity: 0.3;
    pointer-events: none;
}

#board {
    display: grid;
    grid-template-columns: repeat(9, 54px);
    grid-template-rows: repeat(9, 54px);
    gap: 3px;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: 8px;
}

.cell {
    width: 54px;
    height: 54px;
    background: linear-gradient(145deg, #f5e6d3, #e8d5bc);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.cell::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

.cell.player-zone {
    background: linear-gradient(145deg, #d4e5f7, #bdd4eb);
}

.cell.ai-zone {
    background: linear-gradient(145deg, #f7d4d4, #ebbdbd);
}

.cell:hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.cell.selected {
    background: linear-gradient(145deg, var(--gold-light), var(--gold));
    box-shadow:
        0 0 20px rgba(212, 175, 55, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: selected-pulse 1.2s ease-in-out infinite;
}

@keyframes selected-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
    }
}

.cell.possible {
    background: linear-gradient(145deg, #a8e6cf, #88d8b0);
    animation: possible-glow 0.8s ease-in-out infinite alternate;
}

@keyframes possible-glow {
    from {
        opacity: 0.7;
    }

    to {
        opacity: 1;
    }
}

.cell.capture {
    background: linear-gradient(145deg, #ffb3ba, #ff8a95);
    animation: capture-pulse 0.6s ease-in-out infinite;
}

@keyframes capture-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.cell.warning {
    background: linear-gradient(145deg, #ff6b6b, #ee5a5a) !important;
    animation: warning-flash 0.4s ease-in-out infinite;
}

@keyframes warning-flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.cell.block-placeable {
    background: linear-gradient(145deg, #74b9ff, #5fa8f5);
    animation: block-highlight 0.8s ease-in-out infinite alternate;
}

@keyframes block-highlight {
    from {
        box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
    }

    to {
        box-shadow: inset 0 0 15px rgba(52, 152, 219, 0.4);
    }
}

.cell.last-move {
    background: linear-gradient(145deg, #dfe6e9, #b2bec3);
    position: relative;
}

.cell.last-move::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--gold);
    border-radius: 6px;
    opacity: 0.5;
    pointer-events: none;
}

/* 駒 */
.piece {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: grab;
    z-index: 1;
}

.piece::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 60%);
}

.piece::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    opacity: 0.3;
}

.piece.B {
    background: linear-gradient(145deg, #2c3e50, #1a252f);
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.piece.B::after {
    background: var(--ink-light);
}

.piece.W {
    background: linear-gradient(145deg, #ffffff, #ecf0f1);
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
}

.piece.W::after {
    background: #ddd;
}

.piece:hover {
    transform: translateY(-3px) scale(1.05);
}

.piece.captured {
    animation: piece-capture 0.5s ease-out forwards;
}

@keyframes piece-capture {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.8;
    }

    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

.piece.moving {
    animation: piece-move 0.3s ease-out;
    z-index: 10;
}

@keyframes piece-move {
    0% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* ブロック */
.block {
    width: 38px;
    height: 38px;
    background: linear-gradient(145deg, #e67e22, #d35400);
    border-radius: 6px;
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    position: relative;
}

.block::before {
    content: '✕';
    color: rgba(255, 255, 255, 0.8);
    font-weight: bold;
    font-size: 18px;
}

/* 情報パネル */
#info {
    background: var(--paper);
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    box-shadow: var(--shadow-soft);
    color: var(--ink);
    min-width: 300px;
    transition: all 0.3s ease;
}

#info.warning {
    background: linear-gradient(145deg, #ff6b6b, #ee5a5a);
    color: white;
    animation: info-shake 0.5s ease-in-out;
}

@keyframes info-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

#info.victory {
    background: linear-gradient(145deg, var(--gold), var(--gold-dark));
    color: var(--ink);
    animation: victory-glow 1s ease-in-out infinite alternate;
}

@keyframes victory-glow {
    from {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    }

    to {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
    }
}

/* サイドパネル */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-soft);
}

.panel-card h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* スコアカード */
.score-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.score-item {
    text-align: center;
    padding: 15px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.score-item:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.3);
}

.score-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.score-value {
    font-family: 'Noto Serif JP', serif;
    font-size: 2rem;
    font-weight: 700;
}

.score-value.player {
    color: var(--ocean);
}

.score-value.ai {
    color: var(--vermillion);
}

/* 取った駒 */
.captured-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.captured-icon {
    font-size: 1.5rem;
}

.captured-count {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
}

.captured-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* AIステータス */
.ai-personality {
    text-align: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 15px;
}

.personality-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.personality-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
}

.stat-item {
    margin-bottom: 12px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    font-weight: 700;
    color: var(--gold);
}

.stat-bar-bg {
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease, background 0.3s ease;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
}

.stat-bar.high {
    background: linear-gradient(90deg, var(--bamboo-dark), var(--bamboo));
}

.stat-bar.low {
    background: linear-gradient(90deg, var(--vermillion-dark), var(--vermillion));
}

/* コントロールボタン */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 1;
}

.btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(145deg, var(--gold), var(--gold-dark));
    color: var(--ink);
}

.btn-success {
    background: linear-gradient(145deg, var(--bamboo), var(--bamboo-dark));
    color: white;
}

.btn-danger {
    background: linear-gradient(145deg, var(--vermillion), var(--vermillion-dark));
    color: white;
}

.btn-info {
    background: linear-gradient(145deg, var(--ocean), var(--ocean-dark));
    color: white;
}

/* 難易度選択 */
.difficulty-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.diff-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.diff-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.diff-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
}

/* ルール */
.rules-content {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.rule-icon {
    color: var(--gold);
    flex-shrink: 0;
}

/* コンボ表示 */
.combo-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Noto Serif JP', serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold);
    text-shadow:
        0 0 20px rgba(212, 175, 55, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    animation: combo-pop 1s ease-out forwards;
}

@keyframes combo-pop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1) translateY(-50px);
    }
}

/* 勝利演出 */
.victory-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.victory-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.victory-text {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
    animation: victory-bounce 0.8s ease-out;
    text-align: center;
}

@keyframes victory-bounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.victory-subtext {
    font-size: 1.5rem;
    color: var(--paper);
    margin-top: 20px;
    opacity: 0;
    animation: fade-in 0.5s ease-out 0.5s forwards;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

.victory-btn {
    margin-top: 40px;
    opacity: 0;
    animation: fade-in 0.5s ease-out 1s forwards;
}

/* ターン履歴 */
.turn-history {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 10px;
}

.turn-history::-webkit-scrollbar {
    width: 4px;
}

.turn-history::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.turn-history::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 2px;
}

.turn-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.1);
}

.turn-item.player {
    border-left: 3px solid var(--ocean);
}

.turn-item.ai {
    border-left: 3px solid var(--vermillion);
}

.turn-number {
    font-weight: 700;
    color: var(--gold);
    min-width: 24px;
}

/* レスポンシブ */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 1fr;
        max-width: 600px;
    }

    .athena-section {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .athena-portrait {
        width: 140px;
        height: 140px;
    }

    .message-bubble {
        max-width: 300px;
    }

    .side-panel {
        order: 3;
    }
}

@media (max-width: 600px) {
    .app-container {
        padding: 10px;
    }

    .game-title {
        font-size: 2rem;
    }

    #board {
        grid-template-columns: repeat(9, 38px);
        grid-template-rows: repeat(9, 38px);
        gap: 2px;
    }

    .cell {
        width: 38px;
        height: 38px;
    }

    .piece {
        width: 30px;
        height: 30px;
    }

    .block {
        width: 28px;
        height: 28px;
    }

    .board-wrapper {
        padding: 12px;
    }

    .athena-portrait {
        width: 100px;
        height: 100px;
    }

    .message-bubble {
        font-size: 0.85rem;
        padding: 15px;
        min-height: 60px;
    }

    .panel-card {
        padding: 15px;
    }

    .score-value {
        font-size: 1.5rem;
    }
}

/* アニメーション遅延ユーティリティ */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}