dialog:has(.cashout-skill) {
  width: min(650px,calc(100vw - 20px)); max-width: none; max-height: calc(100svh - 16px);
  border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: auto; isolation: isolate;
}
dialog:has(.cashout-skill)::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border: 55px solid transparent; border-image: url('/assets/atlas-profile-dialog-frame-v1.webp') 128 fill / 1 / 0 stretch;
}
dialog:has(.cashout-skill)::backdrop { background: #080015c9; backdrop-filter: blur(5px); }
dialog:has(.cashout-skill):focus { outline: none; }
dialog:has(.cashout-skill) .modal-content { padding: clamp(25px,4svh,40px); text-align: center; }
dialog:has(.cashout-skill) .eyebrow { color: #e8c784; font-size: 10px; margin-bottom: 5px; }
dialog:has(.cashout-skill) h2 { color: #ffe3a0; font: 700 clamp(21px,5svh,34px)/1 Georgia,serif; text-transform: uppercase; text-shadow: 0 3px 4px #250911; margin: 0 0 12px; }
.skill-content { display: grid; justify-items: center; gap: clamp(8px,2svh,18px); }
.skill-target { color: #f3d38a; margin: 0 0 10px; font-weight: 700; }
.skill-instruction { margin: 0; color: #f6e1b9; font-weight: 700; }
.skill-track { position: relative; width: min(90%,500px); height: 32px; border: 3px solid #e6b354; border-radius: 20px; box-shadow: 0 3px 12px #0009,inset 0 2px 4px #ffffff55; background: linear-gradient(90deg,#c51d2b 0 12.5%,#f6c428 12.5% 25%,#2ce44e 25% 75%,#f6c428 75% 87.5%,#c51d2b 87.5%); }
.skill-track.skill-track-hard { background: linear-gradient(90deg,#c51d2b 0 44%,#2ce44e 44% 56%,#c51d2b 56%); }
.skill-choice { display:flex; justify-content:center; gap:1rem; }
.skill-return { margin-top: 10px; padding: .55rem 1rem; border: 1px solid #a46d36; border-radius: 9px; color: #f4dfbd; background: #2b1237; cursor: pointer; }
.skill-marker { position: absolute; top: 50%; width: 30px; height: 30px; transform: translate(-50%,-50%); border-radius: 50%; border: 3px solid #a76822; background: radial-gradient(circle at 35% 25%,#fff8cb,#ffd66e 40%,#a85112); box-shadow: 0 3px 8px #000a; }
.skill-board { display: grid; gap: 7px; width: min(100%,450px); }
.skill-sequence { grid-template-columns: repeat(5,minmax(0,1fr)); }
.skill-follow { grid-template-columns: repeat(5,minmax(0,1fr)); width: min(55svh,300px); }
.skill-cell { min-height: 0; aspect-ratio: 1; border-radius: 16%; border: 3px solid #bd8d49; box-shadow: inset 0 2px 8px #fff4,inset 0 -4px 10px #0009,0 4px 6px #0007; background: #7935a2; opacity: 1; padding: 0; }
.skill-sequence .skill-cell[data-color="0"] { background: #d63160; }
.skill-sequence .skill-cell[data-color="1"] { background: #ec9f18; }
.skill-sequence .skill-cell[data-color="2"] { background: #26a75b; }
.skill-sequence .skill-cell[data-color="3"] { background: #267ccc; }
.skill-sequence .skill-cell[data-color="4"] { background: #aa43ca; }
.skill-cell:disabled { opacity: .65; cursor: default; }
.skill-cell.lit { opacity: 1; filter: brightness(2); box-shadow: 0 0 24px #ffe59c,inset 0 0 18px #fff; transform: scale(1.05); }
.skill-cell:enabled:active { filter: brightness(1.5); transform: scale(.95); }
.skill-primary,.skill-retry { min-height: 44px; padding: .55rem 2rem; color: #ffe7a3; border: 2px solid #e8bb65; border-radius: 12px; background: linear-gradient(#8e35ab,#3c0d51); box-shadow: inset 0 2px #ffe08b80,0 4px 8px #0008; }
.skill-primary:hover,.skill-retry:hover { filter: brightness(1.2); }
.skill-result strong { font: 700 clamp(22px,5svh,36px) Georgia,serif; color: #ffe3a0; text-shadow: 0 3px 6px #6a2d18; }
.skill-result p { color: #e9d6e7; }
.skill-error { color: #ffb8b8; margin: 8px 0 0; }
.skill-error:empty { display: none; }
@media (max-height: 450px) { dialog:has(.cashout-skill) .modal-content { padding: 20px 30px; } .skill-follow { width: min(55svh,220px); } .skill-board { gap: 4px; } }
