:root {
    --gold-1: #d4af37;
    --cream: #fdfcf7;
    --accent: #3b2f1d;
}

body {
    margin: 0;
    font-family: "Georgia", "Apple SD Gothic Neo", "Noto Serif KR", serif;
    background: var(--cream);
    color: #2c2c2c;
}

header {
    background: linear-gradient(to bottom, #fff8dc, #f5deb3);
    border-bottom: 5px solid var(--gold-1);
    text-align: center;
    padding: 28px 20px;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.seal {
    width: 100px;
    height: 100px;
}

header img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 5px solid var(--gold-1);
    object-fit: cover;
}

h1 {
    margin: 10px 0 2px;
    font-size: 2.3rem;
    color: var(--accent);
}

h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #7a6650;
}

#motto {
    margin-top: 8px;
    font-style: italic;
    color: #5a4632;
}

nav {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

nav a {
    display: inline-block;
    margin: 0;
    font-weight: bold;
    color: #5a4632;
    text-decoration: none;
    white-space: nowrap;
}

nav a:hover {
    color: var(--gold-1);
}

main {
    max-width: 820px;
    margin: 36px auto;
    padding: 0 20px;
    line-height: 1.7;
}

section {
    margin-bottom: 46px;
}

section h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--gold-1);
    display: inline-block;
    padding-bottom: 5px;
    color: var(--accent);
}

.blessing {
    font-style: italic;
    margin: 18px 0;
    background: #fff8dc;
    border-left: 5px solid var(--gold-1);
    padding: 14px;
}

footer {
    background: #fff8dc;
    border-top: 5px solid var(--gold-1);
    text-align: center;
    padding: 18px;
    font-size: .9rem;
}

.store-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.product-card {
    background: #fffef7;
    border: 2px solid #edd7a1;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(59, 47, 29, 0.12);
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 14px;
}

.product-info h4 {
    margin: 0 0 6px;
    color: var(--accent);
}

.price {
    margin-top: 8px;
    font-weight: bold;
    color: var(--gold-1);
    font-size: 1.05rem;
}

.game-panel {
    background: #fff8dc;
    border: 2px solid var(--gold-1);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 22px rgba(59, 47, 29, 0.12);
}

.game-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.stat {
    flex: 1;
    min-width: 120px;
    background: #fff;
    border: 1px solid #e3cc7a;
    border-radius: 10px;
    padding: 10px 12px;
}

.stat strong {
    display: block;
    margin-top: 4px;
    font-size: 1.2rem;
    color: var(--accent);
}

.upgrade-btn {
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: bold;
    cursor: pointer;
    color: #fff;
    margin-right: 8px;
    margin-top: 8px;
    background: var(--gold-1);
}

.game-btn {
    border: 4px solid var(--gold-1);
    border-radius: 50%;
    width: 140px;
    height: 140px;
    padding: 0;
    background: #fff8dc;
    box-shadow: 0 8px 18px rgba(59, 47, 29, 0.16);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 8px;
}

.game-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-btn:active {
    animation: pancha-bounce 180ms ease-out;
}

@keyframes pancha-bounce {
    0% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.04);
    }

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

.game-button-wrap {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.upgrade-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}

#lang-toggle {
    position: absolute;
    top: 15px;
    right: 20px;
    background: var(--gold-1);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}