:root { color-scheme: dark; font-family: "Baloo 2", system-ui, sans-serif; --gold: #f7c848; --navy: #080d21; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--navy); }
button, input { font: inherit; -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.author-screen { position: relative; isolation: isolate; min-height: 100svh; max-width: 560px; margin: 0 auto; overflow-x: hidden; overflow-y: auto; background: #0d1733; box-shadow: 0 0 80px #000; }
.author-screen__art { position: absolute; z-index: -2; inset: 0; background: url("https://revoseo1.ams3.digitaloceanspaces.com/fallamania/assets/fallamania-welcome.png") center / cover; filter: saturate(.65) brightness(.42); transform: scale(1.03); }
.author-screen::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(rgba(4,7,22,.25), rgba(4,7,22,.7)); }

.author-header { height: clamp(90px, 15svh, 140px); padding-top: max(16px, env(safe-area-inset-top)); text-align: center; }
.author-header img { width: min(62%, 300px); height: auto; filter: drop-shadow(0 6px 5px #000); }

.author-panel { width: calc(100% - 28px); margin: 0 auto max(14px, env(safe-area-inset-bottom)); border-radius: 20px; background: #0c1327; box-shadow: 0 16px 45px rgba(0,0,0,.65); }
.author-panel__banner { position: relative; margin: 0 -7px; padding: 14px 55px 12px; border: 3px solid #7e2418; border-radius: 9px; background: linear-gradient(#f25731 0 16%, #cf3026 17% 82%, #921914 83%); box-shadow: inset 0 2px 0 rgba(255,224,145,.4), 0 5px 0 rgba(0,0,0,.4); text-align: center; }
.author-panel__banner h1 { margin: 0; color: #fff1b8; font: 800 clamp(1.5rem, 6.7vw, 2.1rem)/1 "Baloo 2", sans-serif; letter-spacing: .02em; text-shadow: 0 3px 0 #3a0e09; }
.author-panel__body { padding: clamp(18px, 4vw, 28px); }
.author-panel__intro { margin: 0 0 15px; color: white; font-size: clamp(1rem, 4vw, 1.2rem); font-weight: 800; text-align: center; }

.specialty-field { margin-bottom: 15px; }
.specialty-field > label { display: block; margin: 0 0 6px; color: #cbd4e8; font-size: .76rem; font-weight: 800; letter-spacing: .09em; }
.specialty-select { position: relative; }
.specialty-select::after { content: "▾"; position: absolute; top: 50%; right: 15px; color: #4a5872; font-size: 1.3rem; transform: translateY(-54%); pointer-events: none; }
.specialty-select select { width: 100%; min-height: 48px; padding: 8px 45px 8px 14px; border: 3px solid #aab3c4; border-radius: 12px; color: #11182a; background: white; font-family: "Baloo 2", system-ui, sans-serif; font-size: 1rem; font-weight: 800; line-height: 1.2; appearance: none; outline: none; }
.specialty-select option { font-family: "Baloo 2", system-ui, sans-serif; font-weight: 700; }
.specialty-select select:focus { border-color: #35b9ff; box-shadow: 0 0 0 3px rgba(53,185,255,.25); }

.author-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 3vw, 18px); width: 100%; margin: 0; padding: 0; border: 0; }
.author-choice { position: relative; width: 100%; min-width: 0; }
.author-card { position: relative; display: block; width: 100%; min-width: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.author-card input { position: absolute; opacity: 0; pointer-events: none; }
.author-card__portrait { position: relative; display: block; width: 100%; height: clamp(145px, 40vw, 180px); max-height: 180px; padding-block: 8px; overflow: hidden; border: 4px solid #778096; border-radius: 16px; background-image: linear-gradient(180deg, rgba(11,24,59,.12), rgba(8,13,33,.28)), url("https://revoseo1.ams3.digitaloceanspaces.com/fallamania/assets/fallamania-welcome.png"); background-size: auto, 190%; background-position: center, 42% 18%; box-shadow: inset 0 0 28px rgba(0,0,0,.62), 0 5px 0 #040713; filter: grayscale(1) brightness(.62); transition: border-color .15s ease, filter .2s ease, transform .15s ease; }
.author-card:nth-of-type(2) .author-card__portrait { background-position: center, 58% 18%; }
.author-card__portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.18), transparent 35%, rgba(7,13,33,.2)); pointer-events: none; }
.author-card img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 7px 5px #000); }
.author-card__label { position: absolute; z-index: 2; top: 9px; left: 50%; display: block; min-width: 66px; padding: 4px 10px 3px; border: 2px solid rgba(255,255,255,.34); border-radius: 999px; color: #e4e9f3; background: rgba(7,13,33,.78); box-shadow: 0 3px 7px rgba(0,0,0,.5); font: 800 clamp(.72rem, 3.2vw, .9rem)/1 "Baloo 2", sans-serif; letter-spacing: .025em; text-align: center; transform: translateX(-50%); pointer-events: none; }
.author-card input:checked + .author-card__portrait { border-color: #35b9ff; box-shadow: inset 0 0 25px #000, 0 0 16px #198dd7, 0 5px 0 #073351; filter: none; transform: translateY(-2px); }
.author-card input:checked ~ .author-card__label { border-color: #8fe0ff; color: white; background: #147eae; box-shadow: 0 0 11px rgba(53,185,255,.8); }
.author-card input:focus-visible + .author-card__portrait { outline: 4px solid white; outline-offset: 3px; }
.random-avatar { position: absolute; z-index: 3; right: 8px; bottom: 8px; min-height: 30px; padding: 3px 9px; border: 2px solid rgba(255,255,255,.48); border-radius: 999px; color: white; background: rgba(12,24,53,.88); box-shadow: 0 3px 5px rgba(0,0,0,.55); font-size: clamp(.66rem, 2.8vw, .8rem); font-weight: 800; cursor: pointer; touch-action: manipulation; user-select: none; }
.random-avatar:active { transform: translateY(2px); }
.random-avatar:focus-visible { outline: 3px solid #35b9ff; outline-offset: 2px; }

.author-form { margin-top: 20px; }
.author-form label { display: block; color: white; font: 800 clamp(1.05rem, 4.5vw, 1.3rem)/1.1 "Baloo 2", sans-serif; }
.author-form__help { margin: 4px 0 10px; color: #aab2c6; font-size: .8rem; }
.author-form input { width: 100%; min-height: 58px; padding: 10px 15px; border: 3px solid #b6bdca; border-radius: 13px; color: #101629; background: white; box-shadow: inset 0 3px 5px rgba(0,0,0,.16); font-size: 1.15rem; font-weight: 800; outline: none; }
.author-form input:focus { border-color: #35b9ff; box-shadow: 0 0 0 3px rgba(53,185,255,.25); }
.author-form input::placeholder { color: #9298a5; text-transform: uppercase; }
.author-form__error { min-height: 20px; margin: 6px 2px; color: #ff8585; font-size: .78rem; font-weight: 700; }

.confirm-button { width: 100%; min-height: 64px; padding: 10px 12px; border: 4px solid #f3bfff; border-radius: 15px; color: white; background: linear-gradient(#df52f5, #a416cf); box-shadow: inset 0 4px 0 rgba(255,255,255,.25), inset 0 -7px 0 rgba(0,0,0,.18), 0 6px 0 #370852; font: 800 clamp(1.3rem, 5.8vw, 1.8rem)/1 "Baloo 2", sans-serif; text-shadow: 0 3px 0 rgba(0,0,0,.55); cursor: pointer; touch-action: manipulation; user-select: none; }
.confirm-button:active { transform: translateY(5px); box-shadow: inset 0 3px 0 rgba(255,255,255,.2), inset 0 -4px 0 rgba(0,0,0,.14), 0 1px 0 #370852; }

.created-dialog { width: min(86vw, 370px); padding: 28px 24px; border: 3px solid var(--gold); border-radius: 22px; color: #11182a; background: #fffdf7; text-align: center; box-shadow: 0 20px 70px #000; }
.created-dialog::backdrop { background: rgba(2,5,18,.82); backdrop-filter: blur(5px); }
.created-dialog h2 { margin: 0; font: 800 2rem/1 "Baloo 2", sans-serif; }
.created-dialog p { margin: 12px 0 20px; }
.created-dialog button { width: 100%; min-height: 52px; border: 0; border-radius: 11px; color: white; background: #1d75ad; font-weight: 800; cursor: pointer; }

@media (max-width: 340px) {
  .author-panel { width: calc(100% - 18px); }
  .author-panel__body { padding: 15px; }
  .author-options { gap: 9px; }
  .random-avatar { right: 5px; bottom: 5px; padding-inline: 7px; }
  .author-card__portrait { border-width: 3px; border-radius: 12px; }
  .confirm-button { min-height: 58px; font-size: 1.35rem; }
}

@media (max-height: 720px) {
  .author-header { height: 82px; padding-top: max(9px, env(safe-area-inset-top)); }
  .author-header img { width: min(48%, 235px); }
  .author-panel__body { padding-block: 14px; }
  .author-panel__intro { margin-bottom: 9px; }
  .specialty-field { margin-bottom: 10px; }
  .specialty-select select { min-height: 42px; }
  .author-form { margin-top: 14px; }
  .author-form input { min-height: 50px; }
  .author-form__error { margin-block: 3px; }
  .confirm-button { min-height: 56px; }
}
