.ar-modal .sc-panel { box-sizing: border-box; width: min(98vw, calc(1240px*var(--m))); height: min(96vh, calc(700px*var(--m))); max-height: 96vh; overflow: hidden; gap: 6px; display: flex; flex-direction: column; font-family: var(--font); }
.ar-modal .sc-head { flex: none; flex-wrap: nowrap; }
.ar-tabs, .ar-subtabs { flex: none; display: flex; gap: 8px; justify-content: center; }
.ar-tab { min-width: calc(140px*var(--m)); min-height: 44px; font-size: calc(19px*var(--m)); }
.ar-body { flex: 1 1 0; min-height: 0; align-self: stretch; width: 100%; min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; padding: 0 8px 8px; }
.ar-fchip { flex: none; min-height: 44px; min-width: 44px; padding: 0 12px; font-size: max(14px, calc(15px*var(--m))); }
.ar-fchip .sc-blabel, .ar-tab .sc-blabel { white-space: nowrap; }
.ar-gear, .ar-looks { flex: 1 1 0; min-height: 0; display: flex; gap: 12px; }
.ar-doll { flex: none; display: grid; grid-template-columns: auto auto auto; gap: 10px; align-items: center; align-content: center; }
.ar-slotcol { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.ar-slot { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: calc(92px*var(--m)); min-width: 48px; min-height: 48px; height: calc(102px*var(--m)); padding: 2px; border-radius: 12px; border: 3px solid var(--gold-dark, #8a5a1a); background: radial-gradient(circle, rgba(255,220,140,.15), rgba(20,4,2,.8)); box-shadow: 0 0 0 2px #2a0805, inset 0 0 8px rgba(0,0,0,.6); transition: transform .12s, filter .12s; }
.ar-slot.full { border-color: var(--qc); box-shadow: 0 0 0 2px #2a0805, 0 0 12px var(--qc); }
.ar-slot.sel { outline: 3px solid var(--gold-hi); outline-offset: 1px; }
.ar-slot:hover, .ar-slot:focus-visible { filter: brightness(1.2); transform: scale(1.06); }
.ar-slot:active, .ar-card:active, .ar-act:active { transform: scale(.94); }
.ar-sicon { width: 80%; height: calc(62px*var(--m)); min-height: 28px; object-fit: contain; }
.ar-sicon.dim { opacity: .4; filter: grayscale(.6); }
.ar-sname { font-size: max(14px, calc(15px*var(--m))); color: var(--cream); text-shadow: var(--outline); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ar-stag { position: absolute; right: -2px; top: -2px; width: 16px; height: 16px; border-radius: 0 8px 0 10px; border: 1px solid #2a0805; }
.ar-mid { display: flex; justify-content: center; }
/* stage */
.ar-stage { position: relative; width: min(calc(400px*var(--m)), 54vh); height: min(calc(400px*var(--m)), 54vh); border-radius: 50%; overflow: hidden; background: radial-gradient(circle, #6a1a12 0%, #2a0805 70%, #120302 100%); border: 4px solid var(--gold); box-shadow: 0 0 0 2px #2a0805, 0 0 22px rgba(255,190,70,.4), inset 0 0 28px rgba(0,0,0,.7); }
.ar-stage.small { width: calc(300px*var(--m)); height: calc(300px*var(--m)); }
.ar-looks .ar-stage { width: calc(380px*var(--m)); height: calc(380px*var(--m)); }
.ar-looks .ar-stage.small { width: calc(380px*var(--m)); height: calc(380px*var(--m)); }
.ar-stage img { position: absolute; object-fit: contain; pointer-events: none; }
.ar-stage .ar-3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.ar-ring { position: absolute; inset: 8%; border-radius: 50%; border: 2px dashed rgba(255,220,140,.3); }
.ar-lord { left: 15%; top: 8%; width: 70%; height: 84%; animation: ar-bob 2.4s ease-in-out infinite; }
.ar-back { left: 2%; top: 0; width: 96%; height: 88%; opacity: .95; }
.ar-artifact { right: 4%; top: 22%; width: 28%; height: 28%; animation: ar-float 1.8s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255,220,120,.8)); }
.ar-aura { left: 10%; bottom: 2%; width: 80%; height: 34%; opacity: .85; mix-blend-mode: screen; animation: ar-pulse 3s ease-in-out infinite; }
.ar-skinbig { left: 12%; top: 12%; width: 76%; height: 76%; border-radius: 12px; }
.ar-terbig { position: absolute; left: 8%; top: 8%; width: 84%; height: 84%; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 3px var(--gold-hi), 0 4px 14px rgba(0,0,0,.5); }
.ar-terpic img { object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 2px var(--gold-dark); }
.ar-brick { position: relative; width: 100%; height: 100%; min-height: 44px; background: linear-gradient(180deg, #d23a26 0%, #b0241a 55%, #7e160f 100%); border-radius: 6px; box-sizing: border-box; border: 3px solid #f2b83a; box-shadow: inset 0 0 0 2px #7a4a08, 0 2px 0 #2a0805; overflow: hidden; }
.ar-brick-cap { position: absolute; left: -2px; right: -2px; top: 0; height: 22%; background: repeating-linear-gradient(90deg, #f2b83a 0 18%, #b0241a 18% 25%); border-bottom: 2px solid #7a4a08; }
.ar-brick-gate { position: absolute; left: 34%; width: 32%; bottom: 0; height: 46%; border-radius: 50% 50% 0 0 / 40% 40% 0 0; background: #3a0c06; border: 3px solid #f2b83a; border-bottom: 0; }
.ar-brick.big { position: absolute; left: 14%; top: 20%; width: 72%; height: 60%; }
@keyframes ar-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3%); } }
@keyframes ar-float { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8%) rotate(4deg); } }
@keyframes ar-pulse { 0%,100% { opacity: .6; transform: scale(.96); } 50% { opacity: .9; transform: scale(1.04); } }
/* info */
.ar-info { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; touch-action: pan-y; overscroll-behavior: contain; }
.ar-info::-webkit-scrollbar, .ar-lside::-webkit-scrollbar, .ar-filters::-webkit-scrollbar { display: none; }
.ar-info > * { flex: none; }
.ar-sec { padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,220,140,.25); display: flex; flex-direction: column; gap: 6px; }
.ar-h { font-size: max(15px, calc(18px*var(--m))); color: var(--gold-hi); }
.ar-chips, .ar-ctags { display: flex; flex-wrap: wrap; gap: 5px 7px; }
.ar-filters { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; }
.ar-chip { font-size: max(15px, calc(16px*var(--m))); padding: 2px 12px; border-radius: 14px; background: rgba(0,0,0,.5); border: 1px solid var(--gold); color: var(--gold-hi); text-shadow: var(--outline); }
.ar-nobonus { font-size: max(12px, calc(13px*var(--m))); color: #e9d3a8; opacity: .6; }
.ar-set { --sc: #ffd76a; padding: 4px 8px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--sc) 50%, transparent); background: rgba(0,0,0,.25); opacity: .85; }
.ar-set.done { opacity: 1; box-shadow: 0 0 12px var(--sc); animation: ar-pulse2 2s ease-in-out infinite; }
@keyframes ar-pulse2 { 50% { box-shadow: 0 0 20px var(--sc); } }
.ar-settop { display: flex; align-items: center; gap: 6px; font-size: max(14px, calc(15px*var(--m))); color: var(--cream); text-shadow: var(--outline); }
.ar-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sc); border: 1px solid #2a0805; flex: none; }
.ar-setname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; color: var(--sc); }
.ar-setn { font-weight: 900; }
.ar-bar { height: 6px; border-radius: 3px; background: rgba(0,0,0,.6); margin: 3px 0; overflow: hidden; }
.ar-bar i { display: block; height: 100%; background: var(--sc); }
.ar-setdesc { font-size: max(12px, calc(13px*var(--m))); color: #e9d3a8; line-height: 1.25; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.ar-set:not(.done) .ar-setdesc { opacity: .7; }
.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(220px*var(--m)), 1fr)); gap: 5px; }
.ar-card { position: relative; display: flex; gap: 10px; align-items: center; text-align: left; min-height: 64px; padding: 8px; border-radius: 10px; border: 2px solid var(--qc); background: rgba(0,0,0,.3); color: var(--cream); font-family: var(--font); transition: transform .12s, filter .12s; }
.ar-card:hover, .ar-card:focus-visible { filter: brightness(1.2); transform: scale(1.02); }
.ar-card.worn { box-shadow: 0 0 10px var(--qc), inset 0 0 8px rgba(255,220,140,.25); }
.ar-cicon { width: calc(56px*var(--m)); min-width: 44px; height: calc(56px*var(--m)); min-height: 44px; object-fit: contain; flex: none; }
.ar-ctx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ar-cname { font-size: max(15px, calc(16px*var(--m))); text-shadow: var(--outline); line-height: 1.2; overflow-wrap: anywhere; }
.ar-q, .ar-settag { font-style: normal; font-size: 12px; font-weight: 900; padding: 0 7px; border-radius: 8px; background: rgba(0,0,0,.55); border: 1px solid var(--cream); color: var(--cream); white-space: nowrap; }
.ar-settag { --sc: #ffd76a; border-color: var(--sc); color: var(--sc); }
.ar-cdesc { font-size: max(13px, calc(14px*var(--m))); color: #e9d3a8; line-height: 1.25; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.ar-wornb { position: absolute; right: 4px; top: 4px; font-style: normal; font-size: 12px; font-weight: 900; padding: 0 7px; border-radius: 8px; background: linear-gradient(var(--gold-hi), var(--gold-dark, #a86a10)); color: #3a1204; }
.ar-empty { grid-column: 1 / -1; text-align: center; padding: 14px 6px; font-size: max(14px, calc(15px*var(--m))); color: #e9d3a8; }
/* looks */
.ar-prev { flex: none; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.ar-lside { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; touch-action: pan-y; overscroll-behavior: contain; }
.ar-lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(160px*var(--m)), 1fr)); gap: 6px; align-content: start; }
.ar-dhead { grid-column: 1 / -1; font-size: max(15px, calc(17px*var(--m))); color: var(--gold-hi); border-bottom: 1px solid rgba(255,220,140,.3); padding-top: 2px; }
.ar-lcard { --qc: #ffd76a; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; text-align: center; border-radius: 10px; border: 2px solid var(--qc); background: rgba(0,0,0,.3); }
.ar-lcard.cur { box-shadow: 0 0 12px var(--qc); }
.ar-lcard.lock .ar-lpic { filter: brightness(.65); }
.ar-lpic { width: calc(104px*var(--m)); height: calc(104px*var(--m)); min-width: 56px; min-height: 56px; display: flex; align-items: center; justify-content: center; }
.ar-lpic img { width: 100%; height: 100%; object-fit: contain; }
.ar-lstat { font-size: max(13px, calc(14px*var(--m))); color: #8ff0b0; line-height: 1.2; text-shadow: 0 1px 0 #2a0805; overflow-wrap: anywhere; }
.ar-state { font-size: 14px; font-weight: 900; color: var(--gold-hi); text-shadow: var(--outline); min-height: 44px; display: flex; align-items: center; }
.ar-act { min-height: 44px; min-width: 44px; max-width: 100%; padding: 0 10px; font-size: max(14px, calc(15px*var(--m))); gap: 4px; margin-top: auto; }
.ar-act .sc-blabel { white-space: nowrap; font-size: inherit; }
.ar-gicon { width: 20px; height: 20px; object-fit: contain; }
.ar-sheen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255,240,200,.28) 50%, transparent 65%); background-size: 250% 100%; animation: ar-shine 3s linear infinite; }
@keyframes ar-shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.ar-note { font-size: max(12px, calc(13px*var(--m))); color: #e9d3a8; text-align: center; line-height: 1.3; padding-bottom: 4px; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
/* narrow / portrait */
@media (max-aspect-ratio: 1/1) {
  .ar-gear, .ar-looks { flex-direction: column; overflow-y: auto; scrollbar-width: none; touch-action: pan-y; }
  .ar-stage, .ar-looks .ar-stage { width: 150px; height: 150px; } .ar-stage.small, .ar-looks .ar-stage.small { width: 130px; height: 130px; }
  .ar-doll { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .ar-slotcol { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .ar-doll .ar-slotcol:first-child { order: 2; } .ar-mid { order: 1; } .ar-doll .ar-slotcol:last-child { order: 3; }
  .ar-slot { width: 56px; height: 64px; }
  .ar-info, .ar-lside { overflow: visible; flex: none; }
}
@media (max-height: 520px) {
  .ar-modal .sc-panel { width: 99vw; height: 98vh; max-height: 98vh; gap: 3px; }
  .ar-tab { min-height: 44px; font-size: 15px; min-width: 100px; }
  .ar-stage, .ar-looks .ar-stage { width: 165px; height: 165px; } .ar-stage.small, .ar-looks .ar-stage.small { width: 150px; height: 150px; }
  .ar-slot { width: 56px; min-width: 56px; height: 62px; min-height: 48px; border-width: 2px; }
  .ar-sicon { height: 32px; min-height: 22px; }
  .ar-sname { font-size: 12px; }
  .ar-slotcol { gap: 4px; } .ar-doll { gap: 4px; }
  .ar-gear, .ar-looks { gap: 6px; }
  .ar-body { padding: 0 4px 4px; }
  .ar-chip { font-size: 13px; padding: 1px 8px; }
  .ar-h { font-size: 14px; }
  .ar-fchip { font-size: 14px; padding: 0 10px; }
  .ar-cicon { width: 44px; height: 44px; }
  .ar-cname { font-size: 14px; } .ar-cdesc, .ar-lstat { font-size: 12px; }
  .ar-lpic { width: 56px; height: 56px; min-width: 44px; min-height: 44px; }
  .ar-lgrid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .ar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
