body {
    background: #fff8e1;
    font-family: 'Zen Maru Gothic', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 20px;
    color: #333;
}

.container {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-sizing: border-box;
}

h1 {
    font-size: 1.3rem;
    color: #f57c00;
    margin-top: 0;
    margin-bottom: 5px;
}

p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid #ffe0b2;
    border-radius: 10px;
    box-sizing: border-box;
    resize: vertical;
    margin-bottom: 15px;
}

textarea:focus {
    outline: none;
    border-color: #f57c00;
}

.start-btn {
    width: 100%;
    padding: 14px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
    transition: 0.1s;
    margin-bottom: 15px;
}

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

#race-track {
    position: relative;
    width: 100%;
    height: 250px;
    background: #f1f8e9;
    border: 2px dashed #c8e6c9;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 10px 0;
    box-sizing: border-box;
}

.track-hidden {
    display: none !important;
}

#finish-line {
    position: absolute;
    right: 30px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #e53935;
    z-index: 2;
}
#finish-line::after {
    content: 'GOAL';
    position: absolute;
    top: 5px;
    right: -15px;
    font-size: 0.6rem;
    font-weight: bold;
    color: #e53935;
    background: white;
    padding: 2px;
}

.runner-lane {
    position: relative;
    width: 100%;
    height: 35px;
    display: flex;
    align-items: center;
}

.runner {
    position: absolute;
    left: 10px;
    background: #4caf50;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: left 0.1s linear;
}

#winner-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.modal-hidden {
    display: none !important;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 85%;
    width: 320px;
}

@keyframes popUp {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.winner-title {
    font-size: 1rem;
    color: #f57c00;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

#winner-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 15px;
    word-break: break-all;
}

/* ★2位以降の順位リストのスタイル */
.ranking-list {
    text-align: left;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 20px;
    max-height: 120px;
    overflow-y: auto;
}

.rank-item {
    font-size: 0.85rem;
    color: #666;
    padding: 3px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
}
.rank-item:last-child {
    border-bottom: none;
}

#close-modal-btn {
    padding: 10px 25px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(76, 175, 80, 0.3);
}

.back-btn {
    align-self: flex-start;
    margin-left: 10px;
    margin-bottom: 15px;
    text-decoration: none;
    color: #555;
    font-weight: bold;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.seo-text-box {
    width: 100%;
    max-width: 500px;
    margin-top: 30px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    text-align: left;
    box-sizing: border-box;
}

.seo-text-box h1 {
    font-size: 0.95rem;
    color: #f57c00;
    margin-top: 0;
    margin-bottom: 8px;
    border-bottom: 2px solid #ffe0b2;
    padding-bottom: 4px;
}

.seo-text-box p {
    font-size: 0.85rem;
    margin: 0;
    color: #555;
    text-align: left;
}