:root {
    /* 全体を淡いグレーベースに変更 */
    --bg-base: #f3f4f6;
    --bg-surface: #ffffff;
    --text-main: #374151;
    /* テキストは少し濃いグレーで可読性を確保 */
    --text-muted: #6b7280;
    --accent-color: #4b5563;
    /* アクセントもグレー系に */
    --accent-hover: #1f2937;
    --border-color: #d1d5db;
}

.mobile-only {
    display: none;
}

@media (max-width: 640px) {
    .mobile-only {
        display: inline;
    }
}

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

body {
    /* フォントを明朝系に変更 */
    font-family: 'Noto Serif JP', serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
}

header,
section,
footer {
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: var(--accent-color);
}

/* Hero Area / Title Image */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    position: relative;
}

.hero img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Links Section */
.links-container {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: -2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
    padding: 0 1rem;
}

@media (max-width: 640px) {
    .links-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 1rem;
    }
}

.link-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.05s ease-out;
    text-align: center;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.4;
}

.link-btn:hover {
    opacity: 0.8;
    transform: translateY(2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.link-btn.disabled {
    background-color: #e5e7eb;
    color: #9ca3af;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

.link-btn.disabled:hover {
    transform: none;
    background-color: #e5e7eb;
}

/* Screenshots Section */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.screenshot-item {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: var(--bg-surface);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: block;
}

.screenshot-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Spec Section */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.spec-table th,
.spec-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--bg-base);
}

.spec-table th {
    width: 30%;
    color: var(--text-main);
    font-weight: 700;
    background-color: rgba(0, 0, 0, 0.03);
    border-right: 1px solid var(--bg-base);
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
    border-bottom: none;
}

/* Terms Section */
.terms-box {
    background-color: var(--bg-surface);
    padding: 2rem;
    border-radius: 12px;
    height: 450px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.95rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
}

/* Scrollbar styles for terms box */
.terms-box::-webkit-scrollbar {
    width: 14px;
}

.terms-box::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 7px;
}

.terms-box::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 7px;
    border: 3px solid #e5e7eb;
}

.terms-box::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

footer {
    text-align: center;
    margin-top: 4rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}