:root {
    --primary-color: #004E98; /* 指定の青 */
    --accent-color: #D70C18; /* 指定の赤 */
    --text-color: #000000;    /* 指定の黒 */
    --secondary-color: #004E98;
    --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #e1e7ec 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-x: none;
    touch-action: pan-y;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 600px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* Screen Wrapper */
.screen {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.hidden {
    display: none !important;
}

/* Start Screen */
.start-screen .title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.start-screen .title span {
    color: var(--primary-color);
    background: linear-gradient(45deg, var(--primary-color), #003366);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.start-screen .subtitle {
    font-size: 1.2rem;
    margin-bottom: 3.5rem;
    color: #444;
    font-weight: 500;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-back-absolute {
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: 0.05em;
    outline: none;
    touch-action: manipulation;
}

.btn-primary {
    padding: 1.2rem 3.5rem;
    font-size: 1.2rem;
    background: linear-gradient(90deg, var(--primary-color), #003366);
    color: white;
    box-shadow: 0 10px 25px rgba(0, 78, 152, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    padding: 1rem 3rem;
    font-size: 1rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-top: 1rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-back-absolute {
    position: absolute;
    top: -50px;
    left: 0;
    background: transparent;
    color: var(--primary-color);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s;
    z-index: 10;
}

.btn-back-absolute:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Question Screen */
.question-screen .question-content {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 50, 100, 0.08);
    width: 100%;
    backdrop-filter: blur(20px);
    position: relative;
}

.question-text {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-color);
    line-height: 1.4;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 2rem;
}

.option-btn {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 1.2rem;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
    min-height: 100px; /* 高さを統一 */
    touch-action: manipulation;
}

.option-btn:hover {
    border-color: rgba(0, 78, 152, 0.3);
    background-color: #f0f7ff;
    transform: scale(1.02);
}

.option-label {
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
    background: var(--primary-color);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-right: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 78, 152, 0.2);
}

.option-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
}

/* Result Screen */
.result-card {
    background: white;
    padding: 4rem 3rem;
    border-radius: 32px;
    box-shadow: 0 25px 80px rgba(0, 60, 120, 0.12);
    width: 100%;
    max-width: 540px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 10px solid var(--accent-color);
}

.result-label {
    font-size: 0.9rem;
    color: #666;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.result-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.result-quote {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0 auto 3rem;
    position: relative;
    padding: 2.5rem 1rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.6;
    max-width: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-quote::before,
.result-quote::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    opacity: 0.15;
    background-size: contain;
    background-repeat: no-repeat;
}

.result-quote::before {
    top: 0;
    left: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23004E98'%3E%3Cpath d='M14.017 21L14.017 18C14.017 16.8954 14.9124 16 16.017 16H19.017C19.5693 16 20.017 15.5523 20.017 15V9C20.017 8.44772 19.5693 8 19.017 8H15.017C14.4647 8 14.017 7.55228 14.017 7V4C14.017 3.44772 14.4647 3 15.017 3H19.017C21.2261 3 23.017 4.79086 23.017 7V15C23.017 18.3137 20.3307 21 17.017 21H14.017ZM1.017 21L1.017 18C1.017 16.8954 1.91238 16 3.017 16H6.017C6.56928 16 7.017 15.5523 7.017 15V9C7.017 8.44772 6.56928 8 6.017 8H2.017C1.46472 8 1.017 7.55228 1.017 7V4C1.017 3.44772 1.46472 3 2.017 3H6.017C8.22614 3 10.017 4.79086 10.017 7V15C10.017 18.3137 7.33066 21 4.017 21H1.017Z'/%3E%3C/svg%3E");
}

.result-quote::after {
    bottom: 0;
    right: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23004E98'%3E%3Cpath d='M10.017 3L10.017 6C10.017 7.10457 9.12162 8 8.017 8H5.017C4.46472 8 4.017 8.44772 4.017 9V15C4.017 15.5523 4.46472 16 5.017 16H9.017C9.56928 16 10.017 16.4477 10.017 17V20C10.017 20.5523 9.56928 21 9.017 21H5.017C2.80786 21 1.017 19.2091 1.017 17V9C1.017 5.68629 3.7033 3 7.017 3H10.017ZM23.017 3L23.017 6C23.017 7.10457 22.1216 8 21.017 8H18.017C17.4647 8 17.017 8.44772 17.017 9V15C17.017 15.5523 17.4647 16 18.017 16H22.017C22.5693 16 23.017 16.4477 23.017 17V20C23.017 20.5523 22.5693 21 22.017 21H18.017C15.8079 21 14.017 19.2091 14.017 17V9C14.017 5.68629 16.7033 3 20.017 3H23.017Z'/%3E%3C/svg%3E");
}

.result-description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #333;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 20px;
    font-size: 1rem;
    text-align: left;
    font-weight: 500;
}

.result-details {
    margin-bottom: 3rem;
    text-align: left;
}

.detail-section {
    margin-bottom: 1.5rem;
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.detail-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-title::before {
    content: '';
    width: 4px;
    height: 1em;
    background: var(--accent-color);
    border-radius: 2px;
}

.detail-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
    font-weight: 500;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.tag {
    background: #eef5ff;
    color: var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Schedule Refined Styles */
.schedule-container {
    margin-top: 4rem;
    margin-bottom: 3rem;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 3rem;
}

.schedule-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: 0.05em;
}

.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.schedule-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
    align-items: start;
    position: relative;
    padding-bottom: 3rem;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp 0.5s forwards;
}

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

.schedule-row::before {
    content: '';
    position: absolute;
    left: 39px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #eee;
    z-index: 1;
}

.schedule-row:first-child::before { top: 20px; }
.schedule-row:last-child::before { bottom: auto; height: 20px; }

.schedule-time {
    position: relative;
    z-index: 2;
    text-align: center;
}

.time-sticky {
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.time-text {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.schedule-content {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    transition: transform 0.2s;
}

/* .schedule-content:hover {
    transform: translateY(-3px);
} */

.schedule-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    font-weight: 600;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .app-container { padding: 16px; }
    .start-screen .title { font-size: 2.5rem; }
    .btn-primary { width: 100%; }
    .question-screen .question-content { padding: 2rem 1.5rem; }
    .result-card { padding: 2.5rem 1.5rem; }
    .result-title { font-size: 1.8rem; }
    .schedule-row { grid-template-columns: 60px 1fr; gap: 1rem; }
    .schedule-row::before { left: 29px; }
    .time-sticky { width: 45px; height: 45px; }
}