/* ============================================================================
   Honky Tonkin' — app styles.
   Loads LAST:  app-kit.css -> graphite.css -> honkytonkin.css
   Graphite supplies the near-black canvas and the whole component vocabulary.
   This file sets the ONE thing that varies per app (the accent) plus the two
   venue-specific recipes: a bigger type scale for Floor mode, and a warm alert
   for restarts and tags. Everything else is the kit.
   ============================================================================ */

:root {
  /* The accent is the app's icon color: the amber of the boot art. */
  --kit-accent:       #f0a830;
  --kit-accent-hover: #f7c065;
  --kit-accent-2:     #8a5610;
  --kit-accent-soft:  rgba(240, 168, 48, .12);
  --kit-accent-line:  rgba(240, 168, 48, .34);

  /* The one deliberate second colour. Missing a restart is the specific failure a
     newer dancer suffers, so restarts and tags get their own warm alert, kept far
     enough from amber that the two never read as the same signal. */
  --ht-alert:      #ff8f6b;
  --ht-alert-bg:   rgba(255, 143, 107, .13);
  --ht-alert-line: rgba(255, 143, 107, .42);
}

/* Let the app own the full width on a phone; the kit's menu nav has no rail. */
.kit-content { padding-bottom: max(2rem, env(safe-area-inset-bottom)); }

/* --- search ------------------------------------------------------------- */

.ht-search { position: relative; margin: 0 0 1.25rem; }
.ht-search .kit-input {
  width: 100%; font-size: 1.0625rem; padding: .8rem .9rem;
}
.ht-hits { margin-top: .5rem; }

/* --- night groups + dance rows ------------------------------------------ */

.ht-group { margin: 0 0 1.5rem; }
.ht-group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .75rem; margin: 0 0 .55rem;
}
.ht-tonight {
  color: var(--kit-accent); font-size: .75rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
}

.ht-row {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--kit-surface); border: 1px solid var(--kit-line);
  border-radius: 10px; padding: .7rem .85rem; margin-bottom: .4rem;
  color: inherit; font: inherit;
}
.ht-row:hover, .ht-row:focus-visible { border-color: var(--kit-accent-line); outline: none; }
.ht-row--lesson { border-left: 3px solid var(--kit-accent); }
.ht-row-name { display: block; font-size: 1.0625rem; color: var(--kit-ink); line-height: 1.3; }
.ht-row-song { display: block; font-size: .8125rem; color: var(--kit-muted); margin-top: .12rem; line-height: 1.35; }
.ht-row-meta {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font-size: .75rem; color: var(--kit-meta); margin-top: .3rem;
}
.ht-mark-dot {
  width: .5rem; height: .5rem; border-radius: 50%; flex: none;
  background: var(--kit-accent);
}
.ht-mark-dot[data-mark="learning"] { background: transparent; box-shadow: inset 0 0 0 2px var(--kit-accent); }
.ht-mark-dot[data-mark="want"]     { background: transparent; box-shadow: inset 0 0 0 2px var(--kit-meta); }

/* --- filters ------------------------------------------------------------ */

.ht-filters { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; }
.ht-filter {
  background: var(--kit-surface); border: 1px solid var(--kit-line);
  color: var(--kit-soft); border-radius: 999px; padding: .35rem .8rem;
  font-size: .8125rem; cursor: pointer;
}
.ht-filter.is-on {
  border-color: var(--kit-accent-line); color: var(--kit-accent);
  background: var(--kit-accent-soft);
}

/* --- dance screen ------------------------------------------------------- */

.ht-back {
  background: none; border: 0; color: var(--kit-muted); cursor: pointer;
  font-size: .875rem; padding: .4rem 0; margin: 0 0 .6rem;
}
.ht-back:hover { color: var(--kit-ink); }

.ht-dance-name { font-size: 1.5rem; line-height: 1.2; margin: 0; color: var(--kit-ink); }
.ht-dance-song { font-size: .9375rem; color: var(--kit-soft); margin: .2rem 0 0; }
.ht-dance-chor { font-size: .8125rem; color: var(--kit-meta); margin: .15rem 0 0; }

.ht-pills { display: flex; gap: .35rem; flex-wrap: wrap; margin: .75rem 0 0; }
.ht-pill {
  background: var(--kit-surface-2); color: var(--kit-soft);
  border-radius: 999px; padding: .25rem .7rem; font-size: .8125rem;
}

