/* v15 lobby window/notice polish. Load after buttons-v15.css and scoped layout CSS.
   Paint/type only: preserve native modal height/scroll, message placement, character art and scene overlays. */
:root {
  --ui15-window-ink:#fff3da;
  --ui15-window-muted:#c7c2b5;
  --ui15-window-surface:#172128;
  --ui15-window-raised:#233039;
  --ui15-notice-info:#b8d9df;
  --ui15-notice-warning:#f1d59c;
  --ui15-notice-error:#ffd2c8;
  --ui15-notice-success:#bee6ca;
  --ui15-notice-symbol:url('/resource/ui/icon-template-v22/runtime/guide-v22.webp');
  --ui15-warning-symbol:url('/resource/ui/icon-template-v22/runtime/warning-v22.webp');
  --ui15-error-symbol:url('/resource/ui/icon-template-v22/runtime/close-v22.webp');
  --ui15-success-symbol:url('/resource/ui/icon-template-v22/runtime/check-v22.webp');
}
/* Transparent edge resource never uses `fill`; inner background is a separate calm surface. */
body #detail-dialog {
  background-color:var(--ui15-window-surface)!important;
  background-image:linear-gradient(160deg,rgba(33,47,55,.96),rgba(15,24,30,.96)),var(--ui15-material)!important;
  background-position:center;
  background-size:100% 100%,160% 160%;
  border:2px solid transparent;
  border-image:var(--ui15-frame) 16 / 6px / 0 stretch!important;
  border-radius:0;
  color:var(--ui15-window-ink);
  box-shadow:0 16px 48px rgba(3,8,12,.48),inset 0 1px rgba(255,239,201,.08);
}
body #detail-dialog > :is(.dialog-header,.dialog-footer,.dialog-fixed-actions,.dialog-content-navigation) {
  background-color:#1c2830;
  background-image:linear-gradient(180deg,rgba(59,72,79,.32),rgba(16,25,31,.5));
  border-color:rgba(227,199,141,.24);
  color:var(--ui15-window-ink);
}
body #detail-dialog .dialog-header h2 {
  font-size:clamp(20px,var(--oa-fs-title,24px),28px);
  line-height:1.25;
  color:var(--ui15-window-ink);
}
body #detail-dialog :is(.dialog-close,#dialog-thumb-close) {
  min-width:48px;
  min-height:48px;
  color:var(--ui15-window-ink)!important;
}
body #detail-dialog button.ui15-action-row:disabled {
  --ui15-face:rgba(31,36,39,.94);
  border-image-source:var(--ui15-frame)!important;
}
body #detail-dialog :is(.dialog-lead,.dialog-muted,.spaced-note,.news-date,.news-read-status,.news-entry-copy small,.hub-chat-list time,.account-id-note,.friend-empty,.prepared-mode>span) {
  font-size:max(13px,var(--oa-fs-caption,13px));
  line-height:1.45;
  color:var(--ui15-window-muted);
  opacity:1;
}
body #detail-dialog :is(.dialog-section-title,.news-detail h3,.hub-panel h3,.hub-panel h4,.shop-item-heading h3,.growth-goal h3) {
  color:var(--ui15-window-ink);
}
body #detail-dialog :is(.news-paragraph,.hub-chat-text) {
  font-size:max(14px,var(--oa-fs-body,14px));
  line-height:1.55;
  color:var(--ui15-window-ink);
  overflow-wrap:anywhere;
}
/* Existing image elements, object-fit, aspect ratio and transparent character captions are untouched. */
body #detail-dialog :is(.hub-card:not(button),.mini-character,.friend-card,.equipment-row,.shop-detail,.growth-confirm,.supply-card,.prepared-mode,.supply-rewards,.room-code-card,.room-directory-card,.growth-goal,.stage-choice-description) {
  background-color:var(--ui15-window-raised);
  background-image:linear-gradient(150deg,rgba(60,76,83,.23),rgba(14,23,29,.32));
  border-color:rgba(191,175,139,.38);
  border-radius:2px;
}
/* Keep native select semantics/arrow; do not skin range/check/radio/hidden controls as text fields. */
body #detail-dialog :is(input:not([type='range']):not([type='checkbox']):not([type='radio']):not([type='hidden']),select,textarea) {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  min-height:48px;
  font-size:16px;
  line-height:1.35;
  color:var(--ui15-window-ink);
  background:#111c23;
  border:1px solid #8f8978;
  border-radius:2px;
  box-shadow:inset 0 2px 5px rgba(0,0,0,.18);
}
body #detail-dialog :is(input,textarea)::placeholder { color:#b5b2a8; opacity:1; }
body #detail-dialog :is(input,select,textarea):disabled { color:var(--ui15-window-muted); opacity:1; cursor:default; }
body #detail-dialog :is(input,select,textarea)[aria-invalid='true'] { border-color:#e6a497; box-shadow:inset 0 0 0 1px #e6a497; }
body #detail-dialog :is(input,select,textarea,a):focus-visible { outline:3px solid #f5d99e; outline-offset:2px; }
body #detail-dialog :is(.dialog-notice,.form-error,.shop-receipt) {
  --ui15-notice-accent:var(--ui15-notice-info);
  position:relative;
  min-width:0;
  padding:10px 12px 10px 40px;
  border:1px solid rgba(184,217,223,.48);
  border-inline-start:3px solid var(--ui15-notice-accent);
  border-radius:2px;
  color:var(--ui15-window-ink);
  background:linear-gradient(150deg,rgba(32,54,62,.83),rgba(17,30,37,.92));
  font-size:max(13px,var(--oa-fs-caption,13px));
  line-height:1.45;
  overflow-wrap:anywhere;
}
body #detail-dialog :is(.dialog-notice,.form-error,.shop-receipt)::before {
  content:'';
  position:absolute;
  inset-inline-start:12px;
  top:12px;
  width:18px;
  height:18px;
  background:var(--ui15-notice-symbol) center/contain no-repeat;
  pointer-events:none;
}
body #detail-dialog .form-error,
body #detail-dialog .dialog-notice[data-kind='error'] {
  --ui15-notice-accent:var(--ui15-notice-error);
  --ui15-notice-symbol:var(--ui15-error-symbol);
  border-color:rgba(230,164,151,.6);
  background:linear-gradient(150deg,#3d272a,#241f25);
}
body #detail-dialog .dialog-notice[data-kind='warning'] {
  --ui15-notice-accent:var(--ui15-notice-warning);
  --ui15-notice-symbol:var(--ui15-warning-symbol);
  border-color:rgba(218,180,108,.6);
  background:linear-gradient(150deg,#3b3224,#25262a);
}
body #detail-dialog .shop-receipt[role='status'],
body #detail-dialog .dialog-notice[data-kind='success'] {
  --ui15-notice-accent:var(--ui15-notice-success);
  --ui15-notice-symbol:var(--ui15-success-symbol);
  border-color:rgba(164,207,171,.6);
  background:linear-gradient(150deg,#273b32,#202b2b);
}
/* The native channel owns location, visibility, bounded text scrolling and priority semantics. */
body #status-message {
  --ui15-notice-accent:var(--ui15-notice-info);
  border-color:var(--ui15-notice-accent);
  border-radius:2px;
  background:linear-gradient(155deg,#24333b,#14232b);
  color:var(--ui15-window-ink);
  font-size:max(14px,var(--oa-fs-caption,14px));
  line-height:1.4;
  box-shadow:0 4px 16px rgba(3,8,12,.4);
}
body #status-message::before {
  content:'';
  flex:none;
  width:20px;
  height:20px;
  background:var(--ui15-notice-symbol) center/contain no-repeat;
  pointer-events:none;
}
body #status-message[data-priority='error'],
body #status-message[data-priority='critical'] {
  --ui15-notice-accent:var(--ui15-notice-error);
  --ui15-notice-symbol:var(--ui15-error-symbol);
  background:linear-gradient(155deg,#3d2b2d,#231f26);
}
body #status-message-dismiss {
  width:48px;
  min-width:48px;
  height:48px;
  min-height:48px;
  padding:8px;
  color:var(--ui15-window-ink);
  border:1px solid transparent;
  border-image:var(--ui15-frame) 16 / 5px / 0 stretch!important;
  border-radius:0;
  background:#263840;
  font-size:24px;
}
body #status-message-dismiss:focus-visible { outline:3px solid #f5d99e; outline-offset:2px; }
/* Language selection and retry overlays keep their established flow, focus trap and handlers. */
body :is(.locale-picker,.locale-storage-notice,.locale-load-retry) {
  color:var(--ui15-window-ink);
  background-color:var(--ui15-window-surface);
}
body .locale-picker-option,
body .locale-load-retry button {
  min-height:48px;
  color:var(--ui15-window-ink);
  background:linear-gradient(150deg,#2a3b44,#192930);
  border:1px solid transparent;
  border-image:var(--ui15-frame) 16 / 5px / 0 stretch!important;
  border-radius:0;
}
body .locale-picker-option[data-suggested] { background:linear-gradient(150deg,#414237,#253239); }
body .locale-picker-option:disabled { color:var(--ui15-window-muted); opacity:1; }
body :is(.locale-picker-option,.locale-load-retry button):focus-visible { outline:3px solid #f5d99e; outline-offset:2px; }
@media(prefers-reduced-motion:reduce) {
  body :is(#detail-dialog,#status-message) { transition:none!important; }
}

/* Keep the native password visibility action as readable as other form buttons. */
body #detail-dialog .password-field button { font-size:14px;line-height:1.35; }
body #detail-dialog .character-view-tabs button { overflow-wrap:anywhere;word-break:normal; }

@media(max-height:440px) and (orientation:landscape) {
  body #detail-dialog #dialog-content-navigation:not([hidden]) { max-height:96px;overflow-y:auto;overscroll-behavior:contain; }
}
@media(max-height:360px) and (orientation:landscape) {
  body #detail-dialog #dialog-content-navigation:not([hidden]) { max-height:56px; }
}
@media(max-width:350px) {
  body .game-viewport[data-layout][data-title-lobby-v15] .lobby-header { gap:4px; }
  body .game-viewport[data-layout][data-title-lobby-v15] .resource-hud { gap:4px; }
}
