/* "Bu hansı akkorddur?" (/tools/hansi-akkord). Builds on proto.css, home.css and akkordlar.css (keys, role colours). */
.ha { max-width: 600px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.ha-lead { margin-top: 4px; color: var(--ink-2); font-size: 0.95rem; }
.ha-midi { display: inline-flex; max-width: 100%; white-space: nowrap; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 10px; border-radius: 99px; background: var(--paper-2); color: var(--muted); font-size: 0.76rem; font-weight: 900; }
.ha-midi > span { overflow: hidden; text-overflow: ellipsis; }
.ha-midi i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.ha-midi.on { background: color-mix(in srgb, var(--ok) 12%, var(--card)); color: var(--ok); }
.ha-midi.on i { background: var(--ok); }
.ha-res { position: relative; display: grid; gap: 3px; min-height: 112px; margin-top: 12px; padding: 16px 72px 16px 16px; border-radius: 18px; background: var(--paper-2); color: var(--ink); }
.ha-res.ok { background: var(--ink-bg); color: #fff; }
.ha-sym { font-size: 2.4rem; font-weight: 900; line-height: 1.05; overflow-wrap: anywhere; }
.ha-nm { font-size: 1.02rem; font-weight: 900; }
.ha-nt { font-size: 0.86rem; font-weight: 700; opacity: 0.85; }
.ha-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ha-tags span { font-size: 0.72rem; font-weight: 900; padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.16); }
.ha-pl { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; }
.ha-res .ha-pl { position: absolute; right: 14px; top: 14px; }
.ha-pl-s { width: 38px; height: 38px; flex: none; }
.ha-alt { margin-top: 8px; font-size: 0.84rem; font-weight: 700; color: var(--muted); }
.ha-kslot-main { margin-top: 12px; } /* keyboard under the title: the result text below can grow without moving it (owner 2026-11-12) */
.ha-kbd { overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 12px; background: var(--card); -webkit-overflow-scrolling: touch; }
.ha-kbd .kbd { width: 760px; max-width: none; max-height: none; height: 150px; }
.ha .kbd .on.r-sel rect { fill: var(--accent); }
.ha .kbd .on.r-sel .kl { fill: #fff; }
.ha-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ha-row .btn { min-height: 46px; padding-inline: 8px; }
.ha-row .btn:disabled { opacity: 0.45; cursor: default; }
.ha-row .btn-block { grid-column: 1 / -1; }
.ha-link { display: block; width: fit-content; margin-top: 12px; padding: 6px 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-weight: 900; font-size: 0.92rem; text-decoration: none; cursor: pointer; }
.ha-chainbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 12px; padding: 12px 14px; border-color: var(--line); color: var(--ink); font: inherit; font-weight: 800; text-align: left; cursor: pointer; box-shadow: none; }
.ha-chainbar b { flex: none; color: var(--accent-ink); }
.ha-top { display: flex; align-items: center; gap: 12px; }
.ha-top b { font-size: 1.1rem; }
.icon-btn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; }

/* other ways */
.ha-staff { margin-top: 12px; background: #fffdf8; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ha-inv { margin-top: 8px; padding: 10px 12px; box-shadow: none; }
.ha-inv.on { border: 2px solid var(--accent); }
.ha-ih { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ha-ih > span { display: grid; }
.ha-ih b { font-size: 0.92rem; }
.ha-ih small { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.ha-ik { margin-top: 6px; }
.ha-ik .kbd { max-height: 110px; }
.ha-fg { display: flex; gap: 14px; margin-top: 4px; font-size: 0.8rem; font-weight: 800; color: var(--ink-2); }
.ha-fg b { color: var(--accent-ink); }
.ha-keys { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.86rem; color: var(--muted); }
.ha-keys span { padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink); font-weight: 800; font-size: 0.82rem; }
.ha-keys b { color: var(--accent-ink); }

/* chain */
.ha-chain { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ha-chain button { width: 100%; min-height: 76px; display: grid; place-content: center; gap: 2px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; padding: 6px 2px; }
.ha-chain b { font-size: 1.35rem; overflow-wrap: anywhere; }
.ha-chain small { font-size: 0.86rem; font-weight: 900; color: var(--accent-ink); min-height: 1em; }
.ha-chain li.now button { border: 2px solid var(--accent); background: var(--accent-soft); }
.ha-empty { margin-top: 12px; padding: 14px; border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); font-weight: 700; text-align: center; }
.ha-keyline { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ha-keyline > span { display: grid; }
.ha-keyline small { font-size: 0.74rem; font-weight: 700; color: var(--muted); }
.ha-fact { display: grid; gap: 2px; margin-top: 10px; padding: 9px 12px; border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; background: var(--card); font-size: 0.86rem; font-weight: 700; line-height: 1.45; color: var(--ink-2); }
.ha-fact b { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ha-next { margin-top: 16px; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ha-mini { height: 30px; line-height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 4px 0 8px; font-size: 0.92rem; font-weight: 700; color: var(--ink-2); }
.ha-mini b { font-size: 1.15rem; color: var(--ink); }
.ha-sw { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
label.ha-sw { cursor: pointer; }
.ha-sw > span:first-child { display: grid; }
.ha-sw b { font-size: 0.9rem; }
.ha-sw small { font-size: 0.74rem; font-weight: 700; color: var(--muted); }
.ha-sel { display: flex; gap: 6px; }
.ha-sel select { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-weight: 800; padding: 0 6px; }
.ha-tg { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; flex: none; margin: 0; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background 0.15s; }
.ha-tg::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.ha-tg:checked { background: var(--teal); }
.ha-tg:checked::after { left: 21px; }
.ha-msg { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 0.88rem; }
@media (max-width: 380px) { .ha-chain { grid-template-columns: repeat(3, 1fr); } }

/* Desktop (owner 2026-11-12: "a normal design where scrolling is not needed on keyboards"): a wider page, the whole
   keyboard visible (no side scroll), the result on the left and the buttons on the right under it. */
@media (min-width: 900px) {
  .ha { max-width: 1040px; padding-bottom: 48px; }
  .ha-kbd { overflow: hidden; }
  .ha-kbd .kbd { width: 100%; height: auto; max-height: none; }
  #v-main { display: grid; grid-template-columns: minmax(0, 1fr) 330px; column-gap: 20px; align-items: start; }
  #v-main > * { grid-column: 1 / -1; }
  #v-main > .ha-midi { justify-self: start; }
  #v-main > .ha-res { grid-column: 1; grid-row: 6 / 8; min-height: 180px; margin-top: 12px; }
  #v-main > .ha-alt { grid-column: 1; grid-row: 8; }
  #v-main > .ha-row { grid-column: 2; grid-row: 6; grid-template-columns: 1fr; margin-top: 12px; }
  #v-main > .ha-link { grid-column: 2; grid-row: 7; margin-top: 4px; }
  #v-main > .ha-chainbar { grid-column: 2; grid-row: 8; margin-top: 8px; }
  .ha-staff { max-width: 640px; margin-inline: auto; }
  #v-main > .ha-kslot-main { grid-row: 5; }
  .ha-sym { font-size: 3rem; }
  #w-invs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .ha-chain { grid-template-columns: repeat(8, 1fr); }
}