.ht-alert {
  background: var(--ht-alert-bg); border-left: 3px solid var(--ht-alert);
  border-radius: 0; padding: .6rem .8rem; margin: .9rem 0 0;
  color: var(--ht-alert); font-size: .9375rem; line-height: 1.45;
}
.ht-alert b { font-weight: 600; }
.ht-alert + .ht-alert { margin-top: .4rem; }

.ht-note {
  color: var(--kit-muted); font-size: .875rem; line-height: 1.5;
  margin: .9rem 0 0; padding-left: .8rem; border-left: 1px solid var(--kit-line);
}

/* --- section cards ------------------------------------------------------ */

.ht-sections { margin: 1.25rem 0 0; }
.ht-section {
  background: var(--kit-surface); border: 1px solid var(--kit-line);
  border-radius: 10px; margin-bottom: .5rem; overflow: hidden;
}
.ht-section.has-restart { border-color: var(--ht-alert-line); }
.ht-sec-head {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; color: inherit; font: inherit; padding: .75rem .85rem;
}
.ht-sec-counts {
  font-size: .75rem; color: var(--kit-meta); letter-spacing: .06em;
  display: flex; align-items: center; gap: .5rem;
}
.ht-sec-plain {
  display: block; font-size: 1.0625rem; color: var(--kit-ink); line-height: 1.3;
  margin: .15rem 0 .4rem;
}
.ht-arrows {
  display: block; color: var(--kit-accent); font-size: 1.125rem;
  letter-spacing: .22em; line-height: 1;
}
.ht-restart-flag {
  color: var(--ht-alert); font-size: .6875rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
}

.ht-sec-body { padding: 0 .85rem .8rem; border-top: 1px solid var(--kit-line); }
.ht-sec-label {
  font-family: var(--kit-mono, ui-monospace, monospace);
  font-size: .6875rem; color: var(--kit-meta); letter-spacing: .04em;
  margin: .7rem 0 .6rem; line-height: 1.5;
}

/* The step grid: count, arrow, description. Used on the dance screen and, at a
   larger scale, in Floor mode. */
.ht-steps { display: grid; grid-template-columns: 1.6rem 1.4rem 1fr; gap: .3rem .55rem; align-items: baseline; }
.ht-step-count { color: var(--kit-meta); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.ht-step-arrow { color: var(--kit-accent); font-size: 1.0625rem; line-height: 1; }
.ht-step-text  { color: var(--kit-ink); font-size: .9375rem; line-height: 1.45; }
.ht-step-here {
  grid-column: 1 / -1; color: var(--ht-alert); font-size: .75rem; font-weight: 600;
  letter-spacing: .05em; padding: .25rem 0;
}

.ht-var {
  color: var(--kit-muted); font-size: .8125rem; line-height: 1.5;
  margin: .7rem 0 0; padding-left: .7rem; border-left: 1px solid var(--kit-line);
}

/* A move term inside a label or step: tap for the glossary definition. */
.ht-term {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: inherit; border-bottom: 1px dotted var(--kit-accent-line);
}
.ht-term:hover, .ht-term:focus-visible { color: var(--kit-accent); outline: none; }

/* --- actions ------------------------------------------------------------ */

.ht-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.25rem 0 0; }
.ht-marks { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1.25rem 0 0; }
.ht-mark {
  flex: 1 1 0; min-width: 5.5rem; background: var(--kit-surface);
  border: 1px solid var(--kit-line); color: var(--kit-soft);
  border-radius: 8px; padding: .55rem .5rem; font-size: .875rem; cursor: pointer;
}
.ht-mark.is-on { border-color: var(--kit-accent); color: var(--kit-accent); background: var(--kit-accent-soft); }

.ht-floorbtn {
  width: 100%; margin: 1.25rem 0 0; padding: .95rem 1rem;
  background: var(--kit-accent); color: var(--kit-on-accent);
  border: 0; border-radius: 10px; font-size: 1.0625rem; font-weight: 600; cursor: pointer;
}
.ht-floorbtn:hover { background: var(--kit-accent-hover); }

.ht-link {
  display: inline-block; color: var(--kit-accent); font-size: .875rem;
  text-decoration: none; border-bottom: 1px solid var(--kit-accent-line);
}

/* --- floor mode ---------------------------------------------------------
   The arm's-length, mid-song view: one section fills the screen. Everything
   here is deliberately bigger than the rest of the app. ------------------- */

