.tuner-page{min-height:100dvh}
.tuner-shell{width:min(1040px,calc(100% - 32px))}
.tuner-main{padding-top:30px}
.tuner-heading{display:flex;align-items:end;justify-content:space-between;gap:30px;margin-bottom:18px}
.tuner-heading .display-title{font-size:clamp(38px,5.8vw,68px)}
.tuner-intro{max-width:310px;margin:0 0 7px;color:var(--ink-soft);font-size:12px;text-align:right}
.tuner-card{width:min(680px,100%);margin:0 auto;padding:22px;border:2px solid var(--ink);border-radius:28px;background:#f4df9e;box-shadow:8px 8px 0 var(--ink)}
.string-picker{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}
.string-choice{min-width:0;height:61px;padding:5px 2px;border:2px solid var(--ink);border-radius:14px;background:var(--white);box-shadow:2px 2px 0 var(--ink);cursor:pointer}
.string-choice span,.string-choice strong{display:block}
.string-choice span{color:var(--ink-soft);font-size:10px;font-weight:900}
.string-choice strong{margin-top:2px;font-family:var(--display);font-size:22px}
.string-choice.active{background:var(--coral);color:var(--white);transform:translateY(-2px);box-shadow:3px 5px 0 var(--ink)}
.string-choice.active span{color:inherit}
.tuner-display{margin-top:16px;padding:24px 22px 20px;border:2px solid var(--ink);border-radius:23px;background:var(--white);transition:background .2s ease}
.tuner-display.is-flat{background:#e6eef0}
.tuner-display.is-sharp{background:#f8d9cf}
.tuner-display.is-tuned{background:#ccebdc}
.target-line{display:flex;align-items:baseline;justify-content:center;gap:13px}
.target-string{padding:5px 10px;border:1.5px solid var(--ink);border-radius:999px;background:var(--paper);font-size:11px;font-weight:900}
.target-note{font-family:var(--display);font-size:76px;line-height:.88}
.target-frequency{color:var(--ink-soft);font-size:11px;font-weight:900}
.tuning-message{min-height:25px;margin-top:15px;color:var(--ink);font-size:16px;font-weight:900;text-align:center}
.tuning-message.waiting{color:var(--ink-soft)}
.tuning-message.flat{color:#397083}
.tuning-message.sharp{color:var(--coral-dark)}
.tuning-message.near{color:#8c6a16}
.tuning-message.tuned{color:#197153;font-size:20px}
.meter{margin:25px auto 0}
.meter-track{position:relative;height:68px;margin:0 12px;border-bottom:4px solid var(--ink);background:repeating-linear-gradient(90deg,transparent 0 calc(10% - 1px),rgba(23,37,45,.22) calc(10% - 1px) 10%)}
.meter-zone{position:absolute;left:46%;right:46%;bottom:0;height:100%;background:rgba(47,168,124,.16)}
.meter-center{position:absolute;left:50%;bottom:-8px;width:4px;height:80px;border-radius:4px;background:var(--mint);transform:translateX(-50%)}
.meter-needle{--needle-position:0;position:absolute;z-index:2;left:calc(50% + var(--needle-position)*48%);bottom:-8px;width:4px;height:76px;border-radius:4px;background:var(--coral);box-shadow:0 0 0 2px var(--white);transform:translateX(-50%);transition:left .13s ease}
.meter-needle::after{content:"";position:absolute;left:50%;top:-5px;width:14px;height:14px;border:2px solid var(--ink);border-radius:50%;background:var(--coral);transform:translateX(-50%)}
.meter-labels{display:flex;justify-content:space-between;margin-top:11px;color:var(--ink-soft);font-size:10px;font-weight:900}
.live-values{display:grid;grid-template-columns:repeat(3,1fr);margin-top:20px;border:1.5px solid var(--ink);border-radius:15px;overflow:hidden}
.live-values div{padding:10px 5px;text-align:center;border-right:1px solid var(--line)}
.live-values div:last-child{border-right:0}
.live-values span,.live-values strong{display:block}
.live-values span{color:var(--ink-soft);font-size:9px;font-weight:850}
.live-values strong{margin-top:4px;font-family:var(--display);font-size:17px}
.tuner-start{width:100%;min-height:56px;margin-top:16px;border:2px solid var(--ink);border-radius:16px;background:var(--ink);color:var(--white);box-shadow:4px 4px 0 var(--coral);font-size:16px;font-weight:900;cursor:pointer}
.tuner-start:active{transform:translate(2px,2px);box-shadow:2px 2px 0 var(--coral)}
.tuner-start.running{background:var(--coral);box-shadow:4px 4px 0 var(--ink)}
.tuner-start:disabled{cursor:default;opacity:.65}
.tuner-hint{margin:13px 2px 0;color:var(--ink-soft);font-size:11px;line-height:1.6;text-align:center}

@media (max-width:760px){
  .tuner-page{height:100dvh;overflow:hidden}
  .tuner-shell{width:min(calc(100% - 24px),620px);height:100dvh;padding-top:max(18px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .tuner-page .site-header{min-height:42px}
  .tuner-page .brand-mark{width:38px;height:38px;box-shadow:3px 3px 0 var(--ink);font-size:20px}
  .tuner-page .brand-text{display:none}
  .tuner-page .header-action{min-height:38px;padding:0 11px;gap:5px;border-radius:12px;box-shadow:2px 2px 0 var(--ink);font-size:11px}
  .tuner-main{height:calc(100dvh - 62px - max(18px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)));padding-top:15px}
  .tuner-heading{align-items:center;margin-bottom:13px}
  .tuner-heading .eyebrow,.tuner-intro{display:none}
  .tuner-heading .display-title{font-size:34px;letter-spacing:-.04em}
  .tuner-card{height:calc(100% - 51px);padding:12px;border-radius:23px;box-shadow:5px 5px 0 var(--ink)}
  .string-picker{gap:5px}
  .string-choice{height:52px;border-radius:11px;box-shadow:1.5px 1.5px 0 var(--ink)}
  .string-choice span{font-size:8px}
  .string-choice strong{font-size:19px}
  .string-choice.active{box-shadow:2px 3px 0 var(--ink)}
  .tuner-display{margin-top:10px;padding:15px 12px 13px;border-radius:19px}
  .target-line{gap:10px}
  .target-note{font-size:62px}
  .tuning-message{margin-top:10px;font-size:14px}
  .tuning-message.tuned{font-size:18px}
  .meter{margin-top:15px}
  .meter-track{height:55px;margin-inline:8px}
  .meter-center{height:65px}
  .meter-needle{height:62px}
  .live-values{margin-top:14px}
  .live-values div{padding:8px 3px}
  .live-values strong{font-size:15px}
  .tuner-start{min-height:51px;margin-top:11px;border-radius:14px;font-size:14px}
  .tuner-hint{margin-top:9px;font-size:9px}
}

@media (max-width:760px) and (max-height:700px){
  .tuner-shell{padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom))}
  .tuner-main{height:calc(100dvh - 54px - max(12px,env(safe-area-inset-top)) - max(8px,env(safe-area-inset-bottom)));padding-top:8px}
  .tuner-heading{margin-bottom:8px}
  .tuner-heading .display-title{font-size:29px}
  .tuner-card{height:calc(100% - 39px);padding:9px}
  .string-choice{height:45px}
  .tuner-display{margin-top:7px;padding-block:10px}
  .target-note{font-size:50px}
  .tuning-message{margin-top:6px;min-height:20px}
  .meter{margin-top:8px}
  .meter-track{height:42px}
  .meter-center{height:52px}
  .meter-needle{height:49px}
  .live-values{margin-top:9px}
  .live-values div{padding-block:6px}
  .tuner-start{min-height:44px;margin-top:8px}
  .tuner-hint{margin-top:6px;line-height:1.35}
}
