.level-up-dialog { box-sizing: border-box; width: min(780px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #567075; border-radius: 18px; background: #141f29; color: #edf2f4; box-shadow: 0 30px 100px #0009; font-family: system-ui, sans-serif; overflow: hidden; }
.level-up-dialog[open] { display: flex; flex-direction: column; }
.level-up-dialog::backdrop { background: #050c14d9; backdrop-filter: blur(5px); }
.level-up-dialog [hidden] { display: none !important; }
.level-up-heading { display: flex; align-items: center; justify-content: flex-start; gap: 18px; padding: 24px 28px 20px; background: #1b3038; border-bottom: 1px solid #385259; }
.level-up-emblem { display: grid; place-items: center; flex: none; width: 56px; height: 66px; border: 1px solid #bd9c58; border-radius: 24px 24px 30px 30px; color: #e7c276; font-size: 32px; background: #263c40; }
.level-up-kicker { margin: 0 0 5px; color: #e7c276; font-size: 11px; text-transform: uppercase; font-weight: 750; }
.level-up-heading h2 { margin: 0; font: 600 27px/1.2 Georgia, serif; }
.level-up-hero { margin: 7px 0 0; color: #bdced0; font-size: 13px; overflow-wrap: anywhere; }
.level-up-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 16px 28px; list-style: none; border-bottom: 1px solid #30414b; }
.level-up-steps li { display: flex; align-items: center; gap: 7px; color: #93a7b2; font-size: 12px; }
.level-up-steps li > span:first-child { display: grid; place-items: center; flex: none; width: 25px; height: 25px; border: 1px solid #4b5b65; border-radius: 50%; }
.level-up-steps [data-state="current"] { color: #f0d298; font-weight: 700; }
.level-up-steps [data-state="current"] > span:first-child { border-color: #d4b26d; background: #443d2b; }
.level-up-steps [data-state="done"] { color: #91d8c5; }
.level-up-content { min-height: 0; overflow: auto; padding: 22px 28px 28px; overscroll-behavior: contain; }
.level-up-content h3 { margin: 0 0 12px; color: #f2e7cd; font: 600 24px/1.25 Georgia, serif; }
.level-up-content h4 { margin: 22px 0 9px; color: #e9cf96; font-size: 15px; }
.level-up-help { margin: 9px 0 15px; color: #bbcbd3; font-size: 14px; line-height: 1.65; }
.level-up-features { display: grid; gap: 0; margin: 18px 0; }
.level-up-feature { padding: 4px 0 4px 16px; border-left: 2px solid #64bca8; }
.level-up-feature + .level-up-feature { margin-top: 14px; }
.level-up-feature h4 { margin-top: 6px; color: #a4e2cf; }
.level-up-feature p { margin-bottom: 6px; }
.level-up-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.level-up-option { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #465865; border-radius: 10px; padding: 16px; cursor: pointer; }
.level-up-option:has(:checked) { border-color: #7cc6b2; background: #213c3c; }
.level-up-option input { margin: 4px 0 0; accent-color: #9adac5; }
.level-up-option strong, .level-up-option small { display: block; }
.level-up-option strong { margin-bottom: 7px; font-size: 14px; }
.level-up-option small, .level-up-field small { color: #b7c8cf; font-size: 12px; line-height: 1.6; }
.level-up-field { display: flex; flex-direction: column; gap: 8px; margin: 15px 0; font-size: 14px; font-weight: 600; }
.level-up-field .sheet-input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #526470; border-radius: 7px; box-sizing: border-box; color: #edf2f4; background: #101b25; font: 400 15px/1.4 system-ui, sans-serif; }
.level-up-field textarea { resize: vertical; }
.level-up-field small { font-weight: 400; }
.level-up-check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 12px; font-size: 14px; cursor: pointer; }
.level-up-check input { width: 18px; height: 18px; accent-color: #88cdb8; }
.level-up-abilities { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.level-up-changes { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14px; text-align: left; }
.level-up-changes caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.level-up-changes thead { color: #a4b7c2; font-size: 11px; text-transform: uppercase; }
.level-up-changes :is(th,td) { padding: 12px 8px; border-bottom: 1px solid #34454f; }
.level-up-changes tbody th { font-weight: 500; }
.level-up-changes td { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.level-up-changes td:last-child { color: #a1e3cd; font-weight: 750; }
.level-up-changes small { display: block; margin-top: 5px; max-width: 360px; color: #aabcc7; font-size: 12px; font-weight: 400; line-height: 1.5; }
.level-up-note, .level-up-warning, .level-up-magic { padding: 12px 14px; border-left: 2px solid #bfa469; background: #bfa4690d; color: #e0d1ac; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.level-up-magic { border-color: #7ab8cb; background: #7ab8cb0b; color: #c2dce5; }
.level-up-warning { border-color: #e99a86; color: #ffbbaa; }
.level-up-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px; border-top: 1px solid #3a4e58; background: #182631; }
.level-up-footer > div { display: flex; gap: 10px; }
.level-up-dialog :is(button,input,textarea,select):focus-visible { outline: 2px solid #edd39d; outline-offset: 3px; }
.level-up-dialog button { min-height: 44px; border-radius: 7px; font-size: 13px; cursor: pointer; }
.level-up-dialog button:hover:not(:disabled) { filter: brightness(1.14); }
.level-up-dialog button:active:not(:disabled) { transform: translateY(1px); }
.level-up-dialog button:disabled { opacity: .45; cursor: default; }
.level-up-dialog .primary { color: #17242b; background: #e5c17d; border-color: #e5c17d; }
.level-up-message { flex: none; padding: 12px 28px; margin: 0; color: #ffc4b4; background: #412d2b; font-size: 13px; line-height: 1.5; }
.level-up-spell { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #34454f; }
.level-up-spell > span { min-width: 0; }
.level-up-spell strong, .level-up-spell small { display: block; font-size: 13px; }
.level-up-spell small { margin-top: 5px; color: #b2c7d1; font-size: 12px; }
.level-up-spell button { flex: none; }
.sheet-level-up { color: #f0d49f; border-color: #8d7a52; min-height: 36px; }
.sheet-milestone { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-milestone > span { color: #b7cacb; font-size: 12px; }
@media (min-width: 700px) { .sheet-milestone { grid-column: 1 / -1; width: 100%; padding-top: 10px; border-top: 1px solid #39514f; } }
@media (max-width: 699px) {
  .level-up-dialog { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); border-radius: 12px; }
  .level-up-heading { padding: 17px 16px; gap: 12px; }
  .level-up-emblem { width: 38px; height: 48px; font-size: 25px; }
  .level-up-heading h2 { font-size: 23px; }
  .level-up-kicker { font-size: 9px; }
  .level-up-steps { gap: 3px; padding: 12px; }
  .level-up-steps li { flex-direction: column; gap: 5px; font-size: 10px; text-align: center; }
  .level-up-content { padding: 18px 16px 22px; }
  .level-up-content h3 { font-size: 22px; }
  .level-up-options, .level-up-abilities { grid-template-columns: 1fr; gap: 9px; }
  .level-up-abilities .level-up-field { margin: 7px 0; }
  .level-up-option { padding: 12px; }
  .level-up-footer { padding: 12px; gap: 8px; }
  .level-up-footer > div { gap: 5px; }
  .level-up-footer button { padding: 8px 9px; font-size: 12px; }
  .level-up-changes { font-size: 12px; }
  .level-up-changes :is(th,td) { padding-inline: 4px; }
  .level-up-changes th { width: 64%; }
  .level-up-message { padding: 10px 16px; }
  .sheet-milestone { margin: 5px 0 8px; }
  .sheet-level-up { min-height: 44px; font-size: 12px; padding: 7px 11px; }
  .sheet-milestone > span { font-size: 11px; }
}
