@charset "utf-8";

/*初期化 始まり */
html,
body,
div,
span,
h1{
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
    font-family: 'メイリオ', Meiryo, 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'ＭＳ Ｐゴシック', 'MS PGothic', sans-serif;
}

a {
    color: #1f5a7a;
    text-decoration: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

th,
td {
    border: 1px solid #ccd6dd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #eef4f8;
}

.container {
    max-width: 960px;
    margin: 24px auto;
    padding: 0 16px;
}

.narrow {
    max-width: 640px;
}

.search-form,
.edit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input,
textarea,
select,
button {
    font-size: 14px;
    padding: 8px;
}

.action-row {
    display: flex;
    gap: 8px;
    margin: 8px 0;
}

.button-link {
    display: inline-block;
    border: 1px solid #1f5a7a;
    padding: 8px 12px;
}

.error-message {
    color: #c0392b;
    font-weight: bold;
}

/* competitions */
.competition-page {
    padding: 24px;
    background-color: #ffffff;
}

.competition-shell {
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid #202020;
    background-color: #ffffff;
}

.competition-header {
    border-bottom: 1px solid #202020;
    padding: 10px 18px;
    font-size: 42px;
    line-height: 1;
}

.competition-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 8px;
}

.competition-title-row h1 {
    font-size: 52px;
    font-weight: 500;
}

.btn-register,
.btn-search {
    background-color: #1ba1e2;
    border: 1px solid #006eaf;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 24px;
    font-weight: 700;
}

.btn-register {
    display: inline-block;
}

.search-box {
    border: 1px solid #202020;
    border-radius: 12px;
    margin: 0 16px;
    padding: 14px 12px 18px;
}

.search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 24px;
}

.field input,
.field select {
    height: 56px;
    border: 1px solid #202020;
    border-radius: 8px;
    font-size: 30px;
    padding: 4px 16px;
}

.field input::placeholder {
    color: #b3b3b3;
}

.search-action {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 2px;
}

.competition-table {
    margin: 16px;
    width: calc(100% - 32px);
    border-collapse: collapse;
}

.competition-table th,
.competition-table td {
    border: 1px solid #202020;
    text-align: center;
    padding: 8px 6px;
    font-size: 32px;
}

.competition-table th {
    background-color: #bac8d3;
    font-weight: 400;
}

.competition-table th:nth-child(1),
.competition-table td:nth-child(1) {
    width: 25%;
}

.competition-table th:nth-child(2),
.competition-table td:nth-child(2) {
    width: 14%;
}

.competition-table th:nth-child(3),
.competition-table td:nth-child(3),
.competition-table th:nth-child(4),
.competition-table td:nth-child(4) {
    width: 22%;
}

.competition-table th:nth-child(5),
.competition-table td:nth-child(5) {
    width: 17%;
}

.competition-link {
    color: #1f3bc8;
    text-decoration: underline;
}

.status-open {
    color: #1d9f2c;
    font-weight: 700;
}

.empty-row {
    color: #555555;
}

/* competition register */
.register-shell {
    min-height: 620px;
}

.register-page .competition-title-row {
    padding-bottom: 0;
}

.register-page .competition-title-row h1 {
    font-size: 56px;
}

.register-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 26px;
    row-gap: 14px;
    padding: 8px 16px 20px;
}

.register-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.register-field.full {
    grid-column: 1 / -1;
}

.register-field.half {
    grid-column: span 1;
}

.register-field label {
    font-size: 24px;
}

.required-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border: 1px solid #ae4132;
    border-radius: 999px;
    background-color: #fad9d5;
    color: #ff6666;
    font-size: 16px;
    line-height: 1.2;
    vertical-align: middle;
}

.register-field input,
.register-field textarea {
    border: 1px solid #202020;
    border-radius: 8px;
    font-size: 24px;
    padding: 8px 12px;
}

.register-field input {
    height: 56px;
}

.register-field textarea {
    min-height: 110px;
    resize: vertical;
}

.register-field input::placeholder,
.register-field textarea::placeholder {
    color: #b3b3b3;
}

.register-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 8px;
}

.btn-cancel {
    background-color: #f5f5f5;
    border: 1px solid #666666;
    color: #333333;
    border-radius: 8px;
    padding: 10px 34px;
    font-size: 24px;
    font-weight: 400;
}

.register-error {
    margin: 0 16px;
    font-size: 18px;
}

/* scoreboard */
.score-shell {
    min-height: 620px;
}

.score-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 8px;
}

