/* One shared visual system for the records app and pack simulator. */
body.refined-ui {
  --bg: #f5f5f7;
  --panel: #fff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5e7;
  --nav: #1d1d1f;
  --teal: #0071e3;
  --teal-dark: #0066cc;
  --green: #0071e3;
  --green-dark: #0066cc;
  --blue: #0071e3;
  --blue-soft: #eef5ff;
  --soft: #f5f5f7;
  --soft-green: #eef5ff;
  --soft-amber: #fff8eb;
  --gold: #947342;
  --gold-soft: #faf5eb;
  --red: #b43932;
  --shadow: none;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.refined-ui *, .refined-ui *::before, .refined-ui *::after { box-sizing: border-box; }
.refined-ui [hidden] { display: none !important; }
.refined-ui :is(button, input, select, textarea) { font-family: inherit; }
.refined-ui :is(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid #0071e3;
  outline-offset: 4px;
}
.refined-ui :is(.reveal-modal, .feedback-modal, .rating-player-modal) { z-index: 300; }
.refined-ui :is(button, a, summary) { -webkit-tap-highlight-color: transparent; }
.refined-ui :is(h1, h2, h3, p) { overflow-wrap: anywhere; }
.refined-ui :is(h1, h2, h3) { letter-spacing: -0.035em; }
.refined-ui :is(.app-shell, .workspace) { min-width: 0; }
.refined-ui .skip-link { position: fixed; top: -80px; left: 20px; z-index: 2000; background: #fff; padding: 12px 20px; color: var(--blue); border-radius: 10px; }
.refined-ui .skip-link:focus { top: 8px; }

/* Global navigation: three destinations, then contextual tools. */
body.refined-ui .site-header {
  position: sticky;
  top: 0;
  z-index: 110;
  width: 100%;
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: none;
  backdrop-filter: blur(16px);
}
.site-header-main {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  max-width: 1320px;
  min-height: 64px;
  margin: auto;
  padding: 0 28px;
  gap: 24px;
}
.site-brand { display: inline-flex; align-items: center; gap: 9px; width: max-content; text-decoration: none; color: #1d1d1f; font-size: 17px; font-weight: 600; letter-spacing: -0.04em; white-space: nowrap; }
.site-brand .brand-fc { font-size: 24px; font-weight: 800; letter-spacing: -0.09em; }
.site-brand b { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 5px; letter-spacing: 0; }
.site-navigation { display: flex; align-items: center; justify-content: center; gap: 8px; }
.refined-ui .shell-link { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; color: #515154; font-size: 13px; font-weight: 500; text-decoration: none; border: 0; border-radius: 0; background: none; box-shadow: none; white-space: nowrap; }
.refined-ui .shell-link:hover { color: #0071e3; }
.refined-ui .primary-section { padding: 20px 13px; min-height: 64px; font-size: 14px; cursor: pointer; }
.refined-ui .primary-section.is-current { color: #1d1d1f; font-weight: 650; }
.refined-ui .primary-section.is-current::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #0071e3; margin-right: 7px; }
.site-utilities { display: flex; justify-content: flex-end; align-items: center; gap: 16px; font-size: 12px; }
.shell-account { color: #1d1d1f; text-decoration: none; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 10px 0; }
.shell-more, .shell-settings { position: relative; }
.refined-ui .site-header summary { display: flex; align-items: center; gap: 5px; list-style: none; cursor: pointer; color: #515154; border: 0; background: transparent; box-shadow: none; }
.refined-ui .site-header summary::-webkit-details-marker { display: none; }
.shell-settings > summary { min-height: 44px; }
.shell-more-menu, .shell-settings-menu { position: absolute; right: 0; top: calc(100% + 2px); width: 228px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 36px #00000012; }
.shell-more-menu .shell-link { display: flex; border-radius: 8px; }
.shell-more-menu .shell-link:hover, .shell-more-menu .shell-link.is-current { background: #f5f5f7; color: #0071e3; }
.shell-settings-menu { display: grid; gap: 16px; padding: 20px; }
.shell-settings-menu .language-control { display: grid; gap: 6px; font-size: 12px; color: #515154; min-width: 0; }
.refined-ui .shell-settings-menu :is(button, a) { font: inherit; color: #0071e3; border: 0; background: transparent; padding: 6px 0; text-decoration: none; text-align: left; min-height: 36px; }
.refined-ui .shell-settings-menu :is(.topbar-stats, .user-line) { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; justify-content: flex-start; color: var(--muted); }
.refined-ui .shell-settings-menu :is(.topbar-stats span, .backend-pill) { background: transparent; border: 0; color: var(--muted); padding: 0; font-weight: 400; box-shadow: none; }
.refined-ui .shell-settings-menu :is(#backendStatus, #simBackendStatus) { background: #f5f5f7; border: 0; color: #515154; padding: 8px 10px; border-radius: 8px; line-height: 1.6; text-align: left; }
.refined-ui .shell-settings-menu #backendStatus.is-local { color: #775600; background: #fff8e8; }
.refined-ui .shell-settings-menu #backendStatus.is-cloud { color: #21643b; background: #eff8f1; }
.section-navigation { display: flex; align-items: center; gap: 18px; width: min(1264px, calc(100% - 56px)); margin: 0 auto; min-height: 48px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid #f0f0f2; }
.section-navigation::-webkit-scrollbar { display: none; }
.refined-ui .section-navigation .shell-link { min-height: 48px; padding: 12px 3px; border-bottom: 2px solid transparent; font-size: 12px; }
.refined-ui .section-navigation .shell-link.is-current { color: #0071e3; border-bottom-color: #0071e3; }

/* Content rhythm and quiet surfaces. */
.refined-ui .workspace { width: min(1264px, calc(100% - 56px)); max-width: 1264px; margin: 0 auto; padding: 0 0 72px; }
.refined-ui[data-surface="simulator"] > .app-shell { width: min(1264px, calc(100% - 56px)); padding: 32px 0 72px; gap: 24px; align-content: start; }
.workspace-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 48px 0 34px; }
.intro-eyebrow, .refined-ui .workspace-intro .intro-eyebrow { color: #6e6e73; font-size: 11px; font-weight: 600; line-height: 1.5; letter-spacing: 0.08em; margin: 0 0 12px; }
.workspace-intro h1 { font-size: clamp(32px, 3.4vw, 48px); font-weight: 650; line-height: 1.2; margin: 0 0 14px; color: #1d1d1f; }
.workspace-intro #workspaceDescription { margin: 0; font-size: 16px; color: var(--muted); line-height: 1.65; max-width: 700px; }
.refined-ui .intro-action { color: #0071e3; font-size: 14px; padding-inline: 0; }
.intro-action::after { content: " →"; padding-left: 8px; }
.refined-ui .eyebrow { color: #86868b; font-size: 10px; font-weight: 550; letter-spacing: 0.06em; margin-bottom: 5px; }
.refined-ui :is(.panel, .stats-card, .a-stats-card, .ovr-card, .inventory-panel, .fragment-card, .ticket-panel, .ticket-history-panel, .highlight-panel, .leaderboard-card, .profile-card, .language-gate-card) {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #ebebed;
  border-radius: 20px;
  box-shadow: none;
  backdrop-filter: none;
  padding: 28px;
  min-width: 0;
}
.refined-ui .panel-heading { align-items: center; gap: 18px; margin-bottom: 22px; }
.refined-ui :is(.panel-heading h2, .stats-card h2, .a-stats-card h2, .ovr-card h2) { margin: 0; font-size: 21px; font-weight: 650; color: #1d1d1f; line-height: 1.3; }
.refined-ui .panel h3 { font-size: 17px; font-weight: 600; color: #1d1d1f; }
.refined-ui :is(.form-grid, .profile-form) { gap: 18px 16px; }
.refined-ui :is(label, .field > span, .compact-control) { color: #515154; font-weight: 500; font-size: 13px; }
.refined-ui :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 400;
  box-shadow: none;
  max-width: 100%;
}
.refined-ui input::placeholder, .refined-ui textarea::placeholder { color: #86868b; }
.refined-ui :is(input[type="checkbox"], input[type="radio"]) { accent-color: #0071e3; width: 17px; height: 17px; min-width: 17px; min-height: 17px; padding: 0; flex: 0 0 17px; }
.refined-ui :is(.primary-button, .small-button, .topbar-ticket-button, .share-ticket-button, .feedback-callout-button, .report-feedback-button) {
  background: #0071e3;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: none;
  text-shadow: none;
  font-size: 14px;
  font-weight: 500;
  min-height: 42px;
  padding: 10px 20px;
  transition: background 150ms ease, transform 150ms ease;
}
.refined-ui :is(.primary-button, .small-button, .topbar-ticket-button):hover:not(:disabled) { background: #0077ed; box-shadow: none; }
.refined-ui :is(.ghost-button, .small-button.secondary, .small-button.subtle, .icon-button, .profile-mode-button, .mode-button, .row-action) { background: #f5f5f7; border: 1px solid transparent; color: #515154; border-radius: 999px; min-height: 40px; padding: 9px 16px; font-size: 13px; font-weight: 500; box-shadow: none; text-shadow: none; }
.refined-ui :is(.ghost-button, .small-button.secondary):hover { background: #ebebed; color: #1d1d1f; }
.refined-ui :is(.danger-button, .small-button.danger, .row-action.danger) { background: #fff4f3; border: 1px solid #f3dcd9; color: #b43932; border-radius: 999px; box-shadow: none; font-size: 13px; font-weight: 500; min-height: 40px; padding: 9px 16px; }
.refined-ui button:disabled { opacity: 0.5; cursor: not-allowed; }
.refined-ui .profile-mode-button.active, .refined-ui .mode-button.active { background: #1d1d1f; color: #fff; box-shadow: none; }
.refined-ui :is(.profile-mode-switch, .profile-mode-tabs) { background: #f5f5f7; border: 0; border-radius: 999px; padding: 4px; gap: 4px; }
.refined-ui .profile-mode-hint { color: var(--muted); font-weight: 400; }
.refined-ui :is(.account-session-card, .profile-status, .spend-section) { background: #f5f5f7; border: 0; border-radius: 12px; box-shadow: none; }
.refined-ui .account-view #accountPanel { max-width: 640px; margin: 0 auto; }
.refined-ui .account-view .form-grid { grid-template-columns: 1fr; }
.refined-ui .table-wrap { border: 0; border-radius: 0; }
.refined-ui th { background: #f5f5f7; color: #6e6e73; font-size: 12px; font-weight: 500; padding: 13px 14px; }
.refined-ui td { border-color: #ededee; padding: 14px; font-size: 13px; }
.refined-ui tbody tr:nth-child(even) { background: #fafafa; }
.refined-ui .empty-state { padding: 64px 20px; color: #86868b; font-weight: 400; }

/* Real records and reports get the first-class workspace. */
.refined-ui #entryView.active { display: grid; grid-template-columns: minmax(330px, 0.85fr) minmax(0, 1.35fr); gap: 24px; align-items: start; }
.refined-ui #entryView > .split-grid { display: block; }
.refined-ui #entryView > .table-panel { margin: 0; min-height: 340px; }
.refined-ui #entryView table { min-width: 620px; }
.refined-ui #entryView .panel-heading .eyebrow { display: none; }
.entry-account-notice { background: #f5f5f7; padding: 14px 16px; border-radius: 12px; margin: 0 0 24px; }
.entry-account-notice p { color: #6e6e73; font-size: 12px; margin: 0 0 5px; line-height: 1.6; }
.entry-account-notice a { color: #0066cc; text-decoration: none; font-size: 12px; display: inline-flex; align-items: center; min-height: 28px; }
.refined-ui #recordForm .primary-button { margin-top: 6px; }
.refined-ui #reportView.active { display: grid; gap: 20px; }
.refined-ui #reportView > .panel { margin: 0; }
.refined-ui #reportView > .panel > .panel-heading .eyebrow { display: none; }
.refined-ui .metric-grid { gap: 0; background: #f5f5f7; border-radius: 16px; padding: 24px 8px; margin: 0 0 30px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.refined-ui .metric { border: 0; border-right: 1px solid #dedee2; border-radius: 0; box-shadow: none; padding: 0 22px; background: transparent; min-height: 112px; }
.refined-ui .metric:last-child { border-right: 0; }
.refined-ui .metric > span { font-size: 13px; font-weight: 500; color: #6e6e73; }
.refined-ui .metric strong { color: #1d1d1f; font-size: clamp(30px, 3.6vw, 44px); font-weight: 650; letter-spacing: -0.045em; }
.refined-ui .metric:first-child strong { color: #0071e3; }
.refined-ui .metric small { color: #6e6e73; font-weight: 400; font-size: 12px; }
.refined-ui :is(.verdict-box, .money-list, .formula-card, .distribution-panel, .interruption-panel) { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.refined-ui .verdict-box { padding: 0; color: #515154; }
.refined-ui .report-grid { gap: 40px; margin-bottom: 28px; }
.refined-ui .money-list > div { border-color: #e5e5e7; }
.refined-ui .analysis-disclosure { background: #fff; border: 1px solid #ebebed; border-radius: 16px; overflow: hidden; }
.refined-ui .analysis-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; min-height: 64px; font-size: 16px; font-weight: 550; cursor: pointer; list-style: none; }
.analysis-disclosure > summary::-webkit-details-marker { display: none; }
.analysis-disclosure > summary::after { content: "+"; color: #86868b; font-size: 22px; font-weight: 300; }
.analysis-disclosure[open] > summary::after { content: "−"; }
.refined-ui .analysis-disclosure > .panel { border: 0; margin: 0; padding-top: 10px; border-radius: 0; }
.refined-ui .analysis-disclosure > .interruption-panel { margin: 0; padding: 0 24px 24px; }
.refined-ui .analysis-disclosure > .interruption-panel > .interruption-heading > div:first-child { display: none; }
.refined-ui .extra-code-panel { background: #f5f5f7; box-shadow: none; border: 0; border-radius: 12px; margin: 24px 0; }
.refined-ui[data-record-source="real"] #reportView .extra-code-panel { display: none; }

/* Squad cards retain football context; the surrounding controls stay neutral. */
.refined-ui .team-rating-panel > .panel-heading { display: block; }
.refined-ui .team-rating-panel > .panel-heading > div:first-child { flex: 1 1 280px; }
.refined-ui .team-rating-panel > .panel-heading .eyebrow { display: none; }
.refined-ui .rating-actions { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 12px; min-width: 0; width: 100%; margin-top: 20px; }
.refined-ui .rating-actions .compact-control { display: grid; gap: 6px; flex: 1 1 180px; min-width: 0; }
.refined-ui .rating-actions .compact-control select { width: 100%; }
.refined-ui .badge-toggle { white-space: nowrap; font-size: 11px; padding: 8px; gap: 4px; }
.refined-ui .rating-badge-control { flex: 1 1 280px; flex-direction: row; }
.refined-ui .rating-badge-title { color: #6e6e73; font-weight: 500; }
.refined-ui .team-rating-hint { color: var(--muted); font-size: 12px; line-height: 1.65; font-weight: 400; }
.refined-ui .team-rating-summary { background: #f5f5f7; color: #1d1d1f; border: 0; border-radius: 16px; box-shadow: none; padding: 26px; }
.refined-ui .team-rating-total { background: transparent; border: 0; box-shadow: none; color: #1d1d1f; }
.refined-ui .team-rating-total strong { color: #0071e3; font-weight: 650; letter-spacing: -0.05em; }
.refined-ui :is(.team-rating-total small, .team-rating-total span, .team-rating-metrics span) { color: #6e6e73; font-weight: 400; }
.refined-ui .team-rating-metrics > div { background: transparent; border: 0; box-shadow: none; }
.refined-ui .team-rating-metrics strong { color: #1d1d1f; font-weight: 600; }
.refined-ui .rating-upgrade-panel { background: #eef5ff; border: 0; border-radius: 12px; padding: 20px; box-shadow: none; }
.refined-ui .rating-badge-control { background: transparent; border: 0; padding: 0; }
.refined-ui .badge-toggle { background: #f5f5f7; border-color: transparent; border-radius: 8px; }
.refined-ui :is(.player-ranking-add-card, .player-ranking-version-card, .expert-access-panel, .rating-save-prompt) { background: #f5f5f7; border: 0; box-shadow: none; color: #515154; }
.refined-ui :is(.player-ranking-mode-button, .expert-mode-button, .player-ranking-position-button) { box-shadow: none; border-radius: 999px; font-weight: 500; }
.refined-ui :is(.player-ranking-mode-button.active, .expert-mode-button.active, .player-ranking-position-button.active) { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }
.refined-ui .rating-starter-list { box-shadow: none; border-radius: 16px; }
.refined-ui .rating-player-card { box-shadow: none; }
.refined-ui .rating-line-label { background: #edf2f8; color: #515154; }
.refined-ui .rating-player-avatar { background: #f5f5f7; color: #6e6e73; }
.refined-ui .player-ranking-ovr { background: #1d1d1f; color: #fff; }
.refined-ui .rating-player-modal-panel { border-radius: 20px; background: #fff; box-shadow: 0 24px 80px #00000026; }

/* The selected pool is the visual hero. Card images carry the colour. */
.refined-ui .draw-page { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 24px; align-items: start; }
.refined-ui .featured-pool { display: grid; grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.2fr); align-items: center; gap: 32px; background: #fff; border: 0; border-radius: 22px; padding: 38px 40px; min-height: 340px; overflow: hidden; order: 0; }
.featured-copy h1 { margin: 0 0 16px; font-size: clamp(30px, 3.3vw, 44px); font-weight: 650; line-height: 1.15; letter-spacing: -0.045em; }
.featured-description { color: #6e6e73; font-size: 14px; margin: 0 0 12px; line-height: 1.65; }
.featured-copy .text-action { display: inline-flex; align-items: center; min-height: 44px; border: 0; padding: 8px 0; background: none; color: #0071e3; font-size: 14px; font-weight: 500; text-align: left; }
.featured-copy .featured-note { color: #86868b; font-size: 11px; margin: 12px 0 0; }
.featured-players { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 16px; min-width: 0; }
.featured-player { margin: 0; min-width: 0; text-align: center; }
.featured-player-art { position: relative; height: 222px; display: grid; place-items: center; isolation: isolate; }
.featured-player-art img { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; border-radius: 8px; }
.featured-player-art:has(img:not([hidden])) .featured-player-fallback { visibility: hidden; }
.featured-player-fallback { position: absolute; inset: 12px 8px; display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 16px; background: #f5f5f7; font-size: 26px; font-weight: 600; color: #86868b; }
.featured-player-fallback b { color: #1d1d1f; font-size: 44px; }
.featured-player figcaption { margin-top: 14px; display: grid; gap: 4px; }
.featured-player figcaption strong { color: #1d1d1f; font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.featured-player figcaption span { color: #6e6e73; font-size: 11px; }

/* Draw controls precede results and never move below promotional content. */
.refined-ui .sim-panel { display: flex; flex-direction: column; gap: 20px; padding: 0; min-height: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; order: 1; }
.draw-console { background: #fff; border: 1px solid #ebebed; border-radius: 20px; padding: 28px; display: grid; gap: 22px; }
.refined-ui .sim-panel .topbar { position: static; display: flex; align-items: center; justify-content: space-between; color: #1d1d1f; padding: 0; background: transparent; border: 0; margin: 0; gap: 12px; box-shadow: none; }
.refined-ui .sim-panel .topbar h2 { color: #1d1d1f; font-size: 21px; font-weight: 650; margin: 0; }
.refined-ui .sim-panel .topbar .eyebrow { display: none; }
.refined-ui .sim-panel .topbar-actions { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 14px; }
.refined-ui .ticket-balance-pill { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; min-width: 0; text-align: right; }
.refined-ui .ticket-balance-pill span { color: #6e6e73; font-size: 11px; font-weight: 400; }
.refined-ui .ticket-balance-pill strong { color: #1d1d1f; font-size: 24px; font-weight: 650; }
.refined-ui .ticket-balance-pill small { font-size: 10px; color: #86868b; font-weight: 400; }
.refined-ui .topbar-ticket-button { min-height: 36px; padding: 7px 15px; font-size: 12px; width: auto; flex: none; }
.refined-ui .control-band { border: 0; border-radius: 0; background: transparent; padding: 0; margin: 0; box-shadow: none; gap: 12px; grid-template-columns: 0.7fr 1.3fr 1fr; }
.refined-ui .control-band > .field { grid-column: auto; min-width: 0; align-content: start; }
.refined-ui .pool-summary { color: #86868b; font-size: 10px; font-weight: 400; line-height: 1.5; }
.refined-ui .guarantee-stack { display: grid; gap: 12px; grid-template-columns: 1.1fr 1fr; }
.refined-ui :is(.pity-card, .minor-pity-row > span) { border: 0; background: #f5f5f7; border-radius: 12px; box-shadow: none; }
.refined-ui .pity-card { padding: 16px 18px; }
.refined-ui .pity-main { align-items: center; }
.refined-ui :is(.pity-main span, .minor-pity-row strong) { color: #515154; font-size: 12px; font-weight: 500; }
.refined-ui :is(.pity-main strong, .minor-pity-row > span) { color: #1d1d1f; font-size: 26px; font-weight: 650; line-height: 1.2; padding: 0; }
.refined-ui .pity-card p { color: #6e6e73; font-size: 11px; font-weight: 400; margin-bottom: 0; }
.refined-ui .pity-track { height: 4px; background: #dedee2; box-shadow: none; }
.refined-ui .pity-fill { background: #0071e3; box-shadow: none; }
.refined-ui .pity-fill.bplus-fill { background: #86868b; }
.refined-ui .draw-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.refined-ui .draw-button { min-height: 52px; border: 1px solid #d2d2d7; border-radius: 999px; color: #0066cc; background: #fff; box-shadow: none; text-shadow: none; font-size: 17px; font-weight: 550; padding: 12px 24px; }
.refined-ui .draw-button::before { display: none; }
.refined-ui .draw-button.primary { background: #0071e3; color: #fff; border-color: #0071e3; box-shadow: none; text-shadow: none; }
.refined-ui .draw-button:hover:not(:disabled) { transform: none; box-shadow: none; border-color: #0071e3; background: #f5f9ff; }
.refined-ui .draw-button.primary:hover:not(:disabled) { background: #0077ed; color: #fff; }
.refined-ui .draw-button:active:not(:disabled) { transform: scale(0.985); }
.refined-ui .result-stage { background: #fff; border: 1px solid #ebebed; border-radius: 20px; padding: 24px; box-shadow: none; }
.result-heading { font-size: 15px; font-weight: 600; margin: 0 0 18px; }
.refined-ui .latest-result { background: #f5f5f7; border: 0; box-shadow: none; border-radius: 12px; padding: 20px; }
.refined-ui .latest-result.empty { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.refined-ui .latest-result.empty strong { font-size: 20px; font-weight: 550; color: #515154; }
.refined-ui .latest-result.empty :is(span, small) { color: #86868b; font-size: 12px; font-weight: 400; }
.refined-ui .run-report { border: 0; box-shadow: none; background: #f5f5f7; border-radius: 12px; }
.refined-ui .draw-grid { gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 16px; }
.refined-ui .draw-tile { background: #fff; border: 1px solid #e5e5e7; border-radius: 12px; box-shadow: none; padding: 12px; min-width: 0; }
.refined-ui .draw-tile.tier-A { background: #fbf8f0; border-color: #d7c8a4; }
.refined-ui .draw-tile.tier-B { background: #f1f6fc; border-color: #cadcf0; }
.refined-ui .draw-tile > strong { color: #1d1d1f; font-size: 30px; font-weight: 650; }
.refined-ui .draw-tile :is(span, p) { font-size: 11px; color: #6e6e73; }
.refined-ui .draw-tile button { font-size: 11px; font-weight: 500; min-height: 36px; box-shadow: none; border-radius: 999px; padding: 7px; }
.refined-ui .draw-grid:empty { display: none; }
.refined-ui :is(.tile, .devil-tile) { box-shadow: none; }
.refined-ui .right-stack { gap: 20px; order: 2; }
.refined-ui .right-stack > section { padding: 22px; }
.refined-ui .right-stack h2 { font-size: 17px; }
.refined-ui .right-stack .eyebrow { display: none; }
.refined-ui .stats-grid { gap: 0 16px; margin-top: 16px; }
.refined-ui .stats-grid > div { background: transparent; border: 0; border-bottom: 1px solid #ededee; border-radius: 0; padding: 12px 0; box-shadow: none; }
.refined-ui .stats-grid span { color: #6e6e73; font-size: 11px; font-weight: 400; }
.refined-ui .stats-grid strong { color: #1d1d1f; font-weight: 600; font-size: 24px; }
.session-report-link { display: inline-flex; min-height: 36px; align-items: center; margin-top: 8px; color: #0071e3; font-size: 12px; text-decoration: none; }
.refined-ui .score-item { background: #f5f5f7; border: 0; border-radius: 8px; box-shadow: none; }
.refined-ui .score-item span { color: #6e6e73; }
.refined-ui .score-item strong { color: #1d1d1f; font-weight: 600; }

/* Supporting content stays available, with a clear place to open it. */
.refined-ui :is(.draw-extras, .pool-details, .spend-details) { background: #fff; border: 1px solid #ebebed; border-radius: 16px; overflow: hidden; box-shadow: none; }
.refined-ui :is(.draw-extras, .pool-details) > summary { padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 550; }
.refined-ui :is(.draw-extras, .pool-details) > summary::-webkit-details-marker { display: none; }
.refined-ui :is(.draw-extras, .pool-details) > summary::after { content: "+"; margin-left: auto; font-size: 22px; font-weight: 300; color: #86868b; }
.refined-ui :is(.draw-extras, .pool-details)[open] > summary::after { content: "−"; }
.refined-ui :is(.draw-extras, .pool-details) > summary small { color: #86868b; font-size: 11px; font-weight: 400; }
.draw-extras-body { display: grid; gap: 0; padding: 0 24px 16px; }
.refined-ui .draw-extras-body > section { background: transparent; border: 0; border-bottom: 1px solid #ededee; border-radius: 0; padding: 18px 0; box-shadow: none; }
.refined-ui .draw-extras-body > section:last-child { border-bottom: 0; }
.refined-ui .draw-extras-body :is(strong, span, small) { color: #515154; font-weight: 400; }
.refined-ui .draw-extras-body :is(.devil-entry-callout::before, .devil-entry-callout::after) { display: none; }
.refined-ui .devil-entry-button { background: #f5f5f7; border: 0; border-radius: 999px; color: #515154; box-shadow: none; text-shadow: none; font-size: 13px; font-weight: 500; }
.refined-ui .real-entry-link { color: #0071e3; font-weight: 500; }
.refined-ui .spend-details summary { padding: 18px 24px; min-height: 64px; }
.refined-ui .spend-summary-copy strong { color: #515154; font-size: 14px; font-weight: 500; }
.refined-ui .spend-summary-copy small, .refined-ui .spend-summary-value { font-size: 11px; color: #86868b; font-weight: 400; }
.refined-ui .spend-banner { background: #f5f5f7; border: 0; border-radius: 0; box-shadow: none; color: #515154; }
.refined-ui .spend-metric { background: #fff; border: 0; box-shadow: none; border-radius: 12px; }
.refined-ui .pool-details { scroll-margin-top: 132px; order: 3; }
.full-pool-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 28px; padding: 8px 28px 28px; }
.refined-ui :is(.full-pool-layout .pool-card, .full-pool-layout .rules-card) { background: transparent; border: 0; padding: 0; box-shadow: none; }
.refined-ui .full-pool-layout .pool-players { max-height: 560px; overflow-y: auto; }
.refined-ui .full-pool-layout h2 { font-size: 17px; }
.refined-ui .player-row { border: 0; border-bottom: 1px solid #ededee; border-radius: 0; background: transparent; padding: 10px 0; }
.refined-ui .player-row span { font-size: 13px; font-weight: 400; color: #515154; }
.refined-ui .pool-subtitle { font-size: 11px; font-weight: 600; color: #86868b; margin-top: 16px; }
.refined-ui .rule-strip > div { background: #f5f5f7; border: 0; border-radius: 10px; }
.refined-ui .highlight-hero { background: transparent; color: #1d1d1f; border: 0; box-shadow: none; }
.refined-ui .highlight-hero h2 { color: #1d1d1f; font-size: 34px; }
.refined-ui .highlight-pull-panel { background: #f5f5f7; border: 0; border-radius: 14px; box-shadow: none; }
.refined-ui :is(.devil-ticket-balance, .highlight-ticket-balance) { background: #f5f5f7; border: 0; border-radius: 12px; box-shadow: none; color: #1d1d1f; padding: 16px 20px; }
.refined-ui :is(.devil-ticket-balance, .highlight-ticket-balance) strong { color: #1d1d1f; font-size: 32px; font-weight: 650; text-shadow: none; }
.refined-ui :is(.devil-ticket-balance, .highlight-ticket-balance) :is(span, small) { color: #6e6e73; font-weight: 400; }
.refined-ui :is(.ticket-card, .daily-ticket-card, .redeem-ticket-card, .developer-ticket-card, .poem-ticket-card) { background: #f5f5f7; border: 0; border-radius: 14px; box-shadow: none; color: #1d1d1f; padding: 22px; }
.refined-ui .ticket-card p { font-weight: 400; color: #6e6e73; font-size: 13px; }
.refined-ui .ticket-card h3 { font-size: 17px; font-weight: 600; }
.refined-ui .ticket-summary-grid > div { background: #f5f5f7; border: 0; border-radius: 12px; box-shadow: none; }
.refined-ui .ticket-summary-grid strong { color: #1d1d1f; font-size: 28px; font-weight: 600; }
.refined-ui .ticket-summary-grid span { color: #6e6e73; font-size: 12px; font-weight: 400; }
.refined-ui .devil-stats-grid > div { background: #f5f5f7; border: 0; border-radius: 12px; box-shadow: none; }
.refined-ui .devil-stats-grid strong { color: #1d1d1f; font-weight: 600; }
.refined-ui .devil-stats-grid span { color: #6e6e73; font-weight: 400; }
.refined-ui.devil-mode-active { background: #f5f5f7; color: #1d1d1f; }
.refined-ui .devil-panel { background: #fff; border: 1px solid #ebebed; border-radius: 20px; padding: 28px; box-shadow: none; color: #1d1d1f; }
.refined-ui .devil-hero { background: transparent; }
.refined-ui .devil-hero h2 { color: #1d1d1f; font-weight: 650; }
.refined-ui .devil-hero p { color: #6e6e73; font-weight: 400; font-size: 13px; }
.refined-ui .devil-visual-banner { max-height: 180px; border-radius: 12px; margin-bottom: 24px; box-shadow: none; }
.refined-ui .devil-visual-banner img { object-fit: cover; width: 100%; max-height: 180px; }
.refined-ui .spending-hero { background: #1d1d1f; box-shadow: none; border: 0; }
.refined-ui .spending-privacy-badge { background: #ffffff0f; border: 0; }
.refined-ui .mobile-back-to-top { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 100; background: #1d1d1f; border: 0; border-radius: 999px; color: #fff; min-height: 44px; padding: 10px 16px; font-size: 12px; box-shadow: 0 4px 14px #00000012; }

@media (min-width: 1440px) {
  .featured-player-art { height: 240px; }
}
@media (max-width: 1100px) {
  .site-header-main { grid-template-columns: auto 1fr auto; padding-inline: 24px; gap: 12px; }
  .site-navigation { gap: 0; }
  .refined-ui .primary-section { padding-inline: 10px; }
  .section-navigation { margin-inline: 28px; gap: 16px; }
  .refined-ui .draw-page { grid-template-columns: minmax(0, 1fr) 250px; }
  .refined-ui .featured-pool { padding: 30px; gap: 24px; grid-template-columns: 0.85fr 1.15fr; }
  .featured-player-art { height: 186px; }
  .featured-players { gap: 10px; }
  .refined-ui .control-band { grid-template-columns: 1fr 1fr; }
  .refined-ui .control-band .era-field { grid-column: 1 / -1; }
  .refined-ui .control-band .era-field select { max-width: 220px; }
  .refined-ui .guarantee-stack { grid-template-columns: 1fr; }
  .refined-ui #entryView.active { grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .site-header-main { grid-template-columns: 1fr auto; min-height: 56px; padding: 0 22px; gap: 0 20px; }
  .site-brand { grid-row: 1; min-height: 56px; }
  .site-utilities { grid-row: 1; grid-column: 2; }
  .site-navigation { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; gap: 16px; }
  .refined-ui .primary-section { min-height: 44px; padding: 10px 0; font-size: 13px; }
  .section-navigation { margin-inline: 22px; }
  .refined-ui .workspace { width: calc(100% - 40px); }
  .refined-ui[data-surface="simulator"] > .app-shell { width: calc(100% - 40px); padding-top: 24px; }
  .refined-ui .draw-page { grid-template-columns: 1fr; }
  .refined-ui .draw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .refined-ui .right-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .refined-ui .right-stack > section { padding: 18px; }
  .refined-ui .right-stack .stats-grid { grid-template-columns: 1fr; }
  .refined-ui .featured-pool { grid-template-columns: 1fr 1.1fr; }
  .featured-player-art { height: 166px; }
  .refined-ui #entryView.active { grid-template-columns: 1fr; }
  .refined-ui #entryView .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .refined-ui .guarantee-stack { grid-template-columns: 1fr 1fr; }
  .refined-ui .control-band { grid-template-columns: 0.7fr 1.3fr 1fr; }
  .refined-ui .control-band .era-field { grid-column: auto; }
  .refined-ui .metric { padding-inline: 16px; }
}
@media (max-width: 560px) {
  body.refined-ui { font-size: 14px; }
  .site-header-main { padding-inline: 18px; }
  .site-brand { font-size: 15px; }
  .site-brand .brand-fc { font-size: 22px; }
  .site-brand b { font-size: 11px; }
  .site-utilities { gap: 14px; font-size: 11px; }
  .site-navigation { justify-content: space-between; gap: 8px; }
  .refined-ui .primary-section { font-size: 12px; }
  .refined-ui .primary-section.is-current::before { width: 4px; height: 4px; margin-right: 4px; }
  .section-navigation { margin-inline: 18px; gap: 18px; min-height: 44px; }
  .refined-ui .section-navigation .shell-link { min-height: 44px; font-size: 11px; }
  .shell-more-menu { width: 208px; }
  .refined-ui .workspace { width: calc(100% - 32px); padding-bottom: 48px; }
  .refined-ui[data-surface="simulator"] > .app-shell { width: calc(100% - 32px); padding-top: 16px; gap: 16px; }
  .workspace-intro { display: block; padding: 32px 4px 24px; }
  .workspace-intro h1 { font-size: 30px; line-height: 1.25; margin-bottom: 12px; }
  .workspace-intro #workspaceDescription { font-size: 14px; }
  .workspace-intro #workspaceAction:not(:empty) { margin-top: 12px; }
  .refined-ui :is(.panel, .inventory-panel, .fragment-card, .ticket-panel, .ticket-history-panel, .highlight-panel, .leaderboard-card, .profile-card, .language-gate-card) { padding: 20px; border-radius: 16px; }
  .refined-ui .panel-heading { align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .refined-ui .panel-heading h2 { font-size: 19px; }
  .refined-ui .panel-heading .button-row { width: auto; }
  .refined-ui :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: 16px; min-height: 46px; }
  .refined-ui .form-grid { gap: 16px 12px; }
  .refined-ui #entryView.active { gap: 16px; }
  .refined-ui #entryView > .table-panel { min-height: 240px; }
  .entry-account-notice { margin-bottom: 20px; }
  .refined-ui .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; gap: 0; border-radius: 12px; }
  .refined-ui .metric { min-height: 124px; padding: 16px; border: 0; }
  .refined-ui .metric:nth-child(odd) { border-right: 1px solid #e5e5e7; }
  .refined-ui .metric:nth-child(-n+2) { border-bottom: 1px solid #e5e5e7; }
  .refined-ui .metric strong { font-size: 32px; }
  .refined-ui .report-grid { gap: 20px; grid-template-columns: 1fr; }
  .refined-ui .analysis-disclosure > summary { padding: 18px 20px; font-size: 14px; }
  .refined-ui .analysis-disclosure > .interruption-panel { padding: 0 16px 18px; }
  .refined-ui .rating-actions { flex-basis: 100%; justify-content: flex-start; }
  .refined-ui .team-rating-summary { padding: 20px; }
  .refined-ui .featured-pool { grid-template-columns: 1fr; gap: 18px; padding: 24px 20px; border-radius: 16px; min-height: 0; }
  .featured-copy h1 { font-size: 28px; margin-bottom: 9px; line-height: 1.15; }
  .featured-copy .intro-eyebrow { margin-bottom: 10px; font-size: 10px; }
  .featured-description { font-size: 12px; margin-bottom: 0; }
  .featured-copy .text-action { font-size: 12px; min-height: 36px; }
  .featured-copy .featured-note { margin-top: 3px; font-size: 10px; }
  .featured-players { gap: 10px; }
  .featured-player-art { height: 136px; }
  .featured-player figcaption { margin-top: 8px; gap: 3px; }
  .featured-player figcaption strong { font-size: 11px; }
  .featured-player figcaption span { font-size: 10px; }
  .featured-player-fallback { inset: 4px; font-size: 18px; }
  .featured-player-fallback b { font-size: 32px; }
  .refined-ui .draw-page { gap: 16px; }
  .draw-console { padding: 20px; gap: 20px; border-radius: 16px; }
  .refined-ui .sim-panel .topbar { flex-direction: row; align-items: center; }
  .refined-ui .sim-panel .topbar h2 { font-size: 18px; }
  .refined-ui .sim-panel .topbar-actions { width: auto; gap: 10px; }
  .refined-ui .ticket-balance-pill { width: auto; }
  .refined-ui .ticket-balance-pill strong { font-size: 22px; }
  .refined-ui .ticket-balance-pill small { font-size: 9px; }
  .refined-ui .topbar-ticket-button { padding-inline: 13px; }
  .refined-ui .control-band { grid-template-columns: 1fr 1fr; gap: 12px; }
  .refined-ui .control-band .era-field { grid-column: 1 / -1; }
  .refined-ui .control-band .era-field select { max-width: none; }
  .refined-ui .control-band .activity-field { grid-column: 1 / -1; }
  .refined-ui .control-band .group-field { grid-column: 1 / -1; }
  .refined-ui .pool-summary { font-size: 10px; }
  .refined-ui .draw-console .pool-summary { display: none; }
  .refined-ui .guarantee-stack { grid-template-columns: 1fr; gap: 10px; }
  .refined-ui .pity-card { padding: 14px 16px; }
  .refined-ui .draw-button { font-size: 16px; padding-inline: 16px; }
  .refined-ui .result-stage { padding: 18px; border-radius: 16px; }
  .refined-ui .draw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .refined-ui .latest-result.empty strong { font-size: 17px; }
  .refined-ui .right-stack { grid-template-columns: 1fr; gap: 16px; }
  .refined-ui .right-stack .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .refined-ui .draw-extras-body > section { flex-wrap: wrap; gap: 12px; }
  .refined-ui :is(.draw-extras, .pool-details) > summary { padding: 18px 20px; gap: 6px; font-size: 14px; }
  .refined-ui :is(.draw-extras, .pool-details) > summary small { flex: 1 1 100%; order: 2; }
  .draw-extras-body { padding-inline: 20px; }
  .full-pool-layout { grid-template-columns: 1fr; padding: 0 20px 24px; gap: 28px; }
  .pool-details { scroll-margin-top: 156px; }
  .refined-ui .spend-details summary { padding: 16px 20px; }
  .refined-ui .inventory-page, .refined-ui .ticket-page { grid-template-columns: 1fr; }
  .refined-ui :is(.ticket-summary-grid, .devil-stats-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .refined-ui .highlight-hero h2 { font-size: 28px; }
  .refined-ui .devil-panel { padding: 20px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .refined-ui *, .refined-ui *::before, .refined-ui *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
