/* YZWar lobby v2 — tactical operations board, not a terminal.
   Overrides the first-pass lobby skin: stronger photography, real character
   key art, normal Chinese labels, fewer mono micro-labels. */

.yw-lobby {
  --yw-ink: #071014;
  --yw-panel: rgba(9, 16, 20, .9);
  --yw-panel-2: rgba(14, 23, 28, .86);
  --yw-line: rgba(214, 226, 231, .12);
  --yw-amber: #f2b25c;
  --yw-amber-hi: #ffd08a;
  --yw-cyan: #79cfe2;
  --yw-text: #e9ecea;
  --yw-muted: rgba(233, 236, 234, .58);
  background: #071014;
  font-family: 'Noto Sans SC', 'Barlow Condensed', system-ui, sans-serif;
}
.yw-bg { filter: saturate(.92) contrast(1.05) brightness(.78); }
.yw-bg__shade {
  background:
    linear-gradient(90deg, rgba(4, 9, 12, .97) 0%, rgba(4, 9, 12, .72) 34%, rgba(4, 9, 12, .34) 62%, rgba(4, 9, 12, .9) 100%),
    linear-gradient(180deg, rgba(4, 9, 12, .86) 0%, transparent 24%, transparent 66%, rgba(4, 9, 12, .92) 100%);
}
.yw-grain { opacity: .06; }

