:root {
    --primary: #0056b3;
    --accent: #e91e63;
    --bg: #f8fafc;
    --card: #ffffff;
    --success: #22c55e;
    --warning: #f59e0b;
}

body {
    font-family: sans-serif;
    background-color: var(--bg);
    margin: 0;
    display: flex;
    justify-content: center;
    padding-top: 20px;
}

.app-container {
    background: var(--card);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    text-align: center;
    width: 100%;
    max-width: 600px;
}

/* タブデザイン */
.tabs { display: flex; justify-content: center; gap: 12px; margin-bottom: 20px; }
.tab-btn {
    padding: 10px 20px; font-size: 15px; font-weight: bold; border: 2px solid var(--primary);
    border-radius: 12px; background: white; color: var(--primary); cursor: pointer;
    transition: all 0.3s;
}
.tab-btn.active { background: var(--primary); color: white; }

.question-box {
    background: #fff9c4; padding: 15px; border-radius: 12px; margin-bottom: 20px;
    font-size: 18px; font-weight: bold; border-left: 5px solid var(--warning);
}

/* 時計 */
.clock-area { position: relative; margin-bottom: 20px; }
.clock {
    width: 200px; height: 200px; border: 6px solid var(--primary); border-radius: 50%;
    position: relative; margin: 0 auto; background: #fff;
}
.center-dot {
    position: absolute; top: 50%; left: 50%; width: 12px; height: 12px;
    background: #fff; border: 3px solid var(--accent); border-radius: 50%;
    transform: translate(-50%, -50%); z-index: 10;
}
.hand {
    position: absolute; bottom: 50%; left: 50%;
    transform-origin: bottom center; transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}
.hour { width: 8px; height: 50px; background: var(--primary); margin-left: -4px; z-index: 5; }
.minute { width: 5px; height: 80px; background: var(--accent); margin-left: -2.5px; z-index: 6; }
.number { position: absolute; top: 50%; left: 50%; font-size: 16px; font-weight: bold; color: #334155; }

/* 数直線・入力エリア */
.timeline-container { background: #f1f5f9; padding: 20px; border-radius: 15px; margin-bottom: 20px; }
.timeline { display: flex; align-items: center; justify-content: space-between; position: relative; }
.time-point { font-weight: bold; font-size: 14px; color: #475569; width: 80px; }

.arrow-box {
    flex-grow: 1; display: flex; flex-direction: column; align-items: center;
}

.input-mini {
    width: 45px; padding: 5px; border: 2px solid #cbd5e1; border-radius: 8px;
    text-align: center; font-size: 16px; font-weight: bold; margin-bottom: 8px;
}
.input-mini:focus { border-color: var(--primary); outline: none; }
.input-mini.correct { background: #dcfce7; border-color: var(--success); color: var(--success); }

.arrow-line { width: 100%; height: 3px; background: #94a3b8; position: relative; }
.arrow-line::after {
    content: ''; position: absolute; right: -2px; top: -5px;
    border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 10px solid #94a3b8;
}

/* 合計エリア */
.total-area {
    border: 3px solid var(--accent); padding: 15px; border-radius: 15px;
    display: inline-block; background: #fff; margin-top: 10px;
    transition: opacity 0.3s;
}
.total-input { width: 60px; font-size: 20px; border: none; border-bottom: 2px solid var(--accent); text-align: center; outline: none; font-weight: bold; }

/* メッセージ */
.message-box { min-height: 24px; color: var(--primary); font-weight: bold; margin-bottom: 15px; }

/* ボタン */
.btn-check {
    background: var(--primary); color: white; border: none; padding: 8px 16px;
    border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.2s;
}
.btn-check:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.btn-check:disabled { background: #cbd5e1; cursor: not-allowed; }
.btn-reset { background: #64748b; margin-top: 10px; font-size: 14px; color: white; border: none; padding: 8px 20px; border-radius: 5px; cursor: pointer; }