main { max-width: 640px; min-height: auto; }
h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
#search-heading p { line-height: 1.7; }
main.result-only { padding: 0; border: 0; border-radius: 0; background: transparent; }
main.result-only #result { margin-top: 0; }
#result-message:empty { display: none; }
form { display: grid; gap: 22px; margin-top: 30px; }
.field { display: grid; gap: 9px; }
label { font-weight: 700; }
input, button { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
input { background: white; color: var(--ink); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #568c7d; outline-offset: 3px; }
small { color: var(--muted); }
button { background: var(--forest); color: white; font-weight: 700; cursor: pointer; }
#result { margin-top: 32px; border: 1px solid #cddbd3; border-radius: 18px; overflow: hidden; background: white; box-shadow: 0 12px 32px #173f350a; }
.result-heading { padding: 26px; background: var(--forest); color: white; }
.section-caption { font-size: .68rem; letter-spacing: .16em; font-weight: 700; color: #b9d4c8; }
.result-heading h2 { margin: 10px 0 0; font-size: 1.4rem; }
.result-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.result-title-row h2 { margin: 0; }
#save-player { flex-shrink: 0; width: auto; min-height: 40px; padding: 9px 12px; border-color: #b9d4c8; background: transparent; font-size: .8rem; }
#save-player:hover { background: #ffffff18; }
#save-player:disabled { opacity: .6; cursor: wait; }
#save-status:empty { display: none; }
#result .result-heading p { margin: 10px 0 0; color: #d7e5de; font-size: .9rem; line-height: 1.7; white-space: pre-line; }
#player-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 26px; }
#player-details dt { color: var(--muted); font-size: .8rem; font-weight: 600; }
#player-details dd { margin: 10px 0 0; overflow-wrap: anywhere; }
.player-identity { grid-column: 1 / -1; padding-bottom: 24px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
.player-identity dd { line-height: 1.6; }
#player-details.has-team .player-identity { grid-column: auto; }
.player-team { min-width: 0; padding-bottom: 24px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
#player-team { font-size: 1.25rem; font-weight: 700; line-height: 1.6; color: var(--forest); }
#player-name { font-size: 1.5rem; font-weight: 800; }
#player-english-name { color: var(--muted); font-size: .95rem; }
.player-stat { padding: 20px; border-radius: 12px; background: #f1f6f2; }
.player-stat dd { color: var(--forest); font-size: clamp(1.65rem, 6vw, 2.2rem); font-weight: 800; }
.group-unit { margin-left: 5px; font-size: .95rem; font-weight: 500; }
.result-footer { padding: 18px 26px; border-top: 1px solid #e7ece8; }
.result-footer a { display: flex; justify-content: space-between; align-items: center; min-height: 28px; color: var(--forest); font-size: .9rem; font-weight: 700; text-decoration: none; }
.result-footer a:hover { text-decoration: underline; }
@media (max-width: 480px) {
    .result-heading, #player-details { padding: 20px; }
    .player-stat { padding: 16px; }
    .result-footer { padding: 16px 20px; }
}
[hidden] { display: none !important; }