.score-title-row h1 {
    font-size: 52px;
    font-weight: 500;
}

.btn-back {
    background-color: #f5f5f5;
    border: 1px solid #666666;
    color: #333333;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 22px;
}

.competition-info-box {
    border: 1px solid #202020;
    border-radius: 14px;
    margin: 0 16px;
    padding: 8px 12px 12px;
}

.info-caption {
    font-size: 22px;
    margin: 4px 4px 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.info-card {
    border: 1px solid #666666;
    border-radius: 10px;
    background-color: #f5f5f5;
    padding: 10px;
    min-height: 74px;
}

.info-label {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.info-value {
    font-size: 30px;
    text-align: center;
}

.overview-card {
    border: 1px solid #666666;
    border-radius: 10px;
    background-color: #f5f5f5;
    margin-top: 10px;
    padding: 10px;
}

.overview-text {
    font-size: 22px;
    line-height: 1.5;
}

.scoreboard-table {
    margin: 12px 16px;
    width: calc(100% - 32px);
    border-collapse: collapse;
}

.scoreboard-table th,
.scoreboard-table td {
    border: 1px solid #202020;
    text-align: center;
    padding: 8px 6px;
    font-size: 24px;
}

.scoreboard-table th {
    background-color: #bac8d3;
    font-weight: 400;
}

.scoreboard-table th:nth-child(1),
.scoreboard-table td:nth-child(1) {
    width: 12%;
}

.scoreboard-table th:nth-child(2),
.scoreboard-table td:nth-child(2) {
    width: 20%;
}

.scoreboard-table th:nth-child(3),
.scoreboard-table td:nth-child(3) {
    width: 16%;
}

.scoreboard-table th:nth-child(4),
.scoreboard-table td:nth-child(4) {
    width: 24%;
}

.scoreboard-table th:nth-child(5),
.scoreboard-table td:nth-child(5) {
    width: 14%;
}

.scoreboard-table th:nth-child(6),
.scoreboard-table td:nth-child(6) {
    width: 14%;
}

.score-image-link {
    color: #1f3bc8;
    text-decoration: underline;
}

.btn-delete {
    background-color: #f5f5f5;
    border: 1px solid #666666;
    color: #333333;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 20px;
}

.score-register-row {
    display: flex;
    justify-content: flex-end;
    padding: 0 16px 14px;
}

/* score register */
.score-register-shell {
    min-height: 620px;
}

.score-register-title-row {
    padding: 16px 16px 8px;
}

.score-register-title-row h1 {
    font-size: 52px;
    font-weight: 500;
}

.score-register-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 26px;
    row-gap: 14px;
    padding: 8px 16px 20px;
}

.score-register-form .register-field.score-field {
    grid-column: 1 / 2;
}

.score-register-form .register-field input {
    font-size: 24px;
}

.file-drop-zone {
    border: 1px solid #202020;
    border-radius: 16px;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #b3b3b3;
    font-size: 26px;
    text-align: center;
    cursor: pointer;
    background: #ffffff;
}

.file-select-link {
    color: #3333ff;
}

.file-input-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.file-note {
    margin-top: 10px;
    color: #666666;
    font-size: 20px;
}

@media (max-width: 900px) {
    .competition-header {
        font-size: 28px;
    }

    .competition-title-row h1 {
        font-size: 36px;
    }

    .btn-register,
    .btn-search {
        font-size: 18px;
        padding: 8px 16px;
    }

    .field label {
        font-size: 18px;
    }

    .field input,
    .field select {
        font-size: 20px;
        height: 42px;
    }

    .competition-table th,
    .competition-table td {
        font-size: 16px;
    }

    .score-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .score-title-row h1 {
        font-size: 40px;
    }

    .btn-back {
        font-size: 16px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-label {
        font-size: 16px;
    }

    .info-value {
        font-size: 22px;
    }

    .overview-text {
        font-size: 16px;
    }

    .scoreboard-table th,
    .scoreboard-table td {
        font-size: 14px;
    }

    .btn-delete {
        font-size: 14px;
    }

    .score-register-row {
        justify-content: center;
    }

    .score-register-title-row h1 {
        font-size: 36px;
    }

    .score-register-form {
        grid-template-columns: 1fr;
    }

    .score-register-form .register-field.score-field {
        grid-column: 1 / -1;
    }

    .file-drop-zone {
        font-size: 18px;
        min-height: 100px;
    }

    .file-note {
        font-size: 14px;
    }

    .register-page .competition-title-row h1 {
        font-size: 40px;
    }

    .register-form {
        grid-template-columns: 1fr;
    }

    .register-field.half {
        grid-column: 1 / -1;
    }

    .register-field label {
        font-size: 18px;
    }

    .register-field input,
    .register-field textarea {
        font-size: 18px;
    }

    .btn-cancel,
    .register-page .btn-register {
        font-size: 18px;
        padding: 8px 16px;
    }
}

/* 初期化 終わり */

/* maintenance */
#maintenance .maintenance {
    font-size: 56px;
    font-weight: 700;
    text-align: center;
    line-height: 2;
    color: #504946;
    margin-bottom: 20px;
}

/* layout refresh */
.competition-page {
    min-height: 100vh;
    padding: 44px 28px;
    background:
        radial-gradient(circle at 8% 12%, rgba(27, 161, 226, 0.12), transparent 36%),
        radial-gradient(circle at 92% 6%, rgba(44, 204, 113, 0.08), transparent 32%),
        linear-gradient(180deg, #f7fbff 0%, #f2f8fc 100%);
}

.competition-shell {
    max-width: 1080px;
    border: 1px solid #bfd2df;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(23, 48, 74, 0.12);
    animation: shell-fade 0.35s ease;
}

.competition-header {
    border-bottom: 1px solid #d9e5ef;
    padding: 14px 22px;
    font-size: 34px;
    background: linear-gradient(90deg, #ffffff 0%, #f6fbff 100%);
}

.competition-title-row,
.score-title-row,
.score-register-title-row {
    padding: 20px 24px 12px;
}

.competition-title-row h1,
.register-page .competition-title-row h1,
.score-title-row h1,
.score-register-title-row h1 {
    font-size: 44px;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.btn-register,
.btn-search,
.btn-back,
.btn-cancel,
.btn-delete {
    transition: transform 0.16s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-register,
.btn-search {
    font-size: 19px;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 110, 175, 0.22);
}

.btn-register:hover,
.btn-search:hover,
.btn-back:hover,
.btn-cancel:hover,
.btn-delete:hover {
    transform: translateY(-1px);
}

.search-box,
.competition-info-box,
.overview-card,
.info-card {
    border-color: #c7d8e4;
    box-shadow: 0 4px 14px rgba(35, 68, 93, 0.06);
}

.search-box {
    margin: 0 24px;
    padding: 18px 18px 20px;
}

.field label,
.register-field label,
.info-label,
.info-caption {
    font-size: 18px;
}

.field input,
.field select,
.register-field input,
.register-field textarea {
    height: 48px;
    font-size: 18px;
}

.register-field textarea {
    min-height: 126px;
    line-height: 1.6;
}

.required-badge {
    font-size: 13px;
    padding: 2px 9px;
}

.competition-table,
.scoreboard-table {
    margin: 18px 24px;
    width: calc(100% - 48px);
}

.competition-table th,
.competition-table td,
.scoreboard-table th,
.scoreboard-table td {
    font-size: 18px;
    padding: 10px 8px;
}

.competition-table tbody tr:hover,
.scoreboard-table tbody tr:hover {
    background-color: #f4f9fd;
}

.info-value {
    font-size: 22px;
}

.overview-text {
    font-size: 18px;
}

.score-register-form,
.register-form {
    padding: 10px 24px 24px;
    row-gap: 16px;
}

.file-drop-zone {
    border-style: dashed;
    border-width: 2px;
    border-color: #bfd2df;
    background: linear-gradient(180deg, #fcfeff 0%, #f5faff 100%);
    min-height: 146px;
    font-size: 18px;
}

.file-note {
    font-size: 14px;
}

.score-register-row {
    padding: 0 24px 22px;
}

@keyframes shell-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .competition-page {
        padding: 18px 10px;
    }

    .competition-header {
        font-size: 25px;
        padding: 12px 14px;
    }

    .competition-title-row h1,
    .register-page .competition-title-row h1,
    .score-title-row h1,
    .score-register-title-row h1 {
        font-size: 30px;
    }

    .search-box,
    .competition-info-box {
        margin: 0 12px;
        padding: 14px 12px;
    }

    .competition-table,
    .scoreboard-table {
        margin: 14px 12px;
        width: calc(100% - 24px);
    }

    .btn-register,
    .btn-search,
    .btn-cancel,
    .btn-back,
    .btn-delete {
        font-size: 14px;
        padding: 8px 12px;
    }

    .field input,
    .field select,
    .register-field input,
    .register-field textarea {
        font-size: 16px;
    }
}
