/* Presentation Timer — tool styles (base copied from script-timer) */

.tool-shell {
  background: #05070a;
  background-image: none;
  min-height: calc(100vh - var(--header-h, 72px));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(2rem, 5vw, 3.5rem) var(--page-pad-inline, 1.25rem);
}

.tool-card {
  width: 100%;
  max-width: 680px;
  background: #111a2e;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(96, 165, 250, 0.06);
  overflow: hidden;
}

.tool-card__header {
  padding: 1.75rem 2rem 0;
}

.tool-card__eyebrow {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60a5fa;
  margin: 0 0 0.5rem;
}

.tool-card__title {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  color: #f1f5f9;
}

/* Mode tabs */
.mode-tabs {
  display: flex;
  gap: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 0;
}

.mode-tab {
  flex: 1;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}

.mode-tab.is-active {
  background: #1d4ed8;
  color: #f1f5f9;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.4);
}

.mode-tab:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
}

/* Tool panels */
.tool-panel {
  padding: 1.5rem 2rem 2rem;
  display: none;
}

.tool-panel.is-active {
  display: block;
}

/* Textarea / input */
.calc-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.calc-textarea {
  width: 100%;
  min-height: 130px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 10px;
  color: #f1f5f9;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 0.9375rem;
  line-height: 1.55;
  resize: vertical;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.calc-textarea:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.45);
}

.calc-textarea::placeholder {
  color: #475569;
}

.word-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #60a5fa;
  font-weight: 600;
  margin-top: 0.5rem;
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

.calc-number-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 10px;
  color: #f1f5f9;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
  box-sizing: border-box;
}

.calc-number-input::-webkit-inner-spin-button,
.calc-number-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.calc-number-input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.45);
}

/* Speed selector */
.speed-group {
  margin-top: 1.25rem;
}

.speed-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.speed-btn {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.speed-btn .speed-wpm {
  display: block;
  font-size: 1rem;
  color: #cbd5e1;
}

.speed-btn .speed-label {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.speed-btn.is-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}

.speed-btn.is-active .speed-wpm {
  color: #93c5fd;
}

.speed-btn:not(.is-active):hover {
  border-color: rgba(96, 165, 250, 0.35);
  color: #cbd5e1;
}

.speed-custom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.625rem;
}

.speed-custom__label {
  font-size: 0.8rem;
  color: #64748b;
  white-space: nowrap;
}

.speed-custom__input {
  width: 5.5rem;
  padding: 0.45rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 8px;
  color: #f1f5f9;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
  box-sizing: border-box;
}

.speed-custom__input::-webkit-inner-spin-button,
.speed-custom__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.speed-custom__input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.45);
}

.speed-custom__unit {
  font-size: 0.8rem;
  color: #64748b;
}

/* Result */
.calc-result {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 12px;
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.calc-result__value {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #93c5fd;
  line-height: 1;
}

.calc-result__label {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.calc-result__words {
  font-size: 0.875rem;
  color: #60a5fa;
  font-weight: 600;
}

.calc-result--empty .calc-result__value {
  font-size: 1.1rem;
  color: #475569;
  font-weight: 500;
}

/* Reference table */
.ref-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.12);
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ref-table th {
  padding: 0.75rem 1rem;
  text-align: start;
  background: rgba(29, 78, 216, 0.15);
  color: #93c5fd;
  font-family: var(--font-display, "Sora", sans-serif);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid rgba(96, 165, 250, 0.12);
}

.ref-table td {
  padding: 0.65rem 1rem;
  color: #94a3b8;
  border-bottom: 1px solid rgba(96, 165, 250, 0.07);
  white-space: nowrap;
}

.ref-table tr:last-child td {
  border-bottom: none;
}

.ref-table td:first-child {
  color: #f1f5f9;
  font-weight: 600;
  font-family: var(--font-display, "Sora", sans-serif);
}

.ref-table tr:hover td {
  background: rgba(59, 130, 246, 0.05);
}

/* CTA bar inside the old single-card layout (translated pages); the English page uses the shared .tool-cta card */
.tool-card .tool-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(29, 78, 216, 0.08);
  border-top: 1px solid rgba(96, 165, 250, 0.1);
}

.tool-card .tool-cta p {
  flex: 0 0 100%;
  width: 100%;
  margin: 0;
  color: #94a3b8;
  font-size: 0.9375rem;
  text-align: center;
}

.tool-card .tool-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

@media (max-width: 560px) {
  .tool-card__header {
    padding: 1.25rem 1.25rem 0;
  }
  .tool-panel {
    padding: 1.25rem 1.25rem 1.5rem;
  }
  .calc-row {
    grid-template-columns: 1fr;
  }
  .speed-buttons {
    flex-wrap: wrap;
  }
  .speed-btn {
    flex: 1 1 calc(33% - 0.5rem);
  }
}

