@charset "UTF-8";

/* ===== グローバルリセット & 基本設定 ===== */
:root {
    --primary-color: #0d6efd;
    --primary-hover-color: #0b5ed7;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --font-color: #333;
    --border-color: #dee2e6;
    --white-color: #ffffff;
    --black-color: #000000;
}

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

/* 画面サイズに応じたルートフォントサイズ設定 */
html {
    font-size: 16px; /* デフォルト */
    -webkit-text-size-adjust: 100%;
}

@media (max-width: 768px) {
    html { font-size: 15px; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.6;
    color: var(--font-color);
    background-color: var(--light-color);
    width: 100%;
    max-width: 960px; /* PCでの最大幅を少し広げる */
    margin: 0 auto;
    padding: 0 1rem; /* 左右に余白を追加 */
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

body:not(.admin-page) {
    user-select: none;
}


/* ===== 基本的なUIコンポーネント ===== */
h2, h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

ul {
    list-style: none;
}

button,
input[type="text"],
input[type="password"],
input[type="number"] {
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    width: 100%;
    transition: all 0.2s ease-in-out;
}

button {
    cursor: pointer;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

button:hover:not(:disabled) {
    background-color: var(--primary-hover-color);
    border-color: var(--primary-hover-color);
}

button:active:not(:disabled) {
    transform: scale(0.98);
}

button:disabled {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.65;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* ===== ユーティリティクラス ===== */
.hidden {
    display: none !important;
}

.small-text {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-top: -0.5rem;
}


/* ===== オーバーレイ & モーダル (共通スタイル) ===== */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 450px;
    z-index: 1010;
}

.modal-content {
    background-color: var(--white-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}
