/* Scoped beta corrections. Keep existing fonts, colours and service artwork. */
.create-reference .leg-box { padding: 16px !important; }
.create-reference .leg-hd { text-align: center; margin-bottom: 12px; }
.create-reference .leg-row { display: grid !important; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 12px !important; padding: 10px 0 !important; min-height: 44px; }
.create-reference .leg-row > span:last-child { text-align: center; line-height: 1.5; overflow-wrap: anywhere; }
.ml-hicon { display: inline-block; flex: 0 0 auto; width: var(--ml-icon-size,22px); height: var(--ml-icon-size,22px); background-color: currentColor; mask: var(--ml-hicon) center/contain no-repeat; -webkit-mask: var(--ml-hicon) center/contain no-repeat; vertical-align: middle; }
.ml-hicon::before { content: none !important; }
svg.ml-hicon > * { visibility: hidden !important; }
.ml-model-combo { position: relative; min-width: 160px; }
.ml-model-combo .ml-model-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ml-model-current { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; color: #f6f0e6; border: 1px solid #44473d; border-radius: 7px; background: #111510 url('/media/textures/matte-noise.png'); background-blend-mode: soft-light; font: inherit; text-align: left; cursor: pointer; }
.ml-model-current::after { content: '⌄'; color: #b9f45f; }
.ml-model-current:focus-visible, .ml-model-options button:focus-visible { outline: 1px solid #b9f45f; outline-offset: -2px; }
.ml-model-options { position: absolute; bottom: calc(100% + 8px); right: 0; z-index: 100; width: max(100%,240px); max-width: calc(100vw - 48px); max-height: min(300px,50dvh); overflow-y: auto; padding: 5px; border: 1px solid #51594a; border-radius: 8px; background: #0c100b url('/media/textures/matte-noise.png'); background-blend-mode: soft-light; box-shadow: 0 14px 45px #000a; }
.ml-model-options[hidden] { display: none; }
.ml-model-options button { display: block; width: 100%; padding: 10px; border: 0; border-radius: 5px; background: transparent; color: #d9dfd2; font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.ml-model-options button:is(:hover,[aria-selected="true"]) { color: #b9f45f; background: #233118 url('/media/textures/matte-noise.png'); background-blend-mode: soft-light; }
body.of-body.of-body input[type="checkbox"]:not([hidden]):not(.of-switch input):not(.of-provider-toggle input) {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-block;
  flex: 0 0 18px;
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  margin: 0;
  border: 1px solid #6a7061 !important;
  border-radius: 4px !important;
  background: #121610 url('/media/textures/matte-noise.png') !important;
  background-blend-mode: soft-light;
  vertical-align: middle;
  cursor: pointer;
}
body.of-body.of-body input[type="checkbox"]:checked:not([hidden]):not(.of-switch input):not(.of-provider-toggle input) {
  border-color: #b9f45f !important;
  background: #b9f45f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m4 9 3 3 7-7' fill='none' stroke='%2311160c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px 18px no-repeat !important;
}
body.of-body input[type="checkbox"]:focus-visible { outline: 2px solid #b9f45f; outline-offset: 3px; }
body.of-body input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
body.of-body .urgent-ticket { align-items: start; padding: 10px 12px; gap: 10px; }
body.of-body .urgent-ticket > input { margin-top: 0 !important; }
body.of-body .urgent-ticket > span { margin: 0; }
body.of-body .urgent-ticket strong { display: block; line-height: 18px; margin: 0 !important; }
body.of-body .fm-drop-zone { width: 100%; min-height: 108px; box-sizing: border-box; }
body.of-body .km-power-status .km-status { display: inline-flex !important; visibility: visible !important; opacity: 1 !important; min-height: 24px; font-size: 14px !important; line-height: 1.35 !important; }
body.of-body .km-power-status .km-status { color: #090b08 !important; background: #ffd166 url('/media/textures/matte-noise.png') !important; background-blend-mode: soft-light !important; padding: 5px 9px; border-radius: 4px; isolation: isolate; }
body.of-body .km-power-status .km-status.online { background-color: #baff55 !important; }
body.of-body .km-power-status .km-status.offline { background-color: #ff8f86 !important; }
.legal-update-backdrop { overflow-y: auto; overscroll-behavior: contain; }
.legal-update-backdrop .legal-update-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; min-height: 0; box-sizing: border-box; -webkit-overflow-scrolling: touch; }
.legal-update-dialog form { padding-bottom: env(safe-area-inset-bottom, 0px); }
.of-mobile-bug { display: none; }
.ml-three-ready:not(.ml-three-failed) .ml-three-host > .ml-walk-canvas { display: block !important; opacity: 1 !important; position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.ml-three-ready:not(.ml-three-failed) .ml-skin-sprite { display: none !important; }
.ml-character-grid button { border: 1px solid #46543b !important; border-radius: 7px; background: #11170e url('/media/textures/matte-noise.png') !important; background-blend-mode: soft-light !important; }
.ml-character-grid button.active { border-color: #b9f45f !important; background-color: #1d2a13 !important; box-shadow: none !important; }
.ml-knowledge-shortcuts { display: grid; gap: 6px; }
.ml-knowledge-shortcuts > a { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; padding: 9px 10px; border: 1px solid #36422e; background: #10170d url('/media/textures/matte-noise.png'); background-blend-mode: soft-light; }
.ml-knowledge-shortcuts > a[hidden] { display: none !important; }
.ml-knowledge-search { display: grid; gap: 7px; font-size: 11px; }
.ml-knowledge-search input { width: 100%; box-sizing: border-box; padding: 10px; color: #f6f0e6; border: 1px solid #45583a; border-radius: 6px; background: #0c1109; }
.ml-knowledge-count { margin: 9px 0; font-size: 10px; color: #a9b79d; }
.ml-companion-panel:has([data-pane="game"]:not([hidden])) { resize: none !important; width: min(590px,calc(100vw - 28px)) !important; min-width: min(590px,calc(100vw - 28px)) !important; height: auto !important; min-height: 0 !important; }
.ml-companion-panel:has([data-pane="game"]:not([hidden])) [data-resize] { display: none !important; }
.ml-game-wrap { aspect-ratio: 16/9; flex: none; }
.ml-game-wrap .ml-game { width: 100%; height: 100%; object-fit: contain; }
.ml-companion-panel .ml-companion-body { height: auto; min-height: 0; max-height: 100%; overflow-y: auto; }
html.streamer-mode .km-specs strong,
html.streamer-mode .km-stats,
html.streamer-mode .km-network-live,
html.streamer-mode .of-server-specs,
html.streamer-mode .of-server-meta,
html.streamer-mode .km-specs [data-copy],
html.streamer-mode .km-stat-head b,
html.streamer-mode .km-path,
html.streamer-mode .km-copy,
html.streamer-mode [data-server-identifier],
html.streamer-mode .km-terminal,
html.streamer-mode #terminal { visibility: hidden !important; }
@media (max-width: 760px) {
  body.of-body .of-mobile-header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; height: auto; min-height: 58px; padding: 8px 10px; }
  body.of-body .of-mobile-header .of-logo { display: none; }
  body.of-body .of-mobile-header .of-button { min-width: 0; padding: 8px 10px; white-space: nowrap; font-size: 11px; }
  body.of-body .of-mobile-header form { margin: 0 0 0 auto; }
  body.of-body .of-mobile-bug { display: inline-flex; }
  body.of-body .minely-bug-open { display: none; }
  body.of-body .of-shell, body.of-body .of-main-shell, body.of-body main, body.of-body .author-balance-page, body.of-body .of-grid-2 > * { min-width: 0; max-width: 100%; }
  body.of-body .author-balance-page .of-card { min-width: 0; overflow: hidden; }
  body.of-body .author-balance-page > .of-grid-2 { grid-template-columns: minmax(0,1fr) !important; }
  body.of-body .author-balance-page table { min-width: 550px; }
  body.of-body .author-balance-page .of-table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .legal-update-backdrop .legal-update-dialog { padding: 16px; max-height: calc(100dvh - 24px); }
  .legal-update-backdrop .legal-update-dialog h2 { font-size: 20px; }
  .legal-update-backdrop .legal-update-links { margin: 12px 0; }
  .legal-update-backdrop .legal-update-links a { overflow-wrap: anywhere; padding: 8px; }
}
@media (max-width: 640px) {
  .ml-companion-panel:not(.is-expanded) { position: fixed !important; inset: auto 7px calc(126px + env(safe-area-inset-bottom,0px)) 7px !important; width: calc(100vw - 14px) !important; min-width: 0 !important; height: auto !important; min-height: 0 !important; max-width: calc(100vw - 14px) !important; max-height: calc(100dvh - 146px) !important; }
  .ml-companion-tabs { overflow-x: hidden !important; gap: 6px; padding: 8px 10px; }
  .ml-companion .ml-companion-tabs button { flex: 1 1 0 !important; min-width: 0; padding: 8px 4px !important; font-size: 11px !important; white-space: normal !important; overflow-wrap: anywhere; }
}