/* ── Script Timer additions ── */
.tool-card { max-width: 760px; }

.tool-description {
  margin: -0.75rem 0 1.25rem;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.tool-section { padding: 1.25rem 2rem 0; }
.tool-section:last-of-type { padding-bottom: 1.75rem; }

.script-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 0.5rem;
}

.script-meta .word-count-badge { margin-top: 0; }

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  cursor: pointer;
}

.check-inline input { accent-color: #3b82f6; }

.speed-buttons--4 .speed-btn { min-width: 0; }

.wpm-slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.wpm-slider-row input[type="range"] {
  flex: 1;
  accent-color: #3b82f6;
  min-width: 0;
}

.wpm-value {
  font-family: var(--font-display, "Sora", sans-serif);
  font-weight: 700;
  color: #93c5fd;
  min-width: 5.5rem;
  text-align: end;
  font-size: 0.95rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.chip {
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover { border-color: rgba(96, 165, 250, 0.4); color: #cbd5e1; }

.chip.is-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
}

.chip-row--targets .chip { font-variant-numeric: tabular-nums; }

.target-note {
  margin: 0.6rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}

.target-note a { color: #60a5fa; }

.custom-target {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.custom-target[hidden] { display: none; }

.custom-target input {
  width: 4rem;
  padding: 0.4rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 8px;
  color: #f1f5f9;
  font-weight: 600;
  text-align: center;
  box-sizing: border-box;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.result-tile {
  padding: 1rem;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 12px;
  text-align: center;
}

.result-tile__value {
  margin: 0;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  font-weight: 700;
  color: #93c5fd;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.result-tile__label {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fit-status {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.fit-status__text {
  margin: 0 0 0.6rem;
  font-weight: 600;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.fit-status.is-ok { border-color: rgba(52, 211, 153, 0.4); }
.fit-status.is-ok .fit-status__text { color: #6ee7b7; }
.fit-status.is-over { border-color: rgba(248, 113, 113, 0.45); }
.fit-status.is-over .fit-status__text { color: #fca5a5; }

.fit-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.fit-bar__fill {
  height: 100%;
  width: 0;
  background: #3b82f6;
  border-radius: 999px;
  transition: width 0.2s;
}

.fit-status.is-ok .fit-bar__fill { background: #34d399; }
.fit-status.is-over .fit-bar__fill { background: #f87171; }

.stopwatch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.stopwatch__time {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: #f1f5f9;
  font-variant-numeric: tabular-nums;
  min-width: 5.5rem;
}

.stopwatch__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.btn-ghost {
  padding: 0.55rem 1rem;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-ghost:hover { background: rgba(59, 130, 246, 0.12); }
.btn-ghost[disabled] { opacity: 0.45; cursor: default; }

.stopwatch__pace {
  flex: 1 1 100%;
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: #94a3b8;
}

.stopwatch__pace strong { color: #93c5fd; }

.tool-card .tool-cta .btn-download { border: none; cursor: pointer; font-family: inherit; }

.tool-cta__hint {
  font-size: 0.8125rem !important;
  color: #64748b !important;
}

.answer-block {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-inline-start: 3px solid #3b82f6;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 0 12px 12px 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.prose-block {
  max-width: 760px;
  margin: 0 auto;
  color: #94a3b8;
  line-height: 1.7;
}

.prose-block p { margin: 0 0 1rem; }
.prose-block a, .source-note a, .ref-table a { color: #60a5fa; }

.source-note {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}

.ref-table td.wrap-cell { white-space: normal; min-width: 12rem; }

.app-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: center;
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem;
  background: #111a2e;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 20px;
}

.app-card img { width: 100%; height: auto; border-radius: 12px; display: block; }
.app-card h2 { margin: 0 0 0.5rem; font-family: var(--font-display, "Sora", sans-serif); font-size: 1.3rem; color: #f1f5f9; }
.app-card p { margin: 0 0 1rem; color: #94a3b8; line-height: 1.6; }
.app-card__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

@media (max-width: 560px) {
  .tool-section { padding: 1.1rem 1.25rem 0; }
  .tool-section:last-of-type { padding-bottom: 1.5rem; }
  .speed-buttons--4 .speed-btn { flex: 1 1 calc(50% - 0.5rem); }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .result-tile--wide { grid-column: 1 / -1; }
  .app-card { grid-template-columns: 1fr; }
  .tool-card .tool-cta { padding: 1.5rem 1.25rem; }
}

/* ── Presentation Timer additions ── */
.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.signal-input {
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.signal-input__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
}

.signal-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  flex: none;
}
.signal-dot--green { background: #16a34a; }
.signal-dot--yellow { background: #eab308; }
.signal-dot--red { background: #dc2626; }
.signal-dot--blue { background: #2563eb; }
.signal-dot--purple { background: #7c3aed; }

.signal-input__fields {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #64748b;
  font-weight: 700;
}

.signal-input__fields input {
  width: 100%;
  min-width: 0;
  padding: 0.4rem 0.3rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 8px;
  color: #f1f5f9;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}

/* The big timing card */
.timer-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 300px;
  padding: 1.5rem 1rem 1rem;
  border-radius: 18px;
  background: #1e293b;
  color: #f8fafc;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.35s ease;
}

.timer-stage.is-green { background: #15803d; }
.timer-stage.is-yellow { background: #ca8a04; color: #111827; }
.timer-stage.is-red { background: #b91c1c; }
.timer-stage.is-blue { background: #1d4ed8; }
.timer-stage.is-purple { background: #6d28d9; }

.timer-stage__signal {
  margin: 0;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.timer-stage__time {
  margin: 0;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(4rem, 17vw, 8.5rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.timer-stage.is-time-hidden .timer-stage__time { visibility: hidden; }

.timer-stage__next {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.timer-stage__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.timer-btn {
  min-width: 6.5rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.timer-btn:hover { background: rgba(0, 0, 0, 0.4); }
.timer-btn--primary { background: #f8fafc; color: #0f172a; border-color: #f8fafc; }
.timer-btn--primary:hover { background: #e2e8f0; }
.timer-stage.is-yellow .timer-btn { border-color: rgba(17, 24, 39, 0.4); }

.timer-stage__keys {
  margin: 0.6rem 0 0;
  font-size: 0.75rem;
  opacity: 0.7;
}

@keyframes timer-flash {
  0%, 100% { filter: none; }
  50% { filter: brightness(1.8) saturate(0.6); }
}

.timer-stage.is-flashing { animation: timer-flash 1s steps(1, end) infinite; }

@media (prefers-reduced-motion: reduce) {
  .timer-stage.is-flashing { animation-duration: 2s; }
}

/* Native fullscreen and the pseudo-fullscreen fallback share one look */
.timer-stage:fullscreen,
.timer-stage.is-pseudo-fs {
  border-radius: 0;
  min-height: 100vh;
  width: 100%;
}
.timer-stage:-webkit-full-screen { border-radius: 0; width: 100%; height: 100%; }

.timer-stage.is-pseudo-fs {
  position: fixed;
  inset: 0;
  z-index: 1000;
  min-height: 100dvh;
}

.timer-stage:fullscreen .timer-stage__time,
.timer-stage.is-pseudo-fs .timer-stage__time { font-size: clamp(5rem, 24vw, 22rem); }
.timer-stage:fullscreen .timer-stage__signal,
.timer-stage.is-pseudo-fs .timer-stage__signal { font-size: clamp(1.2rem, 4vw, 2.4rem); }

html.timer-fs-lock, html.timer-fs-lock body { overflow: hidden; }

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 0.9rem;
}

/* Speaker log */
.log-entry {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.log-entry input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.log-table-wrap { margin-top: 0.75rem; overflow-x: auto; }

.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.log-table th {
  text-align: start;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid rgba(96, 165, 250, 0.14);
}

.log-table td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.log-table .log-time { font-variant-numeric: tabular-nums; font-weight: 600; color: #f1f5f9; }
.log-status.is-ok { color: #6ee7b7; }
.log-status.is-under { color: #fcd34d; }
.log-status.is-over { color: #fca5a5; }

.log-del {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.3rem;
}
.log-del:hover { color: #f87171; }

.log-empty { margin: 0.6rem 0 0; font-size: 0.8125rem; color: #64748b; }

.log-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }

.timing-table td:not(:first-child) { font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .signal-grid { gap: 0.4rem; }
  .signal-input { padding: 0.5rem; }
  .timer-stage { min-height: 260px; }
  .timer-btn { min-width: 5.5rem; }
}

/* ── 2026-11 redesign: photo hero, two-column tool, explainer rows ── */
.pt-hero {
  position: relative;
  overflow: hidden;
  background: #05070a;
  border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}
.pt-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
}
.pt-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 9, 18, 0.95) 0%, rgba(5, 9, 18, 0.82) 40%, rgba(5, 9, 18, 0.25) 72%, rgba(5, 9, 18, 0.1) 100%);
}
.pt-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3rem) var(--page-pad-inline, 1.25rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}
.pt-hero__copy > * { max-width: 36rem; }
.pt-hero__eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright, #60a5fa);
}
.pt-hero__title {
  margin: 0;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #f8fafc;
}
.pt-hero__title span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.55em;
  letter-spacing: -0.01em;
  color: var(--accent-bright, #60a5fa);
}
.pt-hero__lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #cbd5e1;
}
.pt-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pt-hero__chips li {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Tool: presets + log on the right, the big card on the left (desktop); stacked on mobile */
.pt-tool {
  background: #05070a;
  padding: clamp(1.25rem, 3vw, 2rem) var(--page-pad-inline, 1.25rem) clamp(2rem, 5vw, 3.5rem);
}
.pt-tool__grid {
  display: grid;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  grid-template-areas: "stage" "presets" "log";
}
.pt-panel {
  min-width: 0;
  padding: 1.25rem;
  background: #111a2e;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.pt-panel--presets { grid-area: presets; }
.pt-panel--stage { grid-area: stage; padding: 0.75rem; }
.pt-panel--log { grid-area: log; }
.pt-panel--stage .option-row { padding: 0 0.5rem 0.4rem; }
.pt-panel__sublabel { margin-top: 1.1rem; }
.pt-panel .signal-grid { margin-top: 0; }
.pt-panel--stage .timer-stage { min-height: 320px; }

@media (min-width: 900px) {
  .pt-tool__grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "stage presets" "stage log";
    align-items: start;
  }
  .pt-panel--stage { position: sticky; top: calc(var(--header-h, 72px) + 1rem); }
  .pt-panel--stage .timer-stage { min-height: 400px; }
}

@media (max-width: 719px) {
  .pt-hero__img {
    position: relative;
    display: block;
    height: 150px;
    object-position: 75% 30%;
  }
  .pt-hero::after {
    inset: 0 0 auto 0;
    height: 150px;
    background: linear-gradient(180deg, rgba(5, 9, 18, 0) 45%, rgba(5, 9, 18, 1) 100%);
  }
  .pt-hero__copy { padding-top: 0.25rem; padding-bottom: 1.25rem; gap: 0.7rem; }
  .pt-hero__lead { font-size: 0.95rem; line-height: 1.5; }
  .pt-hero__title { font-size: 2rem; }
  .pt-hero__chips li { font-size: 0.78rem; padding: 0.3rem 0.65rem; }
  .pt-panel { padding: 1rem; border-radius: 16px; }
  .pt-panel--stage { padding: 0.5rem; }
}

/* Timing rules visual (built from HTML, not an image) */
.pt-rules {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.pt-rule {
  padding: 1rem;
  border-radius: 16px;
  background: #0f1a33;
  border: 1px solid rgba(96, 165, 250, 0.16);
}
.pt-rule--wide { grid-column: 1 / -1; }
.pt-rule__name {
  margin: 0 0 0.7rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-display, "Sora", sans-serif);
  font-weight: 600;
  color: #f1f5f9;
}
.pt-rule__name span { color: #94a3b8; font-weight: 500; font-size: 0.85rem; white-space: nowrap; }
.pt-rule__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pt-rule__cards li {
  padding: 0.55rem 0.2rem;
  border-radius: 8px;
  text-align: center;
  font-family: var(--font-display, "Sora", sans-serif);
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.pt-rule--wide .pt-rule__cards li { font-size: 0.8rem; font-weight: 600; }
.pt-rule__cards .is-green { background: #15803d; }
.pt-rule__cards .is-yellow { background: #ca8a04; color: #111827; }
.pt-rule__cards .is-red { background: #b91c1c; }
.pt-rule__window { margin: 0.6rem 0 0; font-size: 0.82rem; color: #94a3b8; }
@media (max-width: 420px) {
  .pt-rules { grid-template-columns: 1fr; }
}

/* Tips */
.pt-tips { margin-top: clamp(3rem, 7vw, 5rem); }
.pt-tips > .section__title { text-align: center; margin-bottom: 1.5rem; }
.pt-tips__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.pt-tip {
  padding: 1.25rem;
  border-radius: 16px;
  background: #0f1a33;
  border: 1px solid rgba(96, 165, 250, 0.14);
}
.pt-tip h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1.05rem;
  color: #f1f5f9;
}
.pt-tip p { margin: 0; color: #94a3b8; line-height: 1.65; font-size: 0.95rem; }
.pt-tip a, .tool-row a { color: var(--accent-bright, #60a5fa); }

/* Right-to-left pages (ar, he): mirror the photo scrim so the text side stays dark. */
[dir="rtl"] .pt-hero::after { transform: scaleX(-1); }

/* The 36rem measure is for the lead paragraph; the title may run wider so it stays on one line. */
.pt-hero__copy > .pt-hero__title { max-width: 52rem; }
/* Japanese / Korean titles are long runs of wide glyphs: a smaller size keeps them on one
   line, and auto-phrase stops a wrap from splitting a word (ジェネレ|ーター). */
:lang(ja) .pt-hero__title,
:lang(ko) .pt-hero__title {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  word-break: auto-phrase;
}
