.miner-page { min-height: 100svh; background: #050806; }
.miner-header { position: sticky; grid-template-columns: 1fr auto 1fr; }
.miner-nav { display: flex; gap: 28px; }
.miner-nav a { color: var(--muted); font: 700 10px var(--mono); text-transform: uppercase; }
.miner-nav a:hover, .miner-nav a.active { color: var(--green); }
.miner-header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.miner-header .menu-button { display: none; }

.miner-layout { width: min(1380px, calc(100% - 52px)); margin: 0 auto; padding: 50px 0 100px; display: grid; grid-template-columns: minmax(310px, .76fr) minmax(560px, 1.24fr); column-gap: 48px; }
.miner-titlebar { grid-column: 1 / -1; margin-bottom: 42px; padding-bottom: 24px; display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--line); }
.miner-titlebar h1 { margin: 12px 0 0; font-size: 52px; font-weight: 500; line-height: 1; }
.runner-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 700 9px var(--mono); text-transform: uppercase; }
.runner-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px rgba(231,173,88,.7); }
.runner-state.ready i, .runner-state.running i { background: var(--green); box-shadow: 0 0 12px var(--green); }
.runner-state.error i { background: #f05858; box-shadow: 0 0 10px rgba(240,88,88,.7); }

.device-panel { min-width: 0; padding-right: 48px; border-right: 1px solid var(--line); }
.device-heading { min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; border-bottom: 1px solid var(--line); }
.device-heading span, .panel-label { color: var(--muted-2); font: 700 9px var(--mono); text-transform: uppercase; }
.device-identity { padding-bottom: 22px; display: flex; align-items: center; gap: 16px; }
.device-identity img { width: 42px; height: 34px; object-fit: contain; }
.device-heading strong { overflow-wrap: anywhere; font-size: 34px; font-weight: 500; }
.device-list { margin: 24px 0 0; }
.device-list div { min-height: 34px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 22px; }
.device-list dt { color: var(--muted-2); font: 700 9px var(--mono); text-transform: uppercase; }
.device-list dd { margin: 0; max-width: 260px; color: #c4ccc6; font: 700 11px var(--mono); text-align: right; overflow-wrap: anywhere; }
.device-list dd.accent { color: var(--green); }
.reward-map { margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line); }
.reward-map > div { margin-top: 18px; }
.reward-map p { min-height: 30px; margin: 0; display: grid; grid-template-columns: 8px 64px 1fr auto; align-items: center; gap: 10px; font: 10px var(--mono); }
.reward-map p i { width: 6px; height: 6px; background: var(--asset); }
.reward-map p strong { color: var(--paper); }.reward-map p span { color: var(--muted-2); text-transform: uppercase; }.reward-map p b { color: var(--green); }
.reward-map > small { margin-top: 20px; display: block; color: var(--muted-2); font: 9px/1.6 var(--mono); }
.reward-map p img { width: 18px; height: 15px; object-fit: contain; }
.reward-map p { grid-template-columns: 20px 64px 1fr auto; }
.gpu-support { margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line); }
.gpu-support > div { margin-top: 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gpu-support span span, .gpu-support > div > span { min-width: 0; height: 42px; padding: 0 10px; display: flex; align-items: center; gap: 9px; color: var(--muted-2); border: 1px solid var(--line); font: 700 9px var(--mono); text-transform: uppercase; }
.gpu-support img { width: 24px; height: 19px; object-fit: contain; filter: grayscale(1); opacity: .55; }
.gpu-support > div > span.active { color: var(--paper); border-color: var(--line-green); background: #09110b; }
.gpu-support > div > span.active img { filter: none; opacity: 1; }

.instrument-panel { min-width: 0; }
.instrument-list article { min-height: 56px; display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); color: var(--muted-2); font: 10px var(--mono); }
.instrument-list article:first-child { border-top: 1px solid var(--line); }
.instrument-list article > span { color: #b7c0ba; }.instrument-list article p { min-width: 0; margin: 0; }.instrument-list article strong { color: #b7c0ba; font-size: 12px; font-weight: 700; }.instrument-list article small { margin-left: 9px; color: var(--muted-2); font-size: 9px; }
.instrument-list article > b { color: var(--muted-2); font-size: 8px; text-transform: uppercase; }
.instrument-list article.ready > b { color: var(--green); }.instrument-list article.unavailable { opacity: .4; }.instrument-list article.active { background: #09110b; }.instrument-list article.active > span, .instrument-list article.active strong, .instrument-list article.active > b { color: var(--green); }

.wafer-stage { position: relative; width: min(500px, 78%); margin: 34px auto; aspect-ratio: 1; }
.wafer-stage canvas { width: 100%; height: 100%; display: block; }
.wafer-center { position: absolute; inset: 50% auto auto 50%; width: 118px; height: 118px; display: grid; place-content: center; border: 1px solid var(--line-green); border-radius: 50%; background: rgba(5,8,6,.88); text-align: center; transform: translate(-50%,-50%); }
.wafer-center span { color: var(--green-pale); font-size: 25px; font-weight: 500; }.wafer-center small { color: var(--muted-2); font: 700 8px var(--mono); text-transform: uppercase; }
.run-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.run-metrics div { min-width: 0; min-height: 78px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }.run-metrics div:first-child { padding-left: 0; }.run-metrics div:last-child { border-right: 0; }
.run-metrics span { color: var(--muted-2); font: 700 8px var(--mono); text-transform: uppercase; }.run-metrics strong { overflow: hidden; color: var(--paper); font: 700 11px var(--mono); text-overflow: ellipsis; white-space: nowrap; }

.duration-control { margin-top: 34px; }
.duration-control > div { margin-top: 12px; display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 8px; }
.duration-control button { min-width: 0; height: 48px; padding: 0 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; background: transparent; font: 700 10px var(--mono); text-transform: uppercase; cursor: pointer; }
.duration-control button small { margin-left: 5px; color: inherit; font: 700 7px var(--mono); }
.duration-control button:hover:not(:disabled), .duration-control button.active { color: #071009; border-color: var(--green); background: var(--green); }
.duration-control button:disabled { color: #59605b; border-color: rgba(199,218,204,.09); background: #070a08; cursor: not-allowed; }
.duration-control button.active:disabled { color: #071009; border-color: var(--green); background: var(--green); opacity: .45; }

.access-panel { margin-top: 38px; padding: 24px; border: 1px solid var(--line); border-radius: 7px; background: #080d0a; }
.access-heading { display: flex; justify-content: space-between; gap: 20px; color: var(--muted-2); font: 700 9px var(--mono); text-transform: uppercase; }.access-heading strong { display: flex; align-items: center; gap: 8px; color: var(--green); }.access-heading i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.access-panel > p { color: var(--muted); font: 11px/1.65 var(--mono); }
.access-panel > p > strong { color: var(--paper); }
.access-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.access-grid div { min-width: 0; min-height: 82px; padding: 13px; display: flex; flex-direction: column; gap: 5px; border-right: 1px solid var(--line); }.access-grid div:last-child { border-right: 0; }
.access-grid span, .access-grid small { color: var(--muted-2); font: 700 8px var(--mono); text-transform: uppercase; }.access-grid strong { color: var(--paper); font: 700 11px var(--mono); }
.access-panel .pass-note { margin: 18px 0 0; color: var(--muted-2); font-size: 10px; }
.pass-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.pass-actions button, .pass-actions a { min-height: 43px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; color: var(--paper); border: 1px solid var(--muted-2); border-radius: 0; background: transparent; font: 700 9px var(--mono); text-transform: uppercase; }
.pass-actions button:disabled { color: #666d68; border-color: var(--line); cursor: not-allowed; }
.pass-actions a:hover { color: #071009; border-color: var(--green); background: var(--green); }
.access-panel .pass-status { min-height: 16px; margin: 14px 0 0; color: var(--amber); font-size: 9px; text-transform: uppercase; }

.load-consent { margin-top: 30px; display: grid; grid-template-columns: 18px 1fr; gap: 13px; color: var(--muted); font: 10px/1.6 var(--mono); cursor: pointer; }.load-consent input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--green); }.load-consent strong { display: block; color: var(--paper); }
.runner-message { min-height: 20px; margin: 22px 0 0; color: var(--muted-2); font: 9px/1.5 var(--mono); }
.runner-message.error { color: #f07878; }.runner-message.success { color: var(--green); }
.run-actions { margin-top: 18px; display: flex; align-items: center; gap: 12px; }
.run-button, .stop-button, .run-actions > a { height: 46px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font: 700 10px var(--mono); text-transform: uppercase; cursor: pointer; }
.run-button { min-width: 190px; justify-content: space-between; color: #071009; border: 1px solid var(--green); background: var(--green); }.run-button:hover:not(:disabled) { color: var(--paper); background: transparent; }.run-button:disabled { opacity: .35; cursor: not-allowed; }
.stop-button { color: #f07878; border: 1px solid rgba(240,120,120,.45); background: transparent; }.stop-button:hover:not(:disabled) { border-color: #f07878; }.stop-button:disabled { opacity: .25; cursor: not-allowed; }
.run-actions > a { margin-left: auto; color: var(--muted); border: 1px solid var(--line); }.run-actions > a:hover { color: var(--paper); }

@media (max-width: 980px) {
  .miner-header { grid-template-columns: 1fr auto; }.miner-nav { display: none; }.miner-nav.open { display: flex; }.miner-header .menu-button { display: grid; }.miner-layout { width: min(100% - 40px, 760px); grid-template-columns: 1fr; }.device-panel { margin-bottom: 52px; padding: 0 0 52px; border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 600px) {
  .miner-header-actions { position: absolute; top: 13px; right: 18px; }.miner-header .wallet-button { width: 42px; min-width: 42px; padding: 0; }.miner-header .wallet-button [data-wallet-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }.miner-layout { width: min(100% - 34px, 760px); padding-top: 34px; }.miner-titlebar { align-items: flex-start; flex-direction: column; gap: 24px; }.miner-titlebar h1 { font-size: 39px; }
  .device-panel { padding-right: 0; }.device-heading strong { font-size: 27px; }.device-list dd { max-width: 180px; }
  .instrument-list article { grid-template-columns: 54px 1fr auto; gap: 10px; }.instrument-list article small { margin: 4px 0 0; display: block; line-height: 1.4; }
  .wafer-stage { width: 96%; }.wafer-center { width: 96px; height: 96px; }.wafer-center span { font-size: 21px; }
  .run-metrics { grid-template-columns: 1fr 1fr; }.run-metrics div, .run-metrics div:first-child { padding: 14px 10px; border-bottom: 1px solid var(--line); }.run-metrics div:nth-child(2) { border-right: 0; }
  .duration-control > div { grid-template-columns: 1fr 1fr; }.duration-control button { width: 100%; }
  .access-heading { flex-direction: column; }.access-grid { grid-template-columns: 1fr; }.access-grid div { min-height: 68px; border-right: 0; border-bottom: 1px solid var(--line); }.access-grid div:last-child { border-bottom: 0; }
  .run-actions { flex-wrap: wrap; }.run-button { min-width: 0; flex: 1; }.run-actions > a { width: 100%; margin-left: 0; }
}
