:root {
    --board-size: min(400px, calc(100vw - 24px));
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    background: #f5f7f8;
    font-family: Arial, sans-serif;
}

.container {
    width: var(--board-size);
    box-sizing: border-box;
    margin: 20px auto;
    background: #fff;
    padding: 28px;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.lang-switch {
    text-align: right;
    margin-bottom: 10px;
}

.lang-switch a {
    margin-left: 6px;
    text-decoration: none;
    font-weight: bold;
    color: #1565c0;
}

.header {
    text-align: center;
    margin-bottom: 24px;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.logo {
    width: 56px;
}

.brand {
    font-size: 28px;
    font-weight: bold;
}

h1 {
    margin: 14px 0 20px;
    text-align: center;
    color: #2e7d32;
    font-size: 22px;
}

h2,
h3 {
    text-align: center;
    color: #2e7d32;
}

.balance {
    text-align: center;
    font-size: 20px;
    margin-bottom: 22px;
}

.notice {
    margin-top: 16px;
    color: #2e7d32;
    text-align: center;
    font-weight: bold;
}

.message {
    padding: 12px;
    margin: 16px 0;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
}

.error {
    margin-top: 16px;
    color: #b71c1c;
    text-align: center;
    font-weight: bold;
}

.info {
    margin-top: 18px;
    color: #555;
    line-height: 1.5;
    text-align: center;
}

.empty {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

label {
    display: block;
    margin-top: 14px;
    font-weight: bold;
}

input,
select {
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 11px;
    border: 1px solid #ccd4d8;
    border-radius: 6px;
}

button,
a.button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 18px;
    padding: 12px;
    background: #1565c0;
    color: #fff;
    border: 0;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

button:hover,
a.button:hover {
    background: #0d47a1;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.back {
    display: block;
    text-align: center;
    margin-top: 24px;
    font-weight: bold;
    color: #1565c0;
    text-decoration: underline;
}

.logout {
    display: block;
    width: fit-content;
    margin: 20px auto 0;
    color: #b71c1c;
    font-weight: bold;
    text-decoration: underline;
    text-align: center;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-weight: normal;
}

.remember-row input {
    width: auto;
    margin: 0;
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
    align-items: stretch;
}

.option-card {
    margin-top: 0;
    border: 2px solid #dce3e7;
    border-radius: 8px;
    padding: 16px;
    min-height: 58px;
    box-sizing: border-box;
    cursor: pointer;
    font-weight: bold;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.option-card input {
    display: none;
}

.option-card:has(input:checked) {
    border-color: #2e7d32;
    background: #e8f5e9;
}

.option-card.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.arena-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: 12px;
    padding: 12px;
    background: #2e7d32;
    color: #fff;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
}

.arena-button:hover {
    background: #1b5e20;
}

.address-list {
    margin-top: 28px;
}

.address-card {
    border: 1px solid #dce3e7;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    background: #fafafa;
}

.address {
    font-family: monospace;
    word-break: break-all;
    font-weight: bold;
}

.label {
    margin-top: 6px;
    color: #555;
}

.card-footer {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.delete-btn {
    background: #b71c1c;
}

.delete-btn:hover {
    background: #7f0000;
}

/* Arena */
.challengeBox {
    margin-top: 24px;
}

.challengeItem {
    border: 1px solid #dce3e7;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    background: #fafafa;
}

.challengeItem div {
    margin-bottom: 8px;
}

.challengeEmpty {
    text-align: center;
    color: #666;
    margin-top: 16px;
}

.mineLabel {
    margin-top: 12px;
    text-align: center;
    font-weight: bold;
    color: #2e7d32;
}

.acceptBtn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 12px;
    padding: 12px;
    background: #1565c0;
    color: #fff;
    border: 0;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.acceptBtn:hover {
    background: #0d47a1;
}

.legal-badge-link {
    display: block;
    width: 220px;
    max-width: 100%;
    margin: 28px auto 0;
    text-decoration: none;
}

.legal-badge {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 430px) {
    .container {
        margin: 10px auto;
        padding: 18px;
    }

    .brand {
        font-size: 22px;
    }

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

    .legal-badge-link {
        width: 190px;
    }
}