html, body { margin: 0; background: #0d0b0a; }
#flame-ore-view[hidden] { display: none !important; }
body.approved-mine-active > .header,
body.approved-mine-active > #main,
body.approved-mine-active > #startup-status,
body.approved-mine-active > .flame-embers { display: none !important; }
body.approved-mine-active { overflow-x: hidden; }
/* The approved Mine navigation is the single header on every route. */
body:has(#flame-ore-view) > .header { display: none !important; }
body:not(.approved-mine-active) #flame-ore-view { min-height: 0; }
#flame-ore-view .play-column > .stake-line { margin: 0 auto 18px; }
#flame-ore-view .play-column > .status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; width: 100%; margin: 0 0 18px; padding: 15px 8px; border: 1px solid #38312c; border-radius: 5px; background: #171513; }
#flame-ore-view .play-column > .status .stat { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0 4px; text-align: center; }
#flame-ore-view .play-column > .status .stat + .stat::before { left: 0; top: 2px; height: calc(100% - 4px); }
#flame-ore-view .play-column > .status .stat strong { display: block; width: 100%; font-size: 18px; line-height: 1.25; text-align: center; }
#flame-ore-view .play-column > .status .stat span { display: block; width: 100%; margin-top: 5px; font-size: 10px; line-height: 1.25; letter-spacing: .05em; text-align: center; }
@media (min-width: 1051px) {
  #flame-ore-view .dashboard > .pots,
  #flame-ore-view .dashboard > .play-column,
  #flame-ore-view .dashboard > .rewards { grid-row: 1; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  #flame-ore-view .dashboard > .pots,
  #flame-ore-view .dashboard > .play-column { grid-row: 1; }
  #flame-ore-view .dashboard > .rewards { grid-row: 2; }
}
@media (max-width: 760px) {
  #flame-ore-view .play-column > .status .stat strong { font-size: 16px; }
  #flame-ore-view .play-column > .status .stat span { font-size: 9px; }
}
#flame-ore-view .sol-inline { object-fit: contain; }
#flame-ore-view .pot strong > span[id^="ref-"] { color: inherit; font: inherit; letter-spacing: inherit; }
#flame-ore-view .wallet-sol .sol-mark { display: inline-block; object-fit: contain; }
#flame-ore-view .reward-group .reward-item { align-items: center; }
#flame-ore-view .reward-group .reward-item > span { display: inline-flex; align-items: center; gap: 6px; min-height: 21px; line-height: 21px; }
#flame-ore-view .reward-group .reward-item strong { margin: 0; min-width: 3ch; line-height: 21px; text-align: right; font-variant-numeric: tabular-nums; }
#flame-ore-view .wallet-sol .sol-mark { width: 21px; height: 21px; margin: 0; vertical-align: middle; }
/* Keep the live Mine view isolated from the legacy app's button/nav defaults.
   The approved preview uses its own control sizes and a simple active underline. */
#flame-ore-view button { min-height: 0; }
#flame-ore-view .links a,
#flame-ore-view .links a.active { background: transparent; border-radius: 0; }
#flame-ore-view .nav { height: 78px; gap: 22px; padding-inline: 30px; background: #111111; }
#flame-ore-view .logo { width: 180px; }
#flame-ore-view .links { gap: 6px; margin-left: 10px; }
#flame-ore-view .links a { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border: 0; border-radius: 10px; color: #eee8e3; font-family: Inter, Arial, sans-serif; font-size: 20px; font-weight: 650; text-transform: uppercase; white-space: nowrap; }
#flame-ore-view .links a img { width: 24px; height: 24px; object-fit: contain; }
#flame-ore-view .links a.active,
#flame-ore-view .links a[aria-current="page"] { border: 0; border-radius: 10px; background: #2b211b; color: #ffb271; }
#flame-ore-view .links a:hover { background: #281e19; }
#flame-ore-view .online { padding: 8px 10px; border: 1px solid #44352b; border-radius: 7px; font-size: 13px; text-transform: none; }
#flame-ore-view .wallet { min-height: 46px; padding: 10px 18px; border: 0; border-radius: 9px; background: linear-gradient(110deg,#ffc474,#ff9450); color: #23180f; font-size: 16px; font-weight: 700; }
#flame-ore-view .mobile-menu { display: none; }
@media (max-width: 1100px) {
  #flame-ore-view .nav { gap: 12px; padding-inline: 18px; }
  #flame-ore-view .logo { width: 145px; }
  #flame-ore-view .links { gap: 2px; margin-left: 0; }
  #flame-ore-view .links a { gap: 7px; padding-inline: 9px; font-size: 20px; }
  #flame-ore-view .links a img { width: 19px; height: 19px; }
  #flame-ore-view .online { display: none; }
}
@media (max-width: 960px) {
  #flame-ore-view .nav { height: 66px; gap: 8px; padding-inline: 12px; }
  #flame-ore-view .logo { width: 104px; }
  #flame-ore-view .links a { min-height: 40px; gap: 4px; padding-inline: 6px; font-size: 18px; }
  #flame-ore-view .links a img { width: 16px; height: 16px; }
  #flame-ore-view .wallet { min-height: 38px; padding: 8px; font-size: 11px; }
  #flame-ore-view .links > a { display: none; }
  #flame-ore-view .mobile-menu { display: block; position: relative; }
  #flame-ore-view .mobile-menu summary { padding: 10px 12px; border: 1px solid #554136; border-radius: 7px; color: #f3d2b6; font-family: Inter, Arial, sans-serif; font-size: 18px; text-transform: uppercase; cursor: pointer; list-style: none; }
  #flame-ore-view .mobile-menu summary::-webkit-details-marker { display: none; }
  #flame-ore-view .mobile-menu-panel { position: absolute; z-index: 10; top: calc(100% + 8px); left: 0; display: grid; min-width: 150px; padding: 6px; border: 1px solid #554136; border-radius: 8px; background: #211a16; box-shadow: 0 12px 28px #0009; }
  #flame-ore-view .links .mobile-menu-panel a { display: flex; min-height: 40px; padding: 8px 10px; border-radius: 5px; font-size: 18px; }
}
#flame-ore-view .apy-note { display: none; }
#flame-ore-view .deploy:disabled,
#flame-ore-view .reward-actions button:disabled { opacity: .5; cursor: not-allowed; }

/* Stake: the introduction sits below the shared nav, then both card columns start together. */
@scope (.canonical-page) {
  #stakeView { padding-top: 34px; }
  #stakeView .claims button { display: flex; align-items: center; justify-content: center; text-align: center; }
  #stakeView .claims button .c-label { display: block; width: 100%; text-align: center; }
  #stakeView .tier-card .deploy,
  #stakeView .tier-card .quick button { text-align: center; }
  #stakeView #stakeBtn { transition: transform .15s ease, filter .15s ease, box-shadow .15s ease; }
  #stakeView #stakeBtn:hover:not(:disabled) { background: var(--flame-gradient); transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 6px 26px rgba(255,110,45,0.55); }
}
@media (min-width: 1201px) {
  @scope (.canonical-page) { #stakeView .right { padding-top: 51px; } }
}
@media (max-width: 1200px) {
  @scope (.canonical-page) {
    #stakeView { padding-top: 24px; gap: 16px; align-items: stretch; }
    #stakeView .mid-col { display: contents; }
    #stakeView .st-header { order: 0; width: 100%; }
    #stakeView .chips { order: 1; width: 100%; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #stakeView .chip { min-width: 0; }
    #stakeView .right { display: contents; }
    #stakeView .right .tier-card { order: 2; width: 100%; }
    #stakeView .right .rewards { order: 3; width: 100%; }
    #stakeView .positions:not(.apy-card) { order: 4; width: 100%; min-width: 0; }
    #stakeView .positions.apy-card { order: 5; width: 100%; min-width: 0; }
    #stakeView .right .st-guardian-card { order: 6; width: 100%; }
    #stakeView .apy-card .positions-compact-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
}
@media (max-width: 580px) {
  @scope (.canonical-page) {
    #stakeView .chips,
    #stakeView .apy-card .positions-compact-body { grid-template-columns: minmax(0, 1fr); }
  }
}

@scope (.canonical-page) {
  #stakeView #positionsBody { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  #stakeView #positionsBody .stake-position { display: flex; flex-direction: column; align-items: stretch; min-width: 0; min-height: 184px; padding: 18px; margin: 0; border-radius: 9px; background: linear-gradient(145deg, #1c1c1f, #161517); }
  #stakeView #positionsBody .st-permanent { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(145deg, #1c1c1f, #161517); }
  #stakeView #positionsBody .st-permanent .permanent-mascot { position: absolute; z-index: 0; right: 10px; bottom: 68px; width: min(290px, max(0px, calc(100% - 95px))); height: auto; object-fit: contain; object-position: right bottom; opacity: .82; pointer-events: none; filter: drop-shadow(0 0 12px rgba(238, 126, 27, .26)); }
  #stakeView #positionsBody .st-permanent .pos-left, #stakeView #positionsBody .st-permanent .pos-right { position: relative; z-index: 1; }
  #stakeView #positionsBody .pos-left, #stakeView #positionsBody .pos-right { min-width: 0; align-items: flex-start; }
  #stakeView #positionsBody .pos-amount { font-size: 29px; line-height: 1.15; color: #f8f4ee; }
  #stakeView #positionsBody .position-tier { order: initial; font-size: 14px; font-weight: 500; color: #c6bab0; }
  #stakeView #positionsBody .pos-meta { color: #b8a99b; }
  #stakeView #positionsBody .pos-reward { order: 0; width: auto; font-size: 14px; text-align: left; color: #f4eee5; white-space: nowrap; }
  #stakeView #positionsBody .pos-badge { order: 1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 4px 8px; color: #d9d6d3; border-color: #424145; background: #2b2b2f; white-space: nowrap; }
  #stakeView #positionsBody .pos-badge.burn { color: #8de3a7; border-color: #356a4b; background: #20372b; }
  #stakeView #positionsBody .pos-right { margin-top: auto; padding-top: 18px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; max-width: none; }
  #stakeView #positionsBody .stake-time-track { width: 100%; height: 7px; margin-top: 14px; overflow: hidden; border-radius: 999px; background: #353036; }
  #stakeView #positionsBody .stake-time-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c86a30, #f7b764); }
  #stakeView #positionsBody .position-details { width: 100%; margin-top: 12px; border-top: 1px solid #534132; padding-top: 10px; }
  #stakeView #positionsBody .position-details summary { cursor: pointer; color: #f1c493; font-size: 13px; }
  #stakeView #positionsBody .position-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding-top: 10px; }
  #stakeView #positionsBody .position-entry .pos-meta { flex-basis: 100%; }
  #stakeView #positionsBody .pos-action { min-height: 34px; padding: 6px 10px; }
  #stakeView #stakeFlexCardBtn { display: block; width: 100%; }
}
@media (max-width: 900px) { @scope (.canonical-page) { #stakeView #positionsBody { grid-template-columns: repeat(2, minmax(0, 1fr)); } } }
@media (max-width: 580px) { @scope (.canonical-page) { #stakeView #positionsBody { grid-template-columns: 1fr; } } }
@media (max-width: 580px) { @scope (.canonical-page) { #stakeView #positionsBody .st-permanent .permanent-mascot { width: min(190px, max(0px, calc(100% - 95px))); bottom: 50px; } } }

/* Lite is the default Auto session editor; Pro retains the existing controls. */
#flame-ore-view .mining #lite-setup[hidden],
#flame-ore-view .mining #lite-active[hidden],
#flame-ore-view .mining #pro-controls[hidden],
#flame-ore-view .mining #lite-add-form[hidden] { display: none; }
#flame-ore-view .mining #lite-setup > label,
#flame-ore-view .mining #lite-active label { display: block; margin: 20px 0 0; color: #cbb5a1; font-size: 12px; }
#flame-ore-view .mining #lite-setup > label:first-child { margin-top: 17px; }
#flame-ore-view .mining .lite-round-field { margin-top: 8px; }
#flame-ore-view .mining .lite-round-field input { font-size: 43px; }
#flame-ore-view .mining .lite-error { min-height: 0; margin: 5px 0 0; color: #ffc2b6; font-size: 12px; }
#flame-ore-view .mining .lite-error:empty { display: none; }
#flame-ore-view .mining .lite-carry { margin: 12px 0 0; color: #ad9a8e; font-size: 11px; line-height: 1.5; }
#flame-ore-view .mining .lite-carry[hidden] { display: none; }
#flame-ore-view .mining .lite-status { display: inline-block; margin: 18px 0 0; padding: 6px 10px; border: 1px solid #6e513b; border-radius: 99px; color: #eec18b; font-size: 12px; }
#flame-ore-view .mining .lite-sol-primary { margin-top: 18px; padding: 12px 0 16px; border-bottom: 1px solid #413128; }
#flame-ore-view .mining .lite-sol-primary > span { color: #cbb5a1; font-size: 13px; }
#flame-ore-view .mining .lite-sol-primary > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
#flame-ore-view .mining .lite-sol-primary strong { color: #f6e8d9; font-size: clamp(30px, 3vw, 42px); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.04em; min-width: 0; overflow-wrap: anywhere; }
#flame-ore-view .mining .lite-sol-primary .lite-sol-unit { width: 25px; height: 25px; object-fit: contain; flex: none; align-self: center; }
#flame-ore-view .mining .lite-sol-primary > div > span { color: #e6b28a; font-size: 14px; flex: none; }
#flame-ore-view .mining .lite-session-metrics .row { align-items: baseline; gap: 8px; font-size: 14px; }
#flame-ore-view .mining .lite-session-metrics .row strong { font-size: 14px; text-align: right; }
#flame-ore-view .mining .lite-rate { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-bottom: 1px solid #413128; }
#flame-ore-view .mining .lite-rate span { color: #ae9583; font-size: 11px; letter-spacing: .08em; }
#flame-ore-view .mining .lite-rate strong { color: #f6e8d9; font-size: clamp(32px, 5vw, 48px); font-weight: 500; font-variant-numeric: tabular-nums; }
#flame-ore-view .mining .lite-stop { display: block; width: 100%; margin-top: 10px; border: 1px solid #674b39; border-radius: 5px; background: #211916; color: #ebc1a2; min-height: 45px; font-size: 12px; letter-spacing: .06em; }
#flame-ore-view .mining .lite-session-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
#flame-ore-view .mining .lite-session-actions .deploy,
#flame-ore-view .mining .lite-session-actions .lite-stop { width: 100%; min-height: 48px; margin-top: 0; }
#flame-ore-view .mining .lite-feedback { margin: 10px 0 0; color: #e6b28a; font-size: 12px; line-height: 1.5; }
#flame-ore-view .mining .lite-feedback:empty { display: none; }
#flame-ore-view .mining .rows strong { font-weight: 500; font-variant-numeric: tabular-nums; }
#flame-ore-view .mining .row[hidden] { display: none; }
#flame-ore-view .mine-header .switch[hidden] { display: none !important; }
/* One shared footer follows both the approved Mine view and the other routes. */
html:not([data-ui="ready"]) .flame-footer { display: none; }
body.approved-mine-active #flame-ore-view { min-height: 0; }
body.approved-mine-active #flame-ore-view .content { padding-bottom: 0; }
.flame-footer { box-sizing: border-box; width: calc(100% - 40px); max-width: 1410px; margin: 16px auto 0; padding: 16px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; background: #0d0b0a; border-top: 1px solid #34271f; color: #9e8d7e; font-size: 14px; }
.flame-footer-links { display: flex; flex-wrap: nowrap; gap: 11px; justify-self: end; }
.flame-footer-links a { box-sizing: border-box; display: inline-flex; align-items: center; height: 40px; min-height: 40px; padding: 0; border: 1px solid #5d4030; border-radius: 8px; background: #1c1511; color: #f6f0e9; font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; transition: background-color .16s ease, border-color .16s ease; }
.flame-footer-links a:hover { background: #2a1b14; border-color: #d18a50; }
.flame-footer-links a:focus-visible { outline: 2px solid #f3b568; outline-offset: 3px; }
.flame-footer-links .flame-social-x { width: 42px; justify-content: center; }
.flame-footer-links .flame-social-telegram { width: 148px; justify-content: center; gap: 10px; }
.flame-footer-links .flame-footer-rules { padding: 0 16px; justify-content: center; }
.flame-footer-links svg { display: block; width: 18px; height: 18px; flex: none; color: #f3b568; }
body:has(#view-mine:not([hidden])) #view-mine { padding-bottom: 20px; }
#flame-ore-view .rewards .reward-actions { margin-top: 16px; }
#flame-ore-view .reward-hint:empty { display: none; }
@media (min-width: 1051px) { #flame-ore-view .dashboard > .rewards { align-self: start; height: auto; } }
#flame-ore-view .rewards { position: relative; }
#flame-ore-view .mine-gutter-links { justify-self: auto; justify-content: flex-start; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
#flame-ore-view #mine-carry-note { display: none; }
#flame-ore-view .mining #lite-setup > #mine-rate-label { margin-top: 10px; }
#flame-ore-view .mining #lite-setup .lite-round-field { margin: 4px 0 4px; padding-bottom: 5px; }
#flame-ore-view .mining #lite-setup .lite-round-field input { font-size: 34px; line-height: 1.1; }
#flame-ore-view .mining #lite-setup #mine-spread-description { margin-top: 7px; }
#flame-ore-view .mining #lite-setup > .rows { margin: 14px 0 10px; }
#flame-ore-view .mining #lite-setup > .rows .row { padding-top: 7px; padding-bottom: 7px; }
body.approved-mine-active > .flame-footer > .flame-footer-links { display: none; }
@media (min-width: 1051px) {
  #flame-ore-view .dashboard { margin-top: 12px; }
  #flame-ore-view .dashboard > .pots,
  #flame-ore-view .dashboard > .play-column { box-sizing: border-box; height: auto; padding: 14px; border: 1px solid #38312d; border-radius: 9px; background: #151313; align-self: stretch; }
  #flame-ore-view .dashboard > .play-column { border-left: 2px solid #a98466; }
  #flame-ore-view .dashboard > .rewards { height: auto; margin-top: 0; padding-bottom: 70px; align-self: stretch; }
  #flame-ore-view .mine-gutter-links { position: absolute; right: 20px; bottom: 16px; left: 20px; margin: 0; padding: 0; }
  #flame-ore-view .pots .pot-grid { height: auto; grid-template-rows: none; }
  #flame-ore-view .pot-grid .pot { height: auto; }
  #flame-ore-view .pot-grid .pot .pot-face { height: auto; min-height: 215px; align-content: start; }
  #flame-ore-view .play-column > .stake-line { margin-bottom: 12px; }
  #flame-ore-view .play-column > .status { margin-bottom: 12px; padding-top: 10px; padding-bottom: 10px; }
  #flame-ore-view .mining #lite-active .lite-status { margin-top: 8px; }
  #flame-ore-view .mining #lite-active .lite-sol-primary { margin-top: 8px; padding: 8px 0 10px; }
  #flame-ore-view .mining #lite-active .rows { margin: 12px 0 10px; }
  #flame-ore-view .mining #lite-active .row { padding-top: 7px; padding-bottom: 7px; }
  #flame-ore-view #lite-active #ref-pro-panel.pro.visible { margin: 8px 0 6px; padding: 10px; }
  #flame-ore-view #lite-active #ref-pro-panel .tiles { gap: 4px; }
  #flame-ore-view #lite-active #ref-pro-panel .tiles button { height: 32px; }
}
@media (max-width: 760px) { .flame-footer { width: calc(100% - 32px); } }
@media (max-width: 500px) { .flame-footer { grid-template-columns: 1fr; row-gap: 12px; } }

/* Remove the bottom divider and copyright across routes; retain social links where shown. */
.flame-footer { grid-template-columns: 1fr; padding-top: 0; border-top: 0; }
.flame-footer-copyright { display: none; }
body.approved-mine-active > .flame-footer,
body:has(#view-stake:not([hidden])) > .flame-footer { display: none; }
body:has(#view-about:not([hidden])) > .flame-footer { display: none; }

.mobile-tabs { display: none; }
@media (max-width: 960px) {
  html { scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  #flame-ore-view .mobile-menu { display: none; }
  .mobile-tabs {
    box-sizing: border-box;
    position: fixed;
    z-index: 1000;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(66px + env(safe-area-inset-bottom));
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid #5a4031;
    background: #14100eee;
    box-shadow: 0 -7px 24px #0008;
    backdrop-filter: blur(12px);
  }
  .mobile-tabs a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 55px;
    border-radius: 9px;
    color: #c9b9aa;
    font: 700 10px/1.1 Inter, Arial, sans-serif;
    letter-spacing: .03em;
    text-decoration: none;
    text-transform: uppercase;
  }
  .mobile-tabs a img { display: block; width: 22px; height: 22px; object-fit: contain; }
  .mobile-tabs a[aria-current="page"] { background: #2b211b; color: #ffb271; }
  .mobile-tabs a:focus-visible { outline: 2px solid #f3b568; outline-offset: -2px; }
}
