/* Background resource download (local patch, public/js/resources.js): the one-time consent card and the progress
   pill, bottom-right on the title / lobby / room screens (never shown over the match HUD). On short screens (landscape
   phones) it moves to the top-right corner as a compact card (see the media query at the end). */

/* settings → 资源 tab (ResourceSetting, SkinPackSetting; ui/settings.js), laid out like the other .set-row controls: a group
   head per part (GAME, SKIN), each row's note under its control column (the label column is 3.3rem + the .18rem gap) */
.res-set__body { grid-column: 2 / 4; justify-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem; }
.res-group {
  display: flex; align-items: baseline; gap: .08rem; margin-top: .04rem; padding-top: .1rem; border-top: 1px solid var(--line);
  font: 600 .12rem var(--font-display); letter-spacing: .14em; color: var(--mint-500);
}
.res-group:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.set-hint.res-set__hint { margin: -.12rem 0 0 3.48rem; line-height: 1.6; }
.res-set__size { font-family: var(--font-num); font-size: .16rem; color: var(--text-lo); white-space: nowrap; }
.res-set__bar { flex: 0 0 1.6rem; height: max(.06rem, 4px); background: #0a0d0c; border: 1px solid var(--line-2); overflow: hidden; }
.res-set__bar i { display: block; height: 100%; background: var(--mint-500); }
.res-set__mini { height: .34rem; padding: 0 .12rem; background: #0a0d0c; border: 1px solid var(--line-2); color: var(--text-lo); font-size: .15rem; }
.res-set__mini:hover { color: var(--text-md); border-color: var(--mint-700); }
.res-set .set-toggle:disabled { opacity: .4; cursor: default; }
.res-set__btn {
  height: .38rem; padding: 0 .16rem; background: var(--mint-a20); border: 1px solid var(--mint-700); color: var(--mint-400);
  font-size: .16rem; font-weight: 700;
}
.res-set__btn:hover { filter: brightness(1.15); }
.res-set__state { font-size: .16rem; color: var(--text-lo); }
.res-set__state b, .res-set__state.is-done { color: var(--mint-400); }
.res-set__err { font-size: .14rem; color: var(--orange); }
@media (pointer: coarse), (any-pointer: coarse) { .res-set__btn, .res-set__mini { height: max(.38rem, 30px); } }

.res-ask, .res-pill {
  position: fixed; right: .24rem; bottom: .24rem; z-index: 60;
  background: rgba(8, 11, 10, .94); border: 1px solid var(--line-2); border-radius: .04rem;
  box-shadow: 0 .04rem .16rem rgba(0, 0, 0, .45); color: var(--text-md);
}
.res-ask { width: max(3.6rem, 260px); padding: .16rem .18rem; font-size: max(.16rem, 13px); line-height: 1.5; }
.res-ask strong { display: block; color: var(--mint-500); font-size: max(.17rem, 14px); letter-spacing: .04em; }
.res-ask p { margin: .06rem 0 0; }
.res-ask__lang { display: flex; align-items: center; justify-content: space-between; gap: .08rem; margin-top: .08rem; color: var(--text-md); }
.res-ask__lang .set-seg button { min-width: 0; padding: 0 .1rem; }
.res-ask__size { color: var(--text-hi, #fff); font-weight: 700; }
.res-ask__btns { display: flex; gap: .08rem; margin-top: .12rem; }
.res-ask__btns button { flex: 1; height: max(.4rem, 32px); border: 1px solid var(--line-2); border-radius: .03rem; color: var(--text-md); }
.res-ask__btns .res-ask__yes { background: var(--mint-600); border-color: var(--mint-500); color: #061310; font-weight: 700; }
.res-ask__btns button:hover { filter: brightness(1.12); }
.res-ask .res-ask__note { margin: .1rem 0 0; font-size: max(.13rem, 11px); line-height: 1.45; color: var(--text-lo); }
.res-pill { padding: .06rem .14rem; font-size: max(.14rem, 12px); opacity: .85; pointer-events: none; }
.res-pill b { color: var(--mint-400); }
.res-pill.is-err { color: var(--orange); }

/* local patch (2026-10-06, user: 「리소스 미리 받기 팝업도 조절해」): on short screens the card no longer dims and blocks
   the whole screen (it hid the title's settings gear and start button until dismissed) — a compact card in the top-right
   corner, where the title / lobby / room screens keep only labels; the rest of the screen stays tappable. */
@media (max-height: 540px) {
  .res-ask-wrap { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
  .res-ask {
    pointer-events: auto; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); bottom: auto;
    width: min(240px, 30vw); max-height: calc(100vh - 16px); overflow-y: auto; padding: 8px 10px; font-size: 11.5px; line-height: 1.4;
  }
  .res-ask strong { font-size: 13px; }
  .res-ask__lang { margin-top: 4px; }
  .res-ask__btns { margin-top: 6px; }
  .res-ask__btns button { height: 30px; }
  .res-ask .res-ask__note { margin-top: 4px; font-size: 10.5px; }
}
