/* ==========================================================================
   Review & Save Words: "calm list" (Dom, 2026-11-13).
   Each word is plain text with the word itself big, thin lines between
   words, no boxes. Edit opens one word at a time in a soft grey box whose
   fields are text with a dashed underline (idea 2's edit box). No Context
   box. The page scrolls as a whole and Cancel / Save stay at the bottom.
   Ideas it was picked from: scan-review-ideas-2026-11-13 in the RC folder.
   Loaded after look-hc.css, so it uses the --hc-* colours.
   ========================================================================== */

/* The whole page scrolls (the list no longer scrolls inside its own box). */
.bulk-calm .bulk-review-list { max-height: none; overflow: visible; padding: 0; gap: 0; }
.bulk-calm { gap: 8px; }
.bulk-calm .bulk-autosort-toggle { margin: 0; font-size: 0.85rem; color: var(--hc-muted); }

/* Photo header: small thumbnail, short caption. */
.bulk-calm .bulk-photo-group { gap: 0; }
.bulk-calm .bulk-photo-group + .bulk-photo-group { border-top: none; padding-top: 0; margin-top: 18px; }
.bulk-calm .bulk-photo-head { gap: 10px; margin: 6px 0 2px; }
.bulk-calm .bulk-photo-thumb { width: 44px; height: 44px; border: 1px solid var(--hc-muted); border-radius: 4px; }
.bulk-calm .bulk-photo-caption { font-size: 0.95rem; gap: 0; }
.bulk-calm .bulk-photo-hint { font-size: 0.78rem; color: var(--hc-muted); }

/* Shared reset for both word layouts. */
.bulk-calm .bulk-review-card {
  display: block;
  position: relative;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  padding: 0;
}
.bulk-calm .bulk-review-card:hover { box-shadow: none; transform: none; }

/* ---------- One word, closed ---------- */
.bulk-calm .calm-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--hc-muted) 40%, transparent);
}
.bulk-calm .calm-row:last-child { border-bottom: none; }
.bulk-calm .calm-main { flex: 1; min-width: 0; }
.bulk-calm .calm-hero { font-size: 1.6rem; font-weight: 700; line-height: 1.2; color: var(--hc-ink); word-break: break-word; }
.bulk-calm .calm-reading { font-size: 0.85rem; color: var(--hc-muted); }
.bulk-calm .calm-en { font-size: 1rem; color: var(--hc-ink); margin-top: 2px; word-break: break-word; }
.bulk-calm .calm-meta { font-size: 0.78rem; color: var(--hc-muted); margin-top: 4px; }
.bulk-calm .calm-meta:empty { display: none; }
.bulk-calm .calm-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.bulk-calm .calm-edit-btn {
  font: inherit;
  font-size: 0.85rem;
  color: var(--hc-ink);
  background: none;
  border: 1px solid var(--hc-muted);
  border-radius: 4px;
  padding: 5px 12px;
  min-height: 32px;
  cursor: pointer;
}

/* ✕ and its Dismiss / Ignore menu: a quiet icon, not a circled button. */
.bulk-calm .calm-x-wrap { position: relative; }
.bulk-calm .bulk-review-card .bulk-delete-btn {
  position: static;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 4px;
  background: none;
  box-shadow: none;
  color: var(--hc-muted);
  font-size: 1.1rem;
}
.bulk-calm .bulk-review-card .bulk-x-menu { top: 100%; right: 0; }
.bulk-calm .calm-open > .calm-x-wrap { position: absolute; top: 4px; right: 4px; }

/* "Also could be 機会 · opportunity  Switch" */
.bulk-calm .calm-alts { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.bulk-calm .calm-alt { font-size: 0.82rem; color: var(--hc-ink); }
.bulk-calm .calm-alt b { font-weight: 700; }
.bulk-calm .calm-link {
  background: none;
  border: none;
  padding: 2px 4px;
  margin: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hc-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 0;
  cursor: pointer;
}

/* ---------- One word, open for editing (soft grey box) ---------- */
.bulk-calm .calm-open {
  background: var(--hc-surface-2);
  border-radius: 8px;
  padding: 12px 12px 10px;
  margin: 8px 0;
}
.bulk-calm .calm-open .calm-field {
  display: block;
  width: calc(100% - 36px);
  padding: 4px 0;
  margin: 0 0 6px;
  border: none;
  border-bottom: 1px dashed var(--hc-muted);
  border-radius: 0;
  background: none;
  color: var(--hc-ink);
  font-family: inherit;
  resize: none;
  overflow: hidden;
  box-shadow: none;
}
.bulk-calm .calm-open .calm-field:focus { outline: none; border-bottom: 2px solid var(--hc-ink); }
.bulk-calm .calm-open .calm-field-target { font-size: 1.35rem; font-weight: 700; font-family: var(--font-ja, inherit); }
.bulk-calm .calm-open .calm-field-en { font-size: 1rem; width: 100%; }
.bulk-calm .calm-open .bulk-review-sentence { font-size: 0.8rem; color: var(--hc-muted); margin: 4px 0 0; }

/* Playlists as small grey tags. */
.bulk-calm .calm-open .bulk-review-playlists { margin-top: 10px; gap: 6px; }
.bulk-calm .calm-open .bulk-pl-label { display: none; }
.bulk-calm .calm-open .bulk-pl-chip {
  border: none;
  border-radius: 4px;
  background: var(--hc-surface);
  padding: 3px 2px 3px 8px;
  font-size: 0.78rem;
}
.bulk-calm .calm-open .bulk-pl-chip.new { border: 1px dashed var(--hc-muted); }
.bulk-calm .calm-open .bulk-pl-chip em { color: var(--hc-muted); }
.bulk-calm .calm-open .bulk-pl-select {
  border: none;
  background: none;
  color: var(--hc-muted);
  font-size: 0.78rem;
  padding: 3px 4px;
  min-height: 0;
}
.bulk-calm .calm-open-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.bulk-calm .calm-done-btn { padding: 6px 18px; min-height: 36px; }

/* Cancel / Save stay at the bottom of the screen while scrolling. */
.bulk-calm .bulk-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 8px -4px 0;
  padding: 12px 4px calc(10px + env(safe-area-inset-bottom));
  background: var(--hc-surface);
  border-top: 1px solid color-mix(in srgb, var(--hc-muted) 40%, transparent);
}
/* The Feedback button moves up out of the way of that bar. */
body:has(.bulk-calm) .fb-btn { bottom: calc(96px + env(safe-area-inset-bottom)); }
/* ...and the page ends with enough room that, scrolled to the bottom,
   the Feedback button sits below Save instead of on top of it. */
body:has(.bulk-calm) #app { padding-bottom: 112px; }