/* top bar */
.yw-top { padding: 14px 24px; background: linear-gradient(180deg, rgba(3, 8, 11, .94), rgba(3, 8, 11, .42)); border-bottom-color: rgba(255, 255, 255, .08); }
.yw-brand__mark { width: 40px; height: 40px; border-radius: 2px; border-color: rgba(242, 178, 92, .55); background: rgba(242, 178, 92, .08); clip-path: none; color: var(--yw-amber-hi); }
.yw-brand__copy b { font-family: 'Barlow Condensed', sans-serif; font-size: 30px; letter-spacing: .05em; }
.yw-brand__copy span { margin-top: 3px; font-family: 'Noto Sans SC', sans-serif; font-size: 9.5px; letter-spacing: .1em; color: rgba(233, 236, 234, .44); }
.yw-tabs { gap: 26px; }
.yw-tab { margin: 0; padding: 8px 1px 7px; border-bottom-width: 2px; font-family: 'Noto Sans SC', sans-serif; font-size: 15px; font-weight: 500; letter-spacing: .02em; color: rgba(233, 236, 234, .5); }
.yw-tab:hover { color: #fff; }
.yw-tab.is-active { color: #fff; border-bottom-color: var(--yw-amber); }
.yw-topmeta { gap: 14px; }
.yw-account { display: flex; align-items: center; gap: 9px; padding-right: 14px; border-right: 1px solid rgba(255, 255, 255, .1); }
.yw-account__avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 2px; background: linear-gradient(145deg, rgba(242, 178, 92, .26), rgba(255, 255, 255, .04)); border: 1px solid rgba(242, 178, 92, .4); color: var(--yw-amber-hi); font-family: 'Barlow Condensed', sans-serif; font-size: 17px; font-weight: 700; }
.yw-account__copy { display: flex; flex-direction: column; line-height: 1.15; }
.yw-account__copy b { font-size: 13px; font-weight: 600; color: var(--yw-text); }
.yw-account__copy em { margin-top: 2px; font-style: normal; font-size: 9px; color: rgba(233, 236, 234, .42); }
.yw-server, .yw-freetag { border-radius: 2px; font-family: 'Noto Sans SC', sans-serif; font-size: 9.5px; letter-spacing: .02em; padding: 5px 8px; background: rgba(4, 9, 12, .5); }
.yw-server { color: rgba(233, 236, 234, .6); }
.yw-freetag { color: #9fe6bf; border-color: rgba(159, 230, 191, .25); }

/* layout + surfaces */
.yw-layout { grid-template-columns: 286px minmax(0, 1fr) 304px; gap: 16px; padding: 18px 24px 10px; }
.yw-card { border-radius: 2px; border: 1px solid rgba(255, 255, 255, .09); background: linear-gradient(160deg, rgba(15, 25, 30, .92), rgba(6, 12, 15, .94)); box-shadow: 0 16px 40px rgba(0, 0, 0, .22); backdrop-filter: blur(10px); }
.yw-card::before { content: ''; display: block; height: 2px; background: linear-gradient(90deg, var(--yw-amber), transparent 55%); opacity: .55; }
.yw-profile { padding: 17px 17px 15px; }
.yw-profile__row { gap: 13px; }
.yw-avatar { width: 76px; height: 92px; border-radius: 2px; border-color: rgba(255, 255, 255, .14); background: #0a1216; clip-path: none; overflow: hidden; }
.yw-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 7%; transform: scale(1.9); transform-origin: 50% 5%; filter: saturate(.85) contrast(1.04); }
.yw-avatar span { position: relative; z-index: 0; font-size: 26px; opacity: .4; }
.yw-avatar i { z-index: 2; right: 7px; bottom: 7px; width: 7px; height: 7px; }
.yw-name-row input { border: 0; border-bottom: 1px solid rgba(255, 255, 255, .16); border-radius: 0; background: transparent; padding: 3px 0 5px; font-family: 'Noto Sans SC', sans-serif; font-size: 18px; font-weight: 600; letter-spacing: 0; }
.yw-name-row input:focus { border-color: var(--yw-amber); }
.yw-name-row button { border: 0; background: transparent; color: var(--yw-amber); padding: 0 2px; font-size: 10px; }
.yw-uid { margin-top: 5px; font-family: 'Noto Sans SC', sans-serif; font-size: 8.5px; letter-spacing: .02em; color: rgba(233, 236, 234, .36); }
.yw-stats { margin-top: 15px; border: 0; border-top: 1px solid rgba(255, 255, 255, .08); border-bottom: 1px solid rgba(255, 255, 255, .08); background: transparent; gap: 0; }
.yw-stats div { background: transparent; padding: 10px 0 9px; border-right: 1px solid rgba(255, 255, 255, .07); }
.yw-stats div:last-child { border-right: 0; }
.yw-stats b { font-family: 'Barlow Condensed', sans-serif; font-size: 27px; letter-spacing: .02em; color: #fff; }
.yw-stats span { margin-top: 2px; font-family: 'Noto Sans SC', sans-serif; font-size: 9.5px; letter-spacing: 0; color: rgba(233, 236, 234, .42); }
.yw-kicker { margin-bottom: 8px; font-family: 'Noto Sans SC', sans-serif; font-size: 9.5px; letter-spacing: .1em; color: var(--yw-cyan); opacity: .72; }
.yw-kicker--gap { margin-top: 16px; }
.yw-units { gap: 4px; }
.yw-unit { border-radius: 2px; border-color: rgba(255, 255, 255, .1); background: rgba(4, 9, 12, .42); padding: 7px 8px; }
.yw-unit b { width: 23px; height: 23px; border-radius: 2px; background: rgba(255, 255, 255, .06); color: var(--yw-amber); font-family: 'Barlow Condensed', sans-serif; font-size: 12px; }
.yw-unit span { font-family: 'Noto Sans SC', sans-serif; font-size: 12px; }
.yw-unit.is-active { border-color: rgba(242, 178, 92, .55); background: rgba(242, 178, 92, .13); }
.yw-profile__links { gap: 0; margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, .08); }
.yw-profile__links button { border: 0; border-right: 1px solid rgba(255, 255, 255, .08); padding: 9px 0 0; font-family: 'Noto Sans SC', sans-serif; font-size: 10px; color: rgba(233, 236, 234, .48); }
.yw-profile__links button:last-child { border-right: 0; }
.yw-tipcard { margin-top: 12px; padding: 15px 16px 14px; }
.yw-tipcard__title { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #fff; }
.yw-tipcard p { font-size: 11.5px; line-height: 1.65; color: rgba(233, 236, 234, .54); }
.yw-tipcard__meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.yw-tipcard__meta span { padding: 3px 7px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 2px; font-size: 8.5px; color: rgba(233, 236, 234, .48); }
.yw-tipcard__stamp { display: none; }

/* hero */
.yw-hero {
  position: relative; overflow: hidden; border-radius: 2px;
  background: url('/img/lobby-bg.jpg') center 44% / cover no-repeat;
  border-color: rgba(255, 255, 255, .1);
}
.yw-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(4, 9, 12, .97) 0%, rgba(4, 9, 12, .84) 36%, rgba(4, 9, 12, .34) 64%, rgba(4, 9, 12, .5) 100%),
    linear-gradient(0deg, rgba(4, 9, 12, .82) 0%, transparent 48%);
}
.yw-hero__copy { position: relative; z-index: 3; width: 60%; padding: 34px 32px 28px; justify-content: center; }
.yw-hero__kicker { margin: 0 0 10px; font-family: 'Noto Sans SC', sans-serif; font-size: 10.5px; letter-spacing: .14em; color: var(--yw-cyan); opacity: .82; }
.yw-hero__title { font-family: 'Noto Sans SC', 'Barlow Condensed', sans-serif; font-size: clamp(54px, 5.8vw, 74px); font-weight: 800; line-height: 1; letter-spacing: -.02em; color: #f6f3ec; text-shadow: 0 6px 30px rgba(0, 0, 0, .55); }
.yw-hero__title span { margin-top: 12px; font-family: 'Noto Sans SC', sans-serif; font-size: 12px; font-weight: 400; letter-spacing: .18em; color: rgba(246, 243, 236, .5); }
.yw-hero__lead { margin: 18px 0 0; max-width: 44ch; font-size: 14.5px; line-height: 1.65; color: rgba(246, 243, 236, .66); }
.yw-chips { gap: 6px; margin-top: 16px; }
.yw-chips span { border-radius: 2px; border-color: rgba(255, 255, 255, .12); background: rgba(3, 8, 11, .52); padding: 5px 8px; font-family: 'Noto Sans SC', sans-serif; font-size: 9px; letter-spacing: 0; color: rgba(246, 243, 236, .6); }
.yw-chips b { color: var(--yw-amber-hi); }
.yw-cta { gap: 9px; margin-top: 22px; }
.yw-btn { min-height: 50px; padding: 0 20px; border-radius: 2px; border-color: rgba(255, 255, 255, .16); background: rgba(5, 11, 14, .62); font-family: 'Noto Sans SC', sans-serif; }
.yw-btn b { font-family: 'Noto Sans SC', sans-serif; font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.yw-btn em { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; letter-spacing: .12em; color: rgba(255, 255, 255, .38); }
.yw-btn:hover { border-color: rgba(242, 178, 92, .5); background: rgba(242, 178, 92, .09); }
.yw-btn--primary { clip-path: none; border-color: #f6c57e; background: linear-gradient(180deg, #f8ca82, #eaa74c); color: #1a1206; box-shadow: 0 10px 28px rgba(234, 167, 76, .2); }
.yw-btn--primary em { color: rgba(26, 18, 6, .5); }
.yw-btn--primary:hover { background: linear-gradient(180deg, #ffd796, #f2b25c); }
.yw-hero__hint { margin-top: 13px; font-size: 10.5px; color: rgba(246, 243, 236, .38); }
.yw-hero__hint button { font-size: 10.5px; color: var(--yw-amber-hi); }
.yw-hero__stage { position: absolute; right: 0; bottom: 0; width: 48%; height: 100%; z-index: 2; pointer-events: none; overflow: hidden; }
.yw-hero__stage-map { position: absolute; inset: 0; background: url('/img/lobby-room.jpg') center / cover; opacity: .5; filter: saturate(.64) contrast(1.08); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%); mask-image: linear-gradient(90deg, transparent 0%, #000 42%); }
.yw-hero__soldier { position: absolute; right: 2%; bottom: -3%; height: 102%; width: auto; filter: drop-shadow(0 24px 34px rgba(0, 0, 0, .62)) contrast(1.06) saturate(.84); }
.yw-hero__stage-meta { position: absolute; left: 18px; bottom: 22px; z-index: 3; padding: 9px 12px; background: rgba(3, 8, 11, .62); border-left: 2px solid var(--yw-amber); backdrop-filter: blur(5px); display: flex; flex-direction: column; gap: 1px; }
.yw-hero__stage-meta span { font-size: 8px; letter-spacing: .14em; color: rgba(246, 243, 236, .46); }
.yw-hero__stage-meta b { font-size: 20px; font-weight: 700; color: #fff; }
.yw-hero__stage-meta em { font-style: normal; font-size: 8.5px; color: rgba(246, 243, 236, .4); }
.yw-facts { margin-top: 10px; border-radius: 2px; border-color: rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .05); gap: 1px; }
.yw-facts div { padding: 10px 16px 9px; background: rgba(5, 11, 14, .88); display: flex; flex-direction: column; gap: 2px; }
.yw-facts span { font-size: 8.5px; letter-spacing: .06em; color: rgba(233, 236, 234, .38); }
.yw-facts b { font-family: 'Noto Sans SC', sans-serif; font-size: 13px; font-weight: 600; color: rgba(246, 243, 236, .9); }

/* right column */
.yw-online header { padding: 13px 14px 10px; }
.yw-online header > div { gap: 7px; }
.yw-online header .yw-kicker { margin: 0; font-size: 10px; letter-spacing: .04em; color: rgba(233, 236, 234, .55); }
.yw-online header b { font-family: 'Barlow Condensed', sans-serif; font-size: 21px; color: #fff; }
.yw-online header button { border-radius: 2px; border-color: rgba(255, 255, 255, .12); }
.yw-online__hint { margin: 8px 14px 7px; font-size: 10.5px; line-height: 1.6; color: rgba(233, 236, 234, .34); }
.yw-player { padding: 8px 7px; border-bottom-color: rgba(255, 255, 255, .05); }
.yw-player__badge { width: 30px; height: 30px; border-radius: 2px; background: rgba(255, 255, 255, .06); color: var(--yw-amber); }
.yw-player__copy b { font-size: 13px; }
.yw-player__copy span { font-family: 'Noto Sans SC', sans-serif; font-size: 8px; letter-spacing: 0; }
.yw-player__kd { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; color: rgba(233, 236, 234, .5); }
.yw-player__act { border-radius: 2px; border-color: rgba(242, 178, 92, .3); background: transparent; font-family: 'Noto Sans SC', sans-serif; font-size: 9.5px; }
.yw-servercard { padding: 12px 14px; }
.yw-serverrow { font-family: 'Noto Sans SC', sans-serif; font-size: 11px; }
.yw-serverrow b { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; letter-spacing: .05em; }

/* bottom */
.yw-bottom { padding: 10px 24px 12px; background: linear-gradient(0deg, rgba(3, 8, 11, .95), rgba(3, 8, 11, .35)); border-top-color: rgba(255, 255, 255, .08); }
.yw-res__label, .yw-res b, .yw-res button { font-family: 'Noto Sans SC', sans-serif; font-size: 9px; letter-spacing: 0; }
.yw-res__bar { height: 3px; }
.yw-bottom__meta { font-family: 'Noto Sans SC', sans-serif; font-size: 8px; letter-spacing: 0; }

/* room / resources / about panels */
.yw-room, .yw-panel[data-yw-panel="resources"], .yw-panel[data-yw-panel="about"] { border-radius: 2px; background: linear-gradient(150deg, rgba(14, 23, 28, .96), rgba(5, 11, 14, .94)); border-color: rgba(255, 255, 255, .09); padding: 28px 30px; }
.yw-panel-title { font-family: 'Noto Sans SC', sans-serif; font-size: clamp(30px, 3.4vw, 42px); letter-spacing: -.02em; }
.yw-panel-lead { font-size: 13.5px; }
.yw-room__code { font-family: 'Barlow Condensed', sans-serif; color: var(--yw-amber-hi); }
.yw-room__invite input { font-family: 'Noto Sans SC', sans-serif; font-size: 10px; border-radius: 1px; }
.yw-room__invite button { border-radius: 1px; font-family: 'Noto Sans SC', sans-serif; }
.yw-room__rules span { font-family: 'Noto Sans SC', sans-serif; font-size: 8.5px; letter-spacing: 0; }
.yw-asset { padding: 10px 12px; }
.yw-asset__name b { font-family: 'Noto Sans SC', sans-serif; }
.yw-asset__name span { font-family: 'Noto Sans SC', sans-serif; letter-spacing: 0; }
.yw-about-grid b { font-family: 'Noto Sans SC', sans-serif; font-size: 15px; }
.yw-about-grid span { font-size: 11px; }

/* splash: cinematic plate */
.yw-splash { background: #03080b; }
.yw-splash__bg {
  background:
    radial-gradient(900px 520px at 50% 46%, rgba(242, 178, 92, .13), transparent 62%),
    linear-gradient(180deg, rgba(3, 8, 11, .62), rgba(3, 8, 11, .94)),
    url('/img/lobby-bg.jpg') center / cover;
  filter: blur(9px) saturate(.6) brightness(.52);
  transform: scale(1.08);
  opacity: .82;
}
.yw-splash__scan { opacity: .1; }
.yw-splash__letters span { font-size: clamp(80px, 15vw, 176px); color: #f4f1e9; text-shadow: 0 12px 50px rgba(0, 0, 0, .5); }
.yw-splash__letters span:nth-child(5) { color: var(--yw-amber); }
.yw-splash__sub { font-family: 'Noto Sans SC', sans-serif; font-size: 11px; letter-spacing: .18em; color: rgba(244, 241, 233, .62); }
.yw-splash__tiny { font-family: 'Noto Sans SC', sans-serif; font-size: 8px; letter-spacing: .08em; color: rgba(244, 241, 233, .28); }
.yw-splash__stage h2 { font-family: 'Noto Sans SC', sans-serif; font-weight: 700; letter-spacing: .02em; }
.yw-splash__stage p { font-family: 'Noto Sans SC', sans-serif; font-size: 13px; }
.yw-splash__tag { font-family: 'Noto Sans SC', sans-serif; font-size: 8px; letter-spacing: .08em; }
.yw-splash__skip { font-family: 'Noto Sans SC', sans-serif; border-radius: 2px; }
.yw-splash__corner { font-family: 'Noto Sans SC', sans-serif; font-size: 8px; letter-spacing: .06em; }

@media (max-width: 1180px) {
  .yw-layout { grid-template-columns: 250px minmax(0, 1fr) 280px; gap: 12px; padding: 14px 18px 8px; }
  .yw-hero__copy { width: 64%; padding: 26px 24px; }
  .yw-hero__stage { width: 45%; }
}
@media (max-width: 960px) {
  .yw-layout { grid-template-columns: 1fr; }
  .yw-top { padding: 12px 16px; }
  .yw-tabs { gap: 18px; }
  .yw-account { display: none; }
  .yw-stage { min-height: 0; }
  .yw-panel { flex: none; }
  .yw-hero { flex: none; flex-direction: column; min-height: 0; height: auto; }
  .yw-hero__copy { width: 100%; padding: 24px 20px 18px; }
  .yw-hero__stage { position: relative; width: 100%; height: 260px; min-height: 260px; flex: 0 0 260px; opacity: 1; order: 2; }
  .yw-hero__soldier { right: 4%; bottom: -6%; height: 118%; }
  .yw-hero__stage-meta { left: auto; right: 14px; bottom: 14px; }
  .yw-hero__stage-map { opacity: .58; mask-image: linear-gradient(0deg, #000 12%, transparent 82%); -webkit-mask-image: linear-gradient(0deg, #000 12%, transparent 82%); }
  .yw-hero__title { font-size: 54px; }
  .yw-facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .yw-topmeta { display: none; }
  .yw-hero__copy { padding: 20px 18px 16px; }
  .yw-hero__stage { height: 180px; min-height: 180px; flex-basis: 180px; }
  .yw-hero__soldier { display: none; }
  .yw-hero__stage-meta { bottom: 12px; right: 12px; padding: 7px 10px; }
  .yw-hero__stage-meta b { font-size: 17px; }
  .yw-hero__title { font-size: 46px; }
  .yw-hero__lead { font-size: 13px; }
  .yw-panel-title { font-size: 30px; }
  .yw-cta .yw-btn { justify-content: space-between; }
  .yw-cta .yw-btn--primary { flex: 1 1 100%; }
  .yw-cta .yw-btn:not(.yw-btn--primary) { flex: 1 1 calc(50% - 5px); }
}

/* character blend + machine fallback */
.yw-hero__soldier {
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, .62)) drop-shadow(-2px 0 6px rgba(121, 207, 226, .16)) drop-shadow(2px 0 8px rgba(242, 178, 92, .18)) contrast(1.06) saturate(.84);
}
.yw-hero__machine {
  position: absolute; right: 8%; bottom: 10%; width: 210px; height: 300px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid rgba(242, 178, 92, .18);
  background: radial-gradient(circle at 50% 35%, rgba(242, 178, 92, .14), rgba(4, 9, 12, .3));
}
.yw-hero__machine[hidden] { display: none !important; }
.yw-hero__machine b { font-family: 'Barlow Condensed', sans-serif; font-size: 150px; line-height: .8; color: rgba(242, 178, 92, .32); }
.yw-hero__machine span { margin-top: 10px; font-size: 12px; letter-spacing: .12em; color: rgba(246, 243, 236, .45); }
.yw-sideinvite {
  margin: 8px 10px 10px; padding: 8px; border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 2px; background: transparent; color: rgba(233, 236, 234, .55);
  font-family: 'Noto Sans SC', sans-serif; font-size: 10px; cursor: pointer;
}
.yw-sideinvite:hover { color: var(--yw-amber-hi); border-color: rgba(242, 178, 92, .4); }
.yw-avatar img { object-position: 50% 3%; transform: scale(2.15); }

/* The lobby replaces Saltline's original title and unit-select screens. */
#soldier-select,
#ui .m-screen[data-s="title"],
.m-screen[data-s="title"] { display: none !important; }
#ui .m-screen[data-s="title"] * { pointer-events: none !important; }

#ui .m-veil,
#ui .m-bars { display: none !important; }

/* ---------------------------------------------------------------- mobile landscape */
@media (orientation: landscape) and (max-height: 560px) {
  .yw-top {
    height: 48px; padding: 4px 12px; flex-wrap: nowrap; gap: 12px;
  }
  .yw-brand { min-width: 0; gap: 7px; }
  .yw-brand__mark { width: 30px; height: 30px; font-size: 15px; }
  .yw-brand__copy b { font-size: 21px; }
  .yw-brand__copy span { display: none; }
  .yw-tabs { gap: 15px; }
  .yw-tab { font-size: 13px; padding: 4px 0; }
  .yw-topmeta { display: none !important; }
  .yw-tabs { margin-left: auto; }

  .yw-layout {
    display: block; padding: 6px 10px 4px; overflow: hidden;
  }
  .yw-side { display: none !important; }
  .yw-stage {
    height: calc(100vh - 48px - 42px); min-height: 0;
  }
  .yw-panel { flex: none; height: 100%; }
  .yw-hero {
    flex: none; flex-direction: row; height: 100%; min-height: 0;
  }
  .yw-hero__copy {
    width: 58%; padding: 10px 18px; justify-content: center;
  }
  .yw-hero__kicker { margin-bottom: 4px; font-size: 8px; }
  .yw-hero__title { font-size: 34px; line-height: .98; }
  .yw-hero__title span { margin-top: 5px; font-size: 9px; letter-spacing: .1em; }
  .yw-hero__lead {
    margin-top: 7px; max-height: 3em; overflow: hidden;
    font-size: 10.5px; line-height: 1.45;
  }
  .yw-chips { display: none; }
  .yw-cta { margin-top: 9px; gap: 5px; }
  .yw-btn { min-height: 36px; padding: 0 10px; }
  .yw-btn b { font-size: 12px; }
  .yw-btn em { display: none; }
  .yw-hero__hint { display: none; }
  .yw-hero__stage {
    position: absolute; right: 0; top: 0; width: 44%; height: 100%;
    min-height: 0; flex: none;
  }
  .yw-hero__soldier { display: block; height: 112%; right: 0; bottom: -10%; }
  .yw-hero__stage-meta { left: 8px; bottom: 8px; padding: 5px 8px; }
  .yw-hero__stage-meta b { font-size: 14px; }
  .yw-hero__stage-meta span, .yw-hero__stage-meta em { font-size: 6.5px; }
  .yw-facts { display: none; }

  .yw-bottom {
    height: 42px; padding: 6px 12px; flex-direction: row; align-items: center;
  }
  .yw-res { max-width: none; }
  .yw-res__label { display: none; }
  .yw-bottom__meta { display: none; }
  .yw-help, .yzwar-help, .yzwar-free-badge { display: none !important; }

  .yw-room, .yw-panel[data-yw-panel="resources"], .yw-panel[data-yw-panel="about"] {
    height: 100%; overflow: auto; padding: 12px 16px;
  }
  .yw-panel-title { font-size: 24px; }
  .yw-panel-lead { font-size: 11px; }
  .yw-room__code { font-size: 44px; }
  .yw-room__actions { margin-top: 8px; }
  .yw-about-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- mobile performance */
@media (max-width: 900px), (max-height: 560px) {
  .yw-splash__bg {
    background: radial-gradient(700px 380px at 50% 46%, rgba(242, 178, 92, .14), transparent 64%), #03080b !important;
    filter: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .yw-splash__scan { display: none !important; }
  .yw-splash__letters span {
    animation: yw-letter-in-mobile .38s cubic-bezier(.2, .8, .2, 1) both !important;
    text-shadow: none !important;
  }
  .yw-splash__panel, .yw-top, .yw-card, .yw-bottom, .yw-splash__skip {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .yw-bg { filter: brightness(.72) saturate(.85) !important; }
  .yw-hero, .yw-hero__stage-map { backdrop-filter: none !important; }
}
@media (max-width: 900px), (max-height: 560px) {
  .yw-splash__progress i { animation-duration: 3.65s !important; }
}
@keyframes yw-letter-in-mobile {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}


/* Splash download stage: smooth YZCloud asset transfer */
.yw-splash__stage--download { gap: 0; }
.yw-splash__dl-icon { width: 60px; height: 60px; color: var(--yw-cyan); opacity: .9; margin-bottom: 12px; animation: yw-dl-float 2.4s ease-in-out infinite; }
.yw-splash__dl-icon svg { width: 100%; height: 100%; }
.yw-splash__dl-kicker { margin: 0 0 6px; font-family: 'Noto Sans SC', sans-serif; font-size: 9px; letter-spacing: .18em; color: rgba(121, 207, 226, .7); }
.yw-splash__stage--download h2 { margin: 0; font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; color: #f3f0e8; }
.yw-splash__dl-file { margin: 9px 0 14px; font-size: 12px; color: rgba(243, 240, 232, .5); }
.yw-dl-bar { position: relative; width: min(460px, 78vw); height: 6px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.yw-dl-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #eaa74c, #ffd08a); transition: width .22s ease; }
.yw-dl-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); transform: translateX(-100%); animation: yw-dl-shimmer 1.4s linear infinite; }
.yw-dl-meta { display: flex; align-items: baseline; gap: 12px; margin-top: 9px; width: min(460px, 78vw); font-family: 'IBM Plex Mono', monospace; }
.yw-dl-meta b { font-size: 18px; color: #ffc977; font-weight: 500; min-width: 44px; text-align: left; }
.yw-dl-meta span { font-size: 9px; color: rgba(243, 240, 232, .46); }
.yw-dl-meta em { margin-left: auto; font-style: normal; font-size: 9px; color: rgba(121, 207, 226, .6); }
.yw-splash__dl-note { margin: 16px 0 0; max-width: 44ch; font-size: 10px; line-height: 1.6; color: rgba(243, 240, 232, .3); }
@keyframes yw-dl-float { 0%, 100% { transform: translateY(0); opacity: .8; } 50% { transform: translateY(-4px); opacity: 1; } }
@keyframes yw-dl-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media (max-width: 620px) {
  .yw-splash__dl-icon { width: 48px; height: 48px; }
  .yw-splash__dl-file { margin-bottom: 10px; }
}

.yw-bottom { justify-content: flex-end; }
@media (orientation: landscape) and (max-height: 560px) {
  .yw-bottom { display: none !important; }
  .yw-stage { height: calc(100vh - 48px) !important; }
}

/* ---------------------------------------------------------------- formal trim */
.yw-tipcard, .yw-facts, .yw-chips, .yw-hero__hint, .yw-servercard, .yw-online__hint { display: none !important; }
.yw-hero__copy { padding: 34px 34px 30px; }
.yw-hero__lead { margin-top: 14px; max-width: 38ch; font-size: 14px; }
.yw-hero__meta {
  margin: 12px 0 0; font-family: 'IBM Plex Mono', monospace;
  font-size: 8.5px; letter-spacing: .1em; color: rgba(246, 243, 236, .38);
}
.yw-hero__meta::before { content: ''; display: inline-block; width: 14px; height: 1px; background: var(--yw-amber); vertical-align: middle; margin-right: 8px; opacity: .7; }
.yw-cta { margin-top: 20px; }
.yw-hero__stage { width: 47%; }
.yw-online { height: 100%; }
.yw-online__list { min-height: 0; }
.yw-bottom { justify-content: flex-end; padding-top: 7px; padding-bottom: 8px; }
.yw-brand { min-width: 180px; }
.yw-brand__copy b { font-size: 31px; }
.yw-layout { grid-template-columns: 286px minmax(0, 1fr) 304px; }

/* update modal */
.yw-update { position: fixed; inset: 0; z-index: 2147483550; display: grid; place-items: center; padding: 20px; }
.yw-update[hidden] { display: none !important; }
.yw-update__backdrop { position: absolute; inset: 0; background: rgba(3, 6, 8, .8); backdrop-filter: blur(7px); }
.yw-update__box { position: relative; width: min(460px, 100%); padding: 28px; background: linear-gradient(155deg, #151d22, #080c0f); border: 1px solid rgba(242, 178, 92, .26); box-shadow: 0 30px 100px rgba(0, 0, 0, .7); }
.yw-update__kicker { margin: 0 0 7px; font-family: 'Noto Sans SC', sans-serif; font-size: 9px; letter-spacing: .12em; color: var(--yw-cyan); }
.yw-update__box h2 { margin: 0; font-family: 'Noto Sans SC', sans-serif; font-size: 28px; font-weight: 700; color: #f4f1e9; }
.yw-update__box p { margin: 9px 0 0; font-size: 12px; line-height: 1.65; color: rgba(244, 241, 233, .55); }
.yw-update__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 14px 0 0; font-family: 'IBM Plex Mono', monospace; font-size: 8px; color: rgba(244, 241, 233, .36); }
.yw-update__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* portrait requirement */
.yw-rotate { position: fixed; inset: 0; z-index: 2147483600; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px; background: #03070a; text-align: center; }
.yw-rotate__phone { width: 54px; height: 88px; border: 2px solid rgba(242, 178, 92, .65); border-radius: 8px; position: relative; margin-bottom: 8px; animation: yw-rotate-phone 2.6s ease-in-out infinite; }
.yw-rotate__phone i { position: absolute; left: 50%; bottom: 5px; width: 14px; height: 2px; background: rgba(242, 178, 92, .6); transform: translateX(-50%); }
.yw-rotate h2 { margin: 0; font-family: 'Noto Sans SC', sans-serif; font-size: 25px; font-weight: 700; color: #f4f1e9; }
.yw-rotate p { margin: 0; max-width: 34ch; font-size: 12px; line-height: 1.7; color: rgba(244, 241, 233, .48); }
.yw-rotate button { margin-top: 8px; padding: 9px 18px; border: 1px solid rgba(242, 178, 92, .5); background: rgba(242, 178, 92, .1); color: var(--yw-amber-hi); font-family: 'Noto Sans SC', sans-serif; font-size: 12px; }
@keyframes yw-rotate-phone { 0%, 20% { transform: rotate(0); } 60%, 100% { transform: rotate(90deg); } }
html.yw-portrait .yw-rotate { display: flex; }
html.yw-landscape .yw-rotate { display: none !important; }
@media (prefers-reduced-motion: reduce) { .yw-rotate__phone { animation: none; } }

.yw-side--left { display: flex; }
.yw-profile { flex: 1; display: flex; flex-direction: column; }
.yw-profile__links { margin-top: auto; }

.yw-touch-hint {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 2147483500; padding: 8px 13px; border: 1px solid rgba(242,178,92,.35);
  background: rgba(4,8,11,.82); color: rgba(244,241,233,.72);
  font-family: 'Noto Sans SC', sans-serif; font-size: 11px; white-space: nowrap;
  pointer-events: none;
}
.yw-touch-hint[hidden] { display: none !important; }
@media (orientation: landscape) and (max-height: 560px) {
  .yw-touch-hint { bottom: 14px; font-size: 10px; padding: 6px 10px; }
}

/* iOS/Android fallback joystick: drag left side to move via synthetic WASD. */
.yw-move-zone {
  display: none; position: fixed; left: 0; bottom: 0; width: 50vw; height: 66vh;
  z-index: 24; touch-action: none; -webkit-user-select: none; user-select: none;
}
html.yw-playing .yw-move-zone { display: block; }
@media (pointer: fine) { .yw-move-zone { display: none !important; } }
.yw-stick {
  position: fixed; width: 118px; height: 118px; margin: 0; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22); background: rgba(3,7,10,.18);
  box-shadow: inset 0 0 24px rgba(255,255,255,.05); opacity: 0; pointer-events: none;
  transition: opacity .12s ease; transform: translate(-50%, -50%);
}
.yw-stick.on { opacity: 1; }
.yw-stick__nub {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(242,178,92,.28); border: 1px solid rgba(255,208,138,.7);
  transform: translate(-50%, -50%);
}