.ht-floor { display: flex; flex-direction: column; min-height: 78vh; }
.ht-floor-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.1rem;
}
.ht-floor-pos { color: var(--kit-accent); font-size: 1rem; font-variant-numeric: tabular-nums; }
.ht-floor-counts { color: var(--kit-accent); font-size: 2rem; line-height: 1; margin: 0; }
.ht-floor-plain {
  color: var(--kit-soft); font-size: 1.0625rem; line-height: 1.35;
  margin: .35rem 0 1.2rem;
}
.ht-floor .ht-steps { grid-template-columns: 1.9rem 1.7rem 1fr; gap: .55rem .7rem; }
.ht-floor .ht-step-count { font-size: 1.1875rem; }
.ht-floor .ht-step-arrow { font-size: 1.4375rem; }
.ht-floor .ht-step-text  { font-size: 1.1875rem; line-height: 1.35; }

.ht-floor-nav { display: flex; gap: .5rem; align-items: center; margin-top: auto; padding-top: 1.5rem; }
.ht-floor-nav button {
  flex: 1; background: var(--kit-surface-2); border: 1px solid var(--kit-line);
  color: var(--kit-ink); border-radius: 10px; padding: .95rem; font-size: 1.25rem; cursor: pointer;
}
.ht-floor-nav button:disabled { opacity: .35; cursor: default; }
.ht-dots { display: flex; gap: .45rem; justify-content: center; padding: 0 .5rem; }
.ht-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--kit-line-strong); }
.ht-dot.is-on { background: var(--kit-accent); }

/* --- glossary ------------------------------------------------------------ */

.ht-term-row { padding: .75rem 0; border-bottom: 1px solid var(--kit-line); }
.ht-term-name { color: var(--kit-ink); font-size: 1rem; }
.ht-term-arrow { color: var(--kit-accent); font-size: 1.125rem; margin-left: .4rem; }
.ht-term-desc { color: var(--kit-soft); font-size: .875rem; line-height: 1.55; margin: .25rem 0 0; }
.ht-term-ex {
  color: var(--kit-muted); font-size: .8125rem; line-height: 1.6;
  margin: .35rem 0 0; padding-left: .7rem; border-left: 1px solid var(--kit-line);
}

/* The peek sheet: tapping a move term explains it without losing your place. */
.ht-peek-back {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 40;
  border: 0; padding: 0; cursor: pointer;
}
.ht-peek {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  background: var(--kit-surface-2); border-top: 1px solid var(--kit-edge);
  border-radius: 14px 14px 0 0; padding: 1.1rem 1.15rem max(1.4rem, env(safe-area-inset-bottom));
  max-height: 70vh; overflow-y: auto;
}
.ht-peek-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ht-peek-title { color: var(--kit-ink); font-size: 1.1875rem; margin: 0; }
.ht-peek-close { background: none; border: 0; color: var(--kit-muted); font-size: 1.5rem; cursor: pointer; line-height: 1; }

/* --- guide --------------------------------------------------------------- */

.ht-guide-sec { margin: 0 0 1.75rem; }
.ht-guide-title { color: var(--kit-ink); font-size: 1.125rem; margin: 0 0 .6rem; line-height: 1.3; }
.ht-guide-list { margin: 0; padding-left: 1.1rem; color: var(--kit-soft); }
.ht-guide-list li { font-size: .9375rem; line-height: 1.6; margin-bottom: .45rem; }

.ht-tbl { width: 100%; border-collapse: collapse; margin: .35rem 0 0; }
.ht-tbl td { padding: .5rem .5rem .5rem 0; border-bottom: 1px solid var(--kit-line); vertical-align: top; font-size: .875rem; line-height: 1.5; }
.ht-tbl td:first-child { color: var(--kit-ink); white-space: nowrap; padding-right: .9rem; }
.ht-tbl td:not(:first-child) { color: var(--kit-muted); }

/* --- misc ---------------------------------------------------------------- */

.ht-lead { color: var(--kit-muted); font-size: .875rem; line-height: 1.6; margin: 0 0 1.25rem; }
.ht-count-note { color: var(--kit-meta); font-size: .8125rem; margin: 1.5rem 0 0; }

@media (min-width: 700px) {
  .ht-dance-name { font-size: 1.75rem; }
  .ht-floor-counts { font-size: 2.5rem; }
  .ht-floor .ht-step-text { font-size: 1.3125rem; }
}
