/* Tone Changer v2 — layered on aiwa-paraphrase.css (shared app shell) */
.tone-changer-page #ppModeMenu { width: 640px; }
.tn-tone-list { grid-template-columns: 1fr 1fr; }
.tn-tone-list button[data-tone="custom"] { grid-column: 1 / -1; }
.tn-ctx-menu { width: 440px; padding: 12px 14px 14px; }
.tn-ctx-label { margin: 8px 0 6px; color: var(--aiwa-muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.tn-ctx-label:first-child { margin-top: 0; }
.tn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tn-chips button { min-height: 30px; padding: 4px 12px; border: 1px solid var(--aiwa-line); border-radius: 999px; background: #fff; color: var(--aiwa-text); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; transition: background-color 120ms, border-color 120ms, color 120ms; }
.tn-chips button:hover { border-color: #9bc7aa; background: var(--aiwa-brand-soft); color: var(--aiwa-brand-dark); }
.tn-chips button[aria-checked="true"] { border-color: var(--aiwa-brand); background: var(--aiwa-brand); color: #fff; }
.tn-ctx-dd .pp-mode-btn-text b { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-strength .pp-synonyms-value { min-width: 60px; }
.tone-changer-page .pp-switch-text { display: inline; }
.tone-changer-page .pp-backdrop .pp-fz { background: rgba(19, 122, 61, 0.14); box-shadow: inset 0 -2px 0 var(--aiwa-brand); }
.tn-output { font-size: 16px; line-height: 1.9; }
.tn-output .pp-s { cursor: pointer; }
.tn-output .pp-frozen { border-radius: 3px; }
/* tone analysis card */
.tn-report { margin: 0 0 16px; padding: 12px 14px 10px; border: 1px solid #d8e6dc; border-radius: 14px; background: linear-gradient(180deg, #f7fbf8, #fff); font-size: 13px; line-height: 1.45; }
.tn-report[hidden], .tn-output.hide-report .tn-report { display: none; }
.tn-report-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.tn-report-head .aiwa-ui-icon { width: 14px; height: 14px; filter: invert(35%) sepia(70%) saturate(680%) hue-rotate(97deg) brightness(91%); }
.tn-report-head strong { color: var(--aiwa-ink); font-size: 13px; }
.tn-labels { display: inline-flex; align-items: center; gap: 6px; color: var(--aiwa-muted); font-size: 12px; font-weight: 650; }
.tn-labels b { padding: 2px 8px; border-radius: 999px; background: #eef1ef; color: var(--aiwa-text); font-weight: 700; }
.tn-labels b.is-after { background: var(--aiwa-brand-soft); color: var(--aiwa-brand-dark); }
.tn-labels .tn-arrow { color: #9aa7a0; }
.tn-scales { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; }
.tn-scale { display: grid; gap: 4px; min-width: 0; }
.tn-scale-name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: var(--aiwa-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.tn-scale-name span { color: var(--aiwa-brand-dark); letter-spacing: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.tn-scale-name span.is-down { color: #8f3f12; }
.tn-scale-name span.is-flat { color: var(--aiwa-muted); }
.tn-track { position: relative; height: 8px; border-radius: 999px; background: #e6ece8; overflow: visible; }
.tn-track i { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: rgba(19, 122, 61, 0.28); transition: left 380ms ease, width 380ms ease; }
.tn-track i.is-down { background: rgba(179, 84, 30, 0.25); }
.tn-track b { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px #fff; transition: left 380ms ease; }
.tn-track b.is-before { background: #b8c3bc; }
.tn-track b.is-after { background: var(--aiwa-brand); z-index: 1; }
.tn-note { margin: 10px 0 0; color: var(--aiwa-text); font-size: 12.5px; }
.tn-shift { color: var(--aiwa-text); max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tone-changer-page .pp-bar-left { min-width: 0; overflow: hidden; }
@media (max-width: 1560px) { .tn-shift { display: none; } }
.tn-shift b { color: var(--aiwa-brand-dark); }
.tn-shift .tn-arrow { color: #9aa7a0; margin: 0 2px; }
.tone-changer-page #tnReportToggle[aria-pressed="true"] { color: var(--aiwa-brand-dark); }
.tone-changer-page #tnReportToggle[aria-pressed="true"] .aiwa-ui-icon { filter: invert(35%) sepia(70%) saturate(680%) hue-rotate(97deg) brightness(91%); }
.tn-pop .pp-pop-orig { white-space: normal; font-size: 11.5px; line-height: 1.35; max-height: 2.7em; overflow: hidden; }
@media (max-width: 1500px) { .tn-ctx-dd .pp-mode-btn-text b { max-width: 140px; } }
@media (max-width: 1200px) { .tn-ctx-dd .pp-mode-btn-text b { max-width: 110px; } .tn-strength .pp-synonyms-value { min-width: 52px; } }
@media (max-width: 900px) {
  .tone-changer-page #ppModeMenu { width: auto; }
  .tn-tone-list { grid-template-columns: 1fr; }
  .tn-ctx-menu { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; max-width: none; padding: 14px 14px max(16px, env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; box-shadow: 0 -18px 48px rgba(10, 40, 24, 0.22); }
  .tn-ctx-dd .pp-mode-btn-text b { max-width: 120px; }
  .tn-scales { grid-template-columns: 1fr; gap: 8px; }
  .tn-report { padding: 10px 12px 8px; font-size: 12.5px; }
  .tn-shift { display: none; }
}
