/* =============================================================================
   Stopwatch.now - Timer.css
   Timer/tool page specific styles
   ============================================================================= */

/* ---------------------------------------------------------------------------
   TOOL PAGE LAYOUT (2-column: main + sidebar)
   --------------------------------------------------------------------------- */
.tool-page-layout {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  box-sizing: border-box;
}

.tool-page-main {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.tool-page-sidebar {
  position: sticky;
  top: calc(64px + 20px);
}

/* Breadcrumb */
.tool-breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

.tool-breadcrumb a {
  color: #60a5fa;
  text-decoration: none;
}

.tool-breadcrumb a:hover {
  color: #f97316;
}

/* Page header */
.tool-header {
  margin-bottom: 28px;
}

.tool-title {
  font-size: 32px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 10px;
  line-height: 1.2;
}

.tool-intro {
  font-size: 16px;
  color: #94a3b8;
  line-height: 1.65;
}

/* Timer card - The main white card */
.timer-card {
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(180deg, #172033 0%, #111827 100%);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0,0,0,.26);
  padding: 40px 32px 32px;
  text-align: center;
  border: 1px solid #334155;
  margin-bottom: 28px;
}

.timer-card .timer-display,
.timer-card .timer-digits {
  font-size: 80px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f97316;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 8px;
}

.timer-card .timer-ms {
  font-size: 0.42em;
  opacity: 0.6;
}

/* Large timer buttons */
.btn-timer {
  min-width: 120px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-timer:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-icon {
  flex-shrink: 0;
}

/* Secondary controls row (fullscreen, dark mode) */
.timer-secondary-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

/* Shareable timer utility bar (Sound + Fullscreen) */
.timer-utility-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}

.timer-utility-bar .btn {
  width: auto;
  height: auto;
  color: #94a3b8;
  background: transparent;
  border: 1px solid #2d4060;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.timer-utility-bar .btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.timer-utility-bar .btn:hover {
  color: #e2e8f0;
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.08);
}

/* Timer overlay (Paused label) */
.timer-display-overlay {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #475569;
}

/* Laps section */
.laps-section {
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 28px;
}

.laps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.laps-title {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
}

.laps-actions {
  display: flex;
  gap: 8px;
}

.laps-empty {
  text-align: center;
  padding: 20px 0;
  color: #94a3b8;
  font-size: 14px;
}

.laps-empty kbd {
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  font-family: var(--font-display);
}

.laps-table-wrapper {
  overflow-x: auto;
}

.laps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.laps-table th {
  background: #152038;
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  border-bottom: 2px solid #2d4060;
}

.laps-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #2d4060;
  font-family: var(--font-display);
  color: #e2e8f0;
}

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

.laps-table tr.lap-best td { color: var(--success); }
.laps-table tr.lap-worst td { color: var(--danger); }

/* Keyboard shortcuts */
.shortcuts-section {
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 28px;
}

.shortcuts-title {
  font-size: 15px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 14px;
}

.shortcuts-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shortcut-row dt {
  min-width: 60px;
}

.shortcut-row kbd {
  display: inline-block;
  background: #152038;
  border: 1px solid #2d4060;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #f97316;
}

.shortcut-row dd {
  font-size: 13px;
  color: #94a3b8;
}

/* Use cases & content sections */
.tool-use-cases,
.content-section {
  margin-bottom: 36px;
}

.tool-use-cases h2,
.content-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 12px;
  margin-top: 28px;
}

.tool-use-cases h3,
.content-section h3 {
  font-size: 17px;
  font-weight: 600;
  color: #e2e8f0 !important;
  margin-bottom: 8px;
  margin-top: 20px;
}

.tool-use-cases p,
.content-section p {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 14px;
}

.tool-use-cases a,
.content-section a {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-section ol,
.content-section ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.content-section li {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 6px;
  list-style: decimal;
}

.content-section ul li {
  list-style: disc;
}

.content-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 20px;
}

.content-section table th {
  background: #1e2d45;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: #cbd5e1;
  border-bottom: 2px solid #2d4060;
}

.content-section table td {
  padding: 10px 14px;
  border-bottom: 1px solid #1e2d45;
  color: #94a3b8;
}

/* ---------------------------------------------------------------------------
   GLOBAL DARK-THEME TABLE OVERRIDE
   Defeats hardcoded inline light styles (background:#f8fafc, color:#1e3a8a etc.)
   present across many tool templates. !important beats inline style attributes.
   --------------------------------------------------------------------------- */
.tool-page-main table,
.info-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 20px;
}

.tool-page-main table th,
.info-section table th {
  background: #1e2d45 !important;
  color: #cbd5e1 !important;
  padding: 10px 14px !important;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 2px solid #2d4060 !important;
}

.tool-page-main table tr,
.info-section table tr {
  background: transparent !important;
}

.tool-page-main table tr:nth-child(even),
.info-section table tr:nth-child(even) {
  background: rgba(30, 45, 69, 0.5) !important;
}

.tool-page-main table td,
.info-section table td {
  padding: 9px 14px !important;
  border-bottom: 1px solid #1e2d45 !important;
  color: #94a3b8 !important;
}

.content-section code {
  font-family: var(--font-display);
  font-size: 13px;
  background: #152038;
  padding: 1px 6px;
  border-radius: 3px;
  color: #60a5fa;
}

/* .content-table - Used by tool templates with class="content-table" */
.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 12px 0 20px;
}

.content-table th {
  background: #1e2d45;
  color: #cbd5e1;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 2px solid #2d4060;
}

.content-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #1e2d45;
  color: #94a3b8;
}

.content-table tr:nth-child(even) td {
  background: rgba(30, 45, 69, 0.5);
}

/* ---------------------------------------------------------------------------
   LEGACY TOOL VARIANT STRUCTURE
   Older exam and presentation timer variants ship page-specific light styles.
   These overrides keep them visually aligned with the newer tool pages without
   rewriting each individual variant template.
   --------------------------------------------------------------------------- */
body.page-timer-variant .content-wrap {
  width: min(100% - 40px, 1180px) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
  padding: 34px 0 72px !important;
}

body.page-timer-variant .page-hero {
  max-width: 780px !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
  text-align: left !important;
}

body.page-timer-variant .page-hero h1 {
  color: #f8fafc !important;
  font-size: clamp(2rem, 4vw, 3rem) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

body.page-timer-variant .page-hero p {
  color: #a8b3c5 !important;
  font-size: 17px !important;
  line-height: 1.65 !important;
}

body.page-timer-variant .exam-stage,
body.page-timer-variant .timer-stage,
body.page-timer-variant .traffic-stage,
body.page-timer-variant .speech-stage,
body.page-timer-variant .light-stage {
  max-width: 760px !important;
  margin: 0 0 24px !important;
  padding: clamp(22px, 4vw, 36px) !important;
  background: #1e2d45 !important;
  border: 1px solid #2d4060 !important;
  border-radius: 8px !important;
  box-shadow: 0 18px 42px rgba(0,0,0,.22) !important;
}

body.page-timer-variant .exam-display,
body.page-timer-variant .timer-display,
body.page-timer-variant .display-time {
  color: #f97316 !important;
  letter-spacing: 0 !important;
  font-variant-numeric: tabular-nums !important;
}

body.page-timer-variant .exam-label,
body.page-timer-variant .timer-label,
body.page-timer-variant label {
  color: #a8b3c5 !important;
}

body.page-timer-variant .section {
  margin: 24px 0 !important;
  padding: clamp(20px, 3vw, 32px) !important;
  background: #1e2d45 !important;
  border: 1px solid #2d4060 !important;
  border-radius: 8px !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.18) !important;
}

body.page-timer-variant .section h2,
body.page-timer-variant .section h3 {
  color: #f8fafc !important;
}

body.page-timer-variant .section p,
body.page-timer-variant .section li {
  color: #a8b3c5 !important;
  line-height: 1.7 !important;
}

body.page-timer-variant .section a {
  color: #60a5fa !important;
  text-underline-offset: 2px !important;
}

body.page-timer-variant .content-wrap table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 14px 0 22px !important;
  font-size: 14px !important;
}

body.page-timer-variant .content-wrap th {
  background: #142033 !important;
  color: #dbe7f6 !important;
  padding: 11px 14px !important;
  border-bottom: 2px solid #2d4060 !important;
  text-align: left !important;
}

body.page-timer-variant .content-wrap td {
  color: #a8b3c5 !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid #2d4060 !important;
  background: transparent !important;
}

body.page-timer-variant .content-wrap tr:nth-child(even) td {
  background: rgba(20, 32, 51, .55) !important;
}

body.page-timer-variant .btn-exam,
body.page-timer-variant .btn-timer,
body.page-timer-variant .duration-select,
body.page-timer-variant .timer-form-input,
body.page-timer-variant input,
body.page-timer-variant select {
  border-radius: 7px !important;
  border: 1px solid #3d5578 !important;
  font-weight: 700 !important;
}

body.page-timer-variant input,
body.page-timer-variant select,
body.page-timer-variant .duration-select,
body.page-timer-variant .timer-form-input {
  background: #142033 !important;
  color: #f8fafc !important;
}

body.page-timer-variant .btn-start,
body.page-timer-variant .btn-exam.btn-start {
  background: #0abf68 !important;
  border-color: #0abf68 !important;
  color: #fff !important;
}

body.page-timer-variant .btn-pause {
  background: #334155 !important;
  color: #f8fafc !important;
}

body.page-timer-variant .btn-reset {
  background: #4b5c72 !important;
  color: #f8fafc !important;
}

body.page-timer-variant .related-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 12px !important;
}

body.page-timer-variant .related-card {
  display: flex !important;
  align-items: center !important;
  min-height: 64px !important;
  padding: 14px 16px !important;
  background: #142033 !important;
  border: 1px solid #2d4060 !important;
  border-radius: 8px !important;
  color: #e2e8f0 !important;
  text-decoration: none !important;
}

body.page-timer-variant .related-card:hover {
  background: #263956 !important;
  border-color: #60a5fa !important;
  color: #fff !important;
}

/* Info cards (Tabata, HIIT, etc.) */
.info-cards {
  margin-bottom: 40px;
}

.info-cards > h2 {
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 14px;
  margin-top: 0;
}

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.info-card {
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.info-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 8px;
}

.info-card p {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
}

/* FAQ */
.faq-section {
  margin-bottom: 48px;
  max-width: 100%;
}

.faq-title {
  font-size: 26px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.faq-item {
  border: 1px solid #2d4060;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.faq-item:last-child {
  border-bottom: 1px solid #2d4060;
}

.faq-item[open] {
  border-color: #3d5580;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 600;
  color: #e2e8f0;
  background: #131f35;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s, color 0.15s;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question:hover {
  background: #1a2744;
  color: #f1f5f9;
}

.faq-item[open] .faq-question {
  color: #60a5fa;
  background: #1a2744;
  border-bottom: 1px solid #2d4060;
}

.faq-question::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: #60a5fa;
  transition: transform 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
  color: #f97316;
}

.faq-answer {
  padding: 16px 22px 20px;
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.75;
  background: #0f1929;
}

.faq-answer p { margin-bottom: 8px; }
.faq-answer code {
  font-family: var(--font-display);
  font-size: 13px;
  background: #1e2d45;
  color: #f97316;
  padding: 1px 6px;
  border-radius: 3px;
}

/* Related tools grid */
.related-tools {
  margin-bottom: 36px;
}

.related-title {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 14px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.related-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 6px;
  text-decoration: none;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.related-card:hover {
  background: #243554;
  border-color: #f97316;
  color: #f97316;
}

.related-icon {
  font-size: 18px;
  flex-shrink: 0;
  color: #60a5fa;
  display: flex;
  align-items: center;
}

.related-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #60a5fa;
  display: flex;
  align-items: center;
}

.related-card:hover .related-svg,
.related-card:hover .related-icon {
  color: inherit;
}

/* Canonical related-tools layout.
   Loaded with higher specificity because older global styles in magnets.css and
   several template overrides also target .related-card/.related-grid. */
.tool-page-main .related-tools,
.tool-page-main .related-tools-section,
body.page-public .related-tools-section {
  width: 100%;
  box-sizing: border-box;
  margin: 36px 0;
  padding: 24px;
  background: #1a2940;
  border: 1px solid #36506f;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0,0,0,.16);
}

.tool-page-main .related-title,
.tool-page-main .related-tools-section h2,
body.page-public .related-tools-section h2 {
  margin: 0 0 16px;
  color: #f8fafc;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 800;
}

.tool-page-main .related-grid,
body.page-public .related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.tool-page-main .related-grid > .related-card,
body.page-public .related-grid > .related-card {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 12px;
  min-height: 78px;
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  background: #1e2d45;
  border: 1px solid #36506f;
  border-radius: 8px;
  color: #dbe7f6;
  text-align: left;
  text-decoration: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: background .15s ease, border-color .15s ease, transform .15s ease, color .15s ease;
}

.tool-page-main .related-grid > .related-card:hover,
body.page-public .related-grid > .related-card:hover {
  background: #253954;
  border-color: #60a5fa;
  color: #ffffff;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.tool-page-main .related-card .related-svg,
.tool-page-main .related-card .related-icon,
body.page-public .related-card .related-svg,
body.page-public .related-card .related-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: #7cc2ff;
  background: #111d31;
  border: 1px solid #36506f;
  border-radius: 8px;
  font-size: 0;
}

.tool-page-main .related-card .related-svg svg,
.tool-page-main .related-card .related-icon svg,
body.page-public .related-card .related-svg svg,
body.page-public .related-card .related-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 22px;
}

.tool-page-main .related-card .related-name,
body.page-public .related-card .related-name {
  min-width: 0;
  color: inherit;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none !important;
}

.tool-page-main .related-card *,
body.page-public .related-card * {
  text-decoration: none !important;
}

/* Legacy seasonal/special pages used .related-links/.related-link. Keep them
   visually identical to canonical related cards so no page falls back to pills
   or loose icon/text layouts. */
body .related-tools .related-links {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
  gap: 12px !important;
  margin-top: 0 !important;
}

body .related-tools .related-links > a.related-link {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  min-height: 64px !important;
  padding: 14px 16px !important;
  border-radius: 8px !important;
  background: #142033 !important;
  border: 1px solid #2d4060 !important;
  color: #e2e8f0 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background .18s ease, border-color .18s ease, transform .18s ease !important;
}

body .related-tools .related-links > a.related-link svg {
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px !important;
  padding: 9px !important;
  border-radius: 8px !important;
  background: #0f1f35 !important;
  border: 1px solid #2d4060 !important;
  color: #7cc4ff !important;
}

body .related-tools .related-links > a.related-link:hover {
  background: #263956 !important;
  border-color: #60a5fa !important;
  color: #fff !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
}

body .related-tools .related-links > a.related-link:hover svg {
  border-color: #60a5fa !important;
  color: #93c5fd !important;
}

@media (max-width: 680px) {
  .tool-page-main .related-tools,
  .tool-page-main .related-tools-section,
  body.page-public .related-tools-section {
    padding: 18px;
  }

  .tool-page-main .related-grid,
  body.page-public .related-grid {
    grid-template-columns: 1fr;
  }
}

/* Table utilities */
.table-scroll { overflow-x: auto; margin-top: 12px; }
.table-basic  { width: 100%; border-collapse: collapse; font-size: 15px; }

/* Sidebar widget */
.sidebar-widget {
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 16px;
}

.sidebar-widget-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #60a5fa;
  margin-bottom: 12px;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 14px;
  color: #cbd5e1;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.sidebar-links a:hover {
  background: #243554;
  color: #f97316;
}

/* Responsive: tablet/mobile adjustments */
@media (max-width: 900px) {
  .tool-page-layout {
    padding: 24px 16px 60px;
  }

  .tool-page-sidebar {
    position: static;
  }

  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }

  .shortcuts-list {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------------------
   TIMER PAGE WRAPPER
   --------------------------------------------------------------------------- */
.timer-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.timer-page--wide {
  max-width: 1000px;
}

/* ---------------------------------------------------------------------------
   TIMER CONTAINER (main card)
   --------------------------------------------------------------------------- */
.timer-container {
  background: #1e2d45;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  padding: 40px 40px 36px;
  text-align: center;
  border: 1px solid #2d4060;
  margin-bottom: 32px;
}

/* ---------------------------------------------------------------------------
   TIMER DISPLAY WRAPPER
   --------------------------------------------------------------------------- */
.timer-display-wrapper {
  position: relative;
  margin-bottom: 32px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.timer-display-wrapper .timer-display {
  transition: color 0.2s ease;
}

.timer-display-wrapper .timer-display.flash {
  animation: tickFlash 0.15s ease;
}

.timer-display-wrapper .timer-display.warning-color {
  color: var(--warning);
}

.timer-display-wrapper .timer-display.danger-color {
  color: var(--danger);
}

/* ---------------------------------------------------------------------------
   RUNNING INDICATOR
   --------------------------------------------------------------------------- */
.timer-running-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--success);
  opacity: 0;
  transition: opacity 0.3s ease;
  height: 20px;
}

.timer-running-indicator.visible {
  opacity: 1;
}

.timer-running-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulseBg 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.timer-running-indicator.paused {
  color: var(--warning);
}

.timer-running-indicator.paused .timer-running-dot {
  background: var(--warning);
  animation: none;
}

/* ---------------------------------------------------------------------------
   TIMER PRESETS
   --------------------------------------------------------------------------- */
.timer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.preset-btn {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #334155;
  background: #111827;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease;
  font-family: var(--font-body);
}

.preset-btn:hover {
  border-color: #60a5fa;
  background: #172033;
  color: #ffffff;
  transform: translateY(-1px);
}

.preset-btn.active {
  border-color: #f97316;
  background: #f97316;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(249,115,22,.22);
}

/* ---------------------------------------------------------------------------
   CUSTOM TIME INPUTS (hours : minutes : seconds)
   --------------------------------------------------------------------------- */
.timer-custom-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.timer-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.timer-input-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.time-input {
  width: 80px;
  text-align: center;
  font-size: 28px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 4px;
  background: #0f172a;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  -moz-appearance: textfield;
}

.time-input::-webkit-outer-spin-button,
.time-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.time-input:focus {
  border-color: #60a5fa;
  background: #111827;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .25);
}

.time-separator {
  font-size: 32px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #475569;
  line-height: 1;
  margin-top: 4px;
  align-self: center;
}

/* ---------------------------------------------------------------------------
   SOUND SELECTOR
   --------------------------------------------------------------------------- */
.sound-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.sound-selector label {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

.sound-select {
  padding: 6px 12px;
  border: 1px solid #2d4060;
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--font-body);
  color: #e2e8f0;
  background: #152038;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.sound-select:focus {
  border-color: #60a5fa;
}

.repeat-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
}

.repeat-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
   PROGRESS BAR (countdown)
   --------------------------------------------------------------------------- */
.timer-progress {
  width: 100%;
  height: 6px;
  background: #2d4060;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
}

.timer-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #1e3a8a, #60a5fa);
  border-radius: 4px;
  transition: width 0.5s linear, background 0.5s ease;
  width: 100%;
}

.timer-progress-bar.warning {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.timer-progress-bar.danger {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}

/* ---------------------------------------------------------------------------
   LAP ACTIONS
   --------------------------------------------------------------------------- */
.lap-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.lap-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #152038;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  gap: 6px;
}

/* ---------------------------------------------------------------------------
   TIMER SECTION TITLE
   --------------------------------------------------------------------------- */
.timer-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2d4060;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

/* ---------------------------------------------------------------------------
   RELATED TOOLS
   --------------------------------------------------------------------------- */
.related-tools {
  margin-top: 40px;
  padding-top: 32px;
}

.related-tool-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 6px;
  text-decoration: none;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.18s ease;
}

.related-tool-link:hover {
  border-color: #f97316;
  color: #f97316;
  transform: translateY(-2px);
}

.related-tool-icon {
  font-size: 24px;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   FAQ
   --------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------
   CHESS CLOCK
   --------------------------------------------------------------------------- */
.chess-clock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
}

.player-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  cursor: pointer;
  transition: background 0.2s ease;
  min-height: 280px;
  user-select: none;
  position: relative;
  border: 1px solid #2d4060;
}

.player-clock:first-child {
  border-right: none;
  border-radius: 20px 0 0 20px;
}

.player-clock:last-child {
  border-radius: 0 20px 20px 0;
}

.player-clock.inactive {
  background: #152038;
}

.player-clock.active {
  background: #1e3a8a;
  color: #ffffff;
}

.player-clock.active .player-time {
  color: #ffffff;
}

.player-clock.active .player-name {
  color: rgba(255,255,255,.8);
}

.player-clock.low-time {
  background: #2d1515;
}

.player-clock.low-time.active {
  background: #dc2626;
}

.player-clock.out-of-time {
  background: #dc2626 !important;
  animation: pulseBg 1s ease-in-out infinite;
}

.player-name {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 12px;
}

.player-time {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}

.player-moves {
  font-size: 14px;
  color: #64748b;
  margin-top: 12px;
  font-weight: 500;
}

.player-clock.active .player-moves {
  color: rgba(255,255,255,.7);
}

.player-clock-tap-hint {
  position: absolute;
  bottom: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
}

.chess-clock-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.chess-time-control {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.page-chess-clock .tool-page-main {
  max-width: 1180px;
}

.chess-tool-shell {
  margin: 28px 0 28px;
  padding: 22px;
  border: 1px solid #2d4060;
  border-radius: 8px;
  background: linear-gradient(180deg, #122039, #0f1b31);
  box-shadow: 0 20px 44px rgba(3, 10, 26, 0.28);
}

.chess-tool-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.chess-tool-topline h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #f8fafc;
}

.chess-tool-topline p {
  margin: 6px 0 0;
  color: #a8b6ca;
  font-size: 0.98rem;
}

.chess-presets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.chess-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid #385170;
  border-radius: 8px;
  background: #172642;
  color: #e5edf7;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.chess-preset-btn:hover,
.chess-preset-btn:focus-visible {
  transform: translateY(-2px);
  border-color: #6db7ff;
  background: #1d3154;
  box-shadow: 0 12px 24px rgba(4, 12, 28, 0.28);
  outline: none;
}

.chess-preset-btn--selected,
.chess-preset-btn.active {
  border-color: #ff8a1f;
  background: linear-gradient(180deg, #243b61, #1a2d4e);
  box-shadow: inset 0 0 0 1px rgba(255, 138, 31, 0.22);
}

.chess-preset-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #8ec5ff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chess-preset-time {
  margin-top: 6px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #f8fafc;
}

.chess-custom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #2d4060;
  border-radius: 8px;
  background: #14223a;
  color: #cbd5e1;
  white-space: nowrap;
}

.chess-custom-label {
  font-weight: 800;
  color: #e2e8f0;
}

.chess-clock-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin: 0;
}

.chess-player-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 360px;
  padding: 30px 24px;
  border: 1px solid #355070;
  border-radius: 8px;
  background: linear-gradient(180deg, #1d2d48, #14223a);
  color: #e8eef7;
  cursor: pointer;
  user-select: none;
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.chess-player-panel:hover,
.chess-player-panel:focus-visible {
  transform: translateY(-2px);
  border-color: #6db7ff;
  outline: none;
}

.chess-player-panel--active {
  border-color: #13c078;
  background: linear-gradient(180deg, #0f7a55, #0d4f3a);
  box-shadow: 0 18px 36px rgba(4, 120, 87, 0.24);
}

.chess-player-panel--inactive {
  opacity: 0.72;
}

.chess-player-panel--low {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #5b3415, #3b2413);
}

.chess-player-panel--danger,
.chess-player-panel.out-of-time {
  border-color: #ef4444;
  background: linear-gradient(180deg, #7f1d1d, #451a1a);
  animation: pulseBg 1s ease-in-out infinite;
}

.chess-player-panel--p2 {
  transform: rotate(180deg);
}

.chess-player-panel--p2:hover,
.chess-player-panel--p2:focus-visible {
  transform: rotate(180deg) translateY(2px);
}

.chess-player-name {
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9fb1c8;
}

.chess-player-panel--active .chess-player-name {
  color: rgba(255, 255, 255, 0.82);
}

.chess-player-time {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 9vw, 8.5rem);
  font-weight: 900;
  line-height: 0.95;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.chess-player-moves {
  margin-top: 18px;
  font-size: 1rem;
  font-weight: 800;
  color: #cbd5e1;
}

.chess-player-tap-hint {
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #91a4bd;
}

.chess-center-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #2d4060;
  border-radius: 8px;
  background: #14223a;
}

.chess-center-controls .btn {
  width: 100%;
  justify-content: center;
}

.chess-game-info {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid #355070;
  border-radius: 8px;
  background: #182945;
  color: #e2e8f0;
  font-weight: 800;
}

.chess-game-info p {
  margin: 0;
}

.chess-how-to {
  margin: 14px 0 0;
}

.timer-form-input {
  color-scheme: dark;
}

/* ---------------------------------------------------------------------------
   TALLY COUNTER
   --------------------------------------------------------------------------- */
.tally-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.tally-display {
  font-family: var(--font-display);
  font-size: 120px;
  font-weight: 700;
  color: #f97316;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: transform 0.1s ease;
  letter-spacing: -0.04em;
}

.tally-display.bump {
  transform: scale(1.08);
}

.tally-label {
  font-size: 18px;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
}

.tally-controls {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.tally-btn-minus,
.tally-btn-plus {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  font-size: 32px;
  font-weight: 400;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.tally-btn-minus {
  background: #2d4060;
  color: #cbd5e1;
}

.tally-btn-minus:hover {
  background: #dc2626;
  color: #ffffff;
  transform: scale(1.08);
}

.tally-btn-minus:active {
  transform: scale(0.95);
}

.tally-btn-plus {
  background: #f97316;
  color: #ffffff;
  width: 88px;
  height: 88px;
  font-size: 40px;
  box-shadow: 0 8px 24px rgba(249,115,22,.35);
}

.tally-btn-plus:hover {
  background: #fb923c;
  transform: scale(1.06);
  box-shadow: 0 12px 32px rgba(249,115,22,.4);
}

.tally-btn-plus:active {
  transform: scale(0.96);
}

.tally-reset-btn {
  background: none;
  border: 1px solid #2d4060;
  border-radius: 4px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-body);
}

.tally-reset-btn:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #2d1515;
}

/* Multiple counters list */
.tally-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.tally-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 6px;
}

.tally-item-name {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
  flex: 1;
}

.tally-item-count {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #f97316;
  min-width: 60px;
  text-align: center;
}

.tally-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ---------------------------------------------------------------------------
   NAME PICKER
   --------------------------------------------------------------------------- */
.name-picker-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.name-picker-result {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a8a, #60a5fa);
  border-radius: 6px;
  padding: 24px;
}

.name-picker-result-text {
  font-size: 48px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  transition: all 0.1s ease;
  letter-spacing: -0.02em;
}

.name-picker-result-text.cycling {
  opacity: 0.7;
  font-size: 32px;
}

.name-picker-placeholder {
  font-size: 18px;
  color: rgba(255,255,255,.6);
  font-style: italic;
}

.name-picker-textarea {
  width: 100%;
  min-height: 180px;
  padding: 16px;
  border: 1px solid #2d4060;
  border-radius: 6px;
  font-size: 15px;
  font-family: var(--font-body);
  color: #e2e8f0;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
  line-height: 1.7;
  background: #152038;
}

.name-picker-textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96,165,250,.1);
}

.name-picker-options {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.name-count-badge {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.name-history {
  margin-top: 8px;
}

.name-history-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin-bottom: 8px;
}

.name-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.name-history-item {
  padding: 4px 10px;
  background: #152038;
  border-radius: 4px;
  font-size: 13px;
  color: #94a3b8;
}

/* ---------------------------------------------------------------------------
   INTERVAL TIMER
   --------------------------------------------------------------------------- */

/* Preset buttons row */
.int-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  justify-content: center;
}

/* Settings 2×2 grid */
.int-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
  text-align: left;
}

.int-block {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 14px 16px;
}

.int-block--work { border-left: 3px solid #16a34a; }
.int-block--rest { border-left: 3px solid #60a5fa; }

.int-block-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  margin-bottom: 8px;
}

.int-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.int-dot--work { background: #16a34a; }
.int-dot--rest { background: #60a5fa; }

.int-input {
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: #f8fafc;
  background: #111827;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 6px 4px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  -moz-appearance: textfield;
}
.int-input::-webkit-inner-spin-button,
.int-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.int-input:focus {
  border-color: #60a5fa;
  background: #0f172a;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .25);
}

.int-sound-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 0;
}

.int-sound-label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

/* Phase / round status row */
.int-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  min-height: 28px;
}

.int-round-text {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

/* Phase label badge */
.interval-phase-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 4px;
  color: #475569;
  background: #152038;
}

.interval-phase-label.work {
  background: rgba(22,163,74,.15);
  color: #16a34a;
}

.interval-phase-label.rest {
  background: rgba(96,165,250,.15);
  color: #60a5fa;
}

.interval-phase-label.done {
  background: rgba(249,115,22,.15);
  color: #f97316;
}

/* Make display wrapper full-width for the interval timer */
[data-tool="interval"] .timer-display-wrapper {
  display: flex;
  width: 100%;
}

/* Large time display */
.int-display {
  font-family: var(--font-display);
  font-size: 96px;
  font-weight: 700;
  color: #f97316;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  padding: 20px 0 8px;
}

/* Completion message */
.int-complete-msg {
  text-align: center;
  padding: 16px;
  margin-bottom: 16px;
  background: rgba(249,115,22,.1);
  border: 1px solid rgba(249,115,22,.3);
  border-radius: 8px;
  color: #f97316;
  font-weight: 600;
  font-size: 15px;
}

/* Legacy classes kept for compatibility */
.interval-rounds {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.interval-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.interval-config-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
  background: #152038;
  border-radius: 6px;
  border: 1px solid #2d4060;
}

.interval-config-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
}

.interval-config-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #e2e8f0;
}

/* ---------------------------------------------------------------------------
   WORLD CLOCKS
   --------------------------------------------------------------------------- */
/* Search bar */
/* Wide layout for world clocks - Full width grid needs more room */
.world-clocks-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.world-clocks-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.world-clocks-controls .world-clock-search-input {
  max-width: 280px;
}

.world-clock-add {
  margin-bottom: 24px;
}

.world-clock-add-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.world-clock-add-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.world-clock-add-row .world-clock-search-input {
  flex: 1;
  min-width: 160px;
}

.world-clock-search {
  margin-bottom: 24px;
}

.world-clock-search-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.world-clock-search-row {
  display: flex;
  gap: 8px;
}

.world-clock-search-input {
  flex: 1;
  padding: 10px 14px;
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 6px;
  font-size: 14px;
  color: #e2e8f0;
  font-family: var(--font-body);
}

.world-clock-search-input::placeholder { color: #475569; }
.world-clock-search-input:focus { outline: none; border-color: #60a5fa; }

/* Grid - Matches both .world-clock-grid and legacy .world-clocks-grid */
.world-clock-grid,
.world-clocks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.world-clock-grid--full {
  grid-template-columns: repeat(4, 1fr);
}

/* Cards */
.world-clock-card {
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 6px;
  padding: 18px 16px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.world-clock-card:hover {
  background: #243554;
  border-color: #f97316;
}

/* Card header (flag + city + country) */
.wc-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.wc-flag {
  font-size: 16px;
  line-height: 1;
}

.wc-city,
.world-clock-city {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

.wc-country {
  font-size: 11px;
  color: #64748b;
}

/* Time display */
.wc-time,
.world-clock-time {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #f97316;
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Date */
.wc-date,
.world-clock-date {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

/* Timezone label */
.wc-tz-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
}

/* Offset (e.g. UTC-5) */
.wc-offset,
.world-clock-offset {
  font-size: 11px;
  color: #60a5fa;
  margin-top: 4px;
}

/* Your local time strip */
.your-local-time {
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 32px;
}

.your-local-time strong { color: #e2e8f0; }

/* ---------------------------------------------------------------------------
   DIGITAL CLOCK PAGE
   --------------------------------------------------------------------------- */
.digital-clock-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.digital-clock-time {
  font-family: var(--font-display);
  font-size: 100px;
  font-weight: 700;
  color: #f97316;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.digital-clock-seconds {
  font-size: 0.5em;
  color: #60a5fa;
}

.digital-clock-date {
  font-size: 22px;
  color: #94a3b8;
  font-weight: 500;
}

.digital-clock-tz {
  font-size: 14px;
  color: #475569;
  font-weight: 500;
}

.clock-options {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
}

/* Mini world clocks on digital clock page */
.mini-world-clocks {
  margin-bottom: 36px;
}

.mini-world-clocks h2 {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 14px;
}

.world-clock-grid--mini {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.world-clock-grid--mini .world-clock-card {
  padding: 14px 12px;
}

.world-clock-grid--mini .wc-time {
  font-size: 22px;
}

.view-all-link {
  font-size: 13px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* World clock card as link */
a.world-clock-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Country subtitle inside city name */
.world-clock-country {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  margin-top: 2px;
}

/* Individual city clock page */
.city-clock-hero {
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 32px;
}

.city-clock-display {
  margin-bottom: 20px;
}

.city-clock-time {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  color: #f97316;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}

.city-clock-date {
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.city-clock-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.city-clock-offset {
  font-size: .9rem;
  color: #60a5fa;
  font-weight: 600;
}

.city-clock-dst {
  font-size: .85rem;
  color: #94a3b8;
}

.city-clock-format-toggle {
  margin-top: 16px;
}

/* Compare chips */
.city-compare-section {
  margin-bottom: 32px;
}

.city-compare-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.city-compare-chip {
  display: inline-block;
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: .85rem;
  color: #e2e8f0;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}

.city-compare-chip:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}

.city-clock-others {
  margin-bottom: 32px;
}

/* ---------------------------------------------------------------------------
   RESPONSIVE OVERRIDES (timer pages)
   --------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .timer-container {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .timer-page {
    padding: 20px 12px 48px;
  }

  .chess-clock-grid {
    grid-template-columns: 1fr;
  }

  .player-clock:first-child {
    border-radius: 20px 20px 0 0;
    border-right: 1px solid #2d4060;
    border-bottom: none;
  }

  .player-clock:last-child {
    border-radius: 0 0 20px 20px;
  }

  .player-time {
    font-size: 56px;
  }

  .chess-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chess-tool-shell {
    padding: 16px;
  }

  .chess-tool-topline {
    flex-direction: column;
  }

  .chess-custom-row {
    width: 100%;
  }

  .chess-clock-layout {
    grid-template-columns: 1fr;
  }

  .chess-player-panel {
    min-height: 240px;
  }

  .chess-player-panel--p2,
  .chess-player-panel--p2:hover,
  .chess-player-panel--p2:focus-visible {
    transform: none;
  }

  .chess-center-controls {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .chess-center-controls .btn {
    width: auto;
    flex: 1 1 130px;
  }

  .tally-display {
    font-size: 88px;
  }

  .related-tools {
    grid-template-columns: 1fr 1fr;
  }

  .world-clocks-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .digital-clock-time {
    font-size: 64px;
  }

  .interval-config {
    grid-template-columns: 1fr;
  }

  .name-picker-result-text {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .timer-container {
    padding: 20px 14px;
    border-radius: 14px;
  }

  .timer-custom-inputs {
    gap: 4px;
  }

  .time-input {
    width: 68px;
    font-size: 24px;
    padding: 6px 2px;
  }

  .time-separator {
    font-size: 26px;
  }

  .related-tools {
    grid-template-columns: 1fr;
  }

  .world-clocks-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tally-display {
    font-size: 72px;
  }

  .tally-btn-plus {
    width: 76px;
    height: 76px;
    font-size: 34px;
  }

  .tally-btn-minus {
    width: 60px;
    height: 60px;
  }

  .player-time {
    font-size: 48px;
  }

  .digital-clock-time {
    font-size: 52px;
  }
}

/* ---------------------------------------------------------------------------
   FULLSCREEN MODE
   --------------------------------------------------------------------------- */
:fullscreen .timer-page {
  max-width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #0f172a;
}

:fullscreen .timer-container {
  background: #0f172a;
  box-shadow: none;
  border: none;
  width: 100%;
  max-width: 900px;
}

:fullscreen .timer-display {
  color: #ffffff;
  font-size: 180px;
}

:fullscreen .timer-running-indicator {
  color: #4ade80;
}

:fullscreen .timer-section-title,
:fullscreen .related-tools,
:fullscreen .faq-list {
  display: none;
}

/* ---------------------------------------------------------------------------
   MOBILE PWA POLISH (Milestone 6)
   --------------------------------------------------------------------------- */

/* Sticky timer controls on mobile */
@media (max-width: 768px) {
  .timer-controls-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e2d45;
    padding: 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 100;
    display: flex;
    gap: 12px;
    justify-content: center;
  }

  .timer-controls-sticky .btn {
    flex: 1;
    max-width: 120px;
    height: 52px;
    font-size: 16px;
  }

  /* Add bottom padding so content isn't hidden behind sticky controls */
  .has-sticky-controls {
    padding-bottom: 100px;
  }

  /* Larger touch targets */
  .btn {
    min-height: 48px;
    min-width: 48px;
  }

  /* Full-width preset buttons on mobile */
  .timer-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  /* Larger timer display on small screens */
  .timer-display--standard {
    font-size: 64px;
  }

  .timer-display--large {
    font-size: 80px;
  }
}

/* Add safe area insets for iPhone notch */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .timer-controls-sticky {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

/* Prevent tap highlight on timer buttons */
.btn, .preset-btn, .tally-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Better focus styles for accessibility */
.btn:focus-visible,
.form-input:focus-visible,
.preset-btn:focus-visible {
  outline: 3px solid #f97316;
  outline-offset: 2px;
}

/* Smooth transitions for interactive elements */
.tool-card,
.btn,
.preset-btn,
.achievement-card,
.blog-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

/* Prevent layout shift when timer is running */
.timer-display {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------------------
   HUB PAGES (timers hub, clocks hub, etc.)
   --------------------------------------------------------------------------- */
.hub-layout {
  width: min(100% - 40px, 1180px);
  max-width: none;
  margin: 0 auto;
  padding: 0 0 80px;
}

.hub-header {
  padding: 34px 0 22px;
  margin: 0;
}

.hub-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 12px;
  line-height: 1.08;
  letter-spacing: 0;
}

.hub-intro {
  font-size: 17px;
  color: #a8b3c5;
  line-height: 1.65;
  max-width: 760px;
  margin: 0;
}

.hub-section-title {
  margin: 0 0 14px;
  color: #f8fafc;
  font-size: 26px;
  line-height: 1.2;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.hub-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 16px;
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 8px;
  color: #e2e8f0;
  text-decoration: none !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.hub-card:hover {
  background: #263956;
  border-color: #60a5fa;
  color: #fff;
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,.24);
}

.hub-card-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #142033;
  border: 1px solid #2d4060;
  border-radius: 8px;
  color: #60a5fa;
}

.hub-card-body {
  min-width: 0;
}

.hub-card-title {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 6px;
  line-height: 1.25;
  letter-spacing: 0;
}

.hub-card-desc {
  display: block;
  margin: 0;
  font-size: 14px;
  color: #a8b3c5;
  line-height: 1.55;
}

.hub-card-arrow {
  display: none;
}

.hub-card:hover .hub-card-arrow {
  display: none;
}

.hub-card-meta {
  margin: 8px 0 0;
  color: #8fa1b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hub-card-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #2d4060;
  border-radius: 6px;
  background: #142033;
  color: #9fb0c7;
  font-size: 12px;
  font-weight: 800;
}

.hub-card-cta {
  display: none;
}

.chance-hub-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-bottom: 28px !important;
}

.chance-hub-grid > a {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 104px !important;
  padding: 16px !important;
  border-radius: 8px !important;
  background: #1e2d45 !important;
  border: 1px solid #2d4060 !important;
  color: #e2e8f0 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16) !important;
  transform: none !important;
}

.chance-hub-grid > a:hover {
  background: #263956 !important;
  border-color: #60a5fa !important;
  transform: translateY(-1px) !important;
}

.chance-hub-grid > a > div:first-child {
  width: 46px !important;
  height: 46px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  border: 1px solid #2d4060 !important;
  background: #142033 !important;
}

.chance-hub-grid > a > strong {
  align-self: end !important;
  margin: 0 0 6px !important;
  color: #f8fafc !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}

.chance-hub-grid > a > p {
  grid-column: 2 !important;
  margin: -6px 0 0 !important;
  color: #a8b3c5 !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

.chance-hub-grid > a > span {
  display: none !important;
}

@media (max-width: 640px) {
  .hub-layout {
    width: min(100% - 28px, 1180px);
  }

  .hub-grid,
  .chance-hub-grid {
    grid-template-columns: 1fr;
  }

  .chance-hub-grid > a {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }
}

/* ---------------------------------------------------------------------------
   COUNTDOWN TIMER INPUTS
   --------------------------------------------------------------------------- */
.countdown-inputs-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 20px;
  padding: 18px;
  width: fit-content;
  max-width: 100%;
  background: #0f172a;
  border: 1px solid #26364d;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.countdown-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.countdown-input-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
}

.countdown-input {
  width: 72px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 4px;
  background: #111827;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  -moz-appearance: textfield;
}

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

.countdown-input:focus {
  border-color: #60a5fa;
  background: #0f172a;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .25);
}

/* Small variant - Config number inputs, not the main timer display */
.countdown-input--sm {
  width: 80px;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 8px;
  text-align: center;
}

.countdown-sep {
  font-size: 36px;
  font-weight: 700;
  color: #2d4060;
  line-height: 1;
  padding-bottom: 8px;
}

.countdown-presets {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.preset-chip {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #111827;
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .12s ease;
  font-family: var(--font-body);
}

.preset-chip:hover,
.preset-chip.active {
  background: #f97316;
  border-color: #f97316;
  color: #ffffff;
}

/* Countdown progress bar */
.countdown-progress-bar {
  height: 6px;
  background: #152038;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 20px;
}

.countdown-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1e3a8a, #60a5fa);
  border-radius: 3px;
  transition: width 0.5s linear;
}

/* ---------------------------------------------------------------------------
   EGG TIMER
   --------------------------------------------------------------------------- */
body.page-egg-timer .tool-page-layout {
  max-width: 1120px;
}

body.page-egg-timer .tool-header {
  max-width: 840px;
}

body.page-egg-timer .egg-timer-card {
  max-width: 980px;
  margin: 0 auto 32px;
  padding: 28px;
  text-align: left;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 34%),
    linear-gradient(180deg, #1e2d45 0%, #142038 100%);
  border: 1px solid #3c5678;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

body.page-egg-timer .egg-tool-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

body.page-egg-timer .egg-tool-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #f8fafc;
  background: linear-gradient(180deg, #f59e0b, #f97316);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.22);
}

body.page-egg-timer .egg-tool-heading h2 {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.2;
  color: #f8fafc;
}

body.page-egg-timer .egg-tool-heading p {
  margin: 0;
  color: #a9b8cc;
  font-size: 15px;
  line-height: 1.55;
}

body.page-egg-timer .egg-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

body.page-egg-timer .egg-preset-btn {
  min-height: 152px;
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  align-items: start;
  gap: 7px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  color: #dbe7f5;
  background: #111c31;
  border: 1px solid #334b6d;
  border-radius: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

body.page-egg-timer .egg-preset-btn:hover {
  transform: translateY(-2px);
  border-color: #60a5fa;
  background: #15243d;
}

body.page-egg-timer .egg-preset-btn--selected {
  border-color: #f97316;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.18), #15243d);
  box-shadow: inset 0 3px 0 #f97316, 0 14px 26px rgba(249, 115, 22, 0.14);
}

body.page-egg-timer .egg-preset-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7cc0ff;
  background: #0f172a;
  border: 1px solid #375577;
  border-radius: 8px;
}

body.page-egg-timer .egg-preset-btn--selected .egg-preset-icon {
  color: #fff7ed;
  background: #f97316;
  border-color: #fb923c;
}

body.page-egg-timer .egg-preset-name {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
}

body.page-egg-timer .egg-preset-time {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  background: #0f172a;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 800;
}

body.page-egg-timer .egg-preset-desc {
  color: #9fb0c7;
  font-size: 13px;
  line-height: 1.45;
}

body.page-egg-timer .egg-custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  margin-bottom: 24px;
  background: #111c31;
  border: 1px solid #334b6d;
  border-radius: 8px;
}

body.page-egg-timer .egg-custom-label {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.page-egg-timer .egg-custom-row .countdown-inputs-row {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.page-egg-timer .egg-custom-row .countdown-input {
  width: 96px;
  height: 48px;
  font-size: 22px;
  border-color: #45617f;
}

body.page-egg-timer .timer-display-wrapper {
  width: 100%;
  display: flex;
  margin: 4px 0 18px;
  padding: 28px 20px;
  align-items: center;
  text-align: center;
  background: #0f172a;
  border: 1px solid #334b6d;
  border-radius: 8px;
}

body.page-egg-timer .timer-display-wrapper .timer-display,
body.page-egg-timer .timer-card .timer-digits {
  margin: 0;
  color: #f97316;
  font-size: clamp(64px, 10vw, 112px);
  line-height: 0.95;
  text-shadow: 0 18px 40px rgba(249, 115, 22, 0.18);
}

body.page-egg-timer .timer-display-wrapper .countdown-progress-bar {
  width: min(620px, 100%);
  height: 8px;
  margin: 18px auto 0;
  background: #1e2d45;
}

body.page-egg-timer .timer-display-wrapper .countdown-progress-fill {
  background: linear-gradient(90deg, #f97316, #fbbf24);
}

body.page-egg-timer .egg-timer-card--warning .timer-display-wrapper .countdown-progress-fill {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

body.page-egg-timer .egg-timer-card--done .timer-display-wrapper .timer-digits {
  color: #ef4444;
}

body.page-egg-timer .countdown-options {
  justify-content: center;
  padding: 8px 0 18px;
  margin: 0;
}

body.page-egg-timer .option-label {
  gap: 10px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.page-egg-timer .option-select {
  min-height: 44px;
  padding: 0 42px 0 14px;
  border-color: #45617f;
  background-color: #111c31;
}

body.page-egg-timer .timer-controls {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 12px;
  max-width: 620px;
  margin: 0 auto;
}

body.page-egg-timer .timer-controls .btn-timer {
  width: 100%;
  min-height: 58px;
  border-radius: 6px;
}

body.page-egg-timer .egg-guide {
  max-width: 980px;
  margin: 0 auto 32px;
  padding: 28px;
  background: #1e2d45;
  border: 1px solid #334b6d;
  border-radius: 8px;
}

body.page-egg-timer .egg-guide h2 {
  margin: 0 0 18px;
  color: #f8fafc;
  font-size: 24px;
}

body.page-egg-timer .egg-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body.page-egg-timer .egg-guide-card {
  padding: 16px;
  background: #111c31;
  border: 1px solid #334b6d;
  border-radius: 8px;
}

body.page-egg-timer .egg-guide-card h3 {
  margin: 0 0 8px;
  color: #93c5fd;
  font-size: 15px;
}

body.page-egg-timer .egg-guide-card p,
body.page-egg-timer .egg-guide-note {
  color: #a9b8cc;
  font-size: 14px;
  line-height: 1.65;
}

body.page-egg-timer .egg-guide-card p {
  margin: 0;
}

body.page-egg-timer .egg-guide-note {
  margin: 18px 0 0;
}

@media (max-width: 900px) {
  body.page-egg-timer .egg-presets,
  body.page-egg-timer .egg-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.page-egg-timer .timer-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body.page-egg-timer .egg-timer-card,
  body.page-egg-timer .egg-guide {
    padding: 20px;
  }

  body.page-egg-timer .egg-tool-heading,
  body.page-egg-timer .egg-custom-row {
    align-items: stretch;
    flex-direction: column;
  }

  body.page-egg-timer .egg-presets,
  body.page-egg-timer .egg-guide-grid {
    grid-template-columns: 1fr;
  }

  body.page-egg-timer .egg-custom-row .countdown-inputs-row {
    justify-content: flex-start;
  }
}

/* Countdown options (sound, auto-repeat) */
.countdown-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px 0 4px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
}

.option-select {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 12px;
  background: #0f172a;
  cursor: pointer;
}

/* Toggle switch */
.option-toggle {
  position: relative;
}

.option-toggle input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.option-toggle-slider {
  display: inline-block;
  width: 42px;
  height: 24px;
  background: #334155;
  border: 1px solid #475569;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}

.option-toggle-slider::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.option-toggle input:checked ~ .option-toggle-slider {
  background: #2563eb;
  border-color: #60a5fa;
}

.option-toggle input:checked ~ .option-toggle-slider::after {
  transform: translateX(18px);
}

/* ---------------------------------------------------------------------------
   HUB PAGE SECTIONS (info-section, hub-related, hub-section-title)
   --------------------------------------------------------------------------- */
.hub-section-title {
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 20px;
}

.info-section {
  margin-bottom: 40px;
}

.info-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 12px;
  margin-top: 0;
}

.info-section h3 {
  font-size: 17px;
  font-weight: 600;
  color: #60a5fa !important;
  margin-bottom: 8px;
  margin-top: 24px;
}

.info-section p {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.75;
  margin-bottom: 14px;
}

.info-section a {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-section .related-card,
.info-section .related-card:hover,
.info-section .related-card:focus,
.info-section .related-card *,
.content-section .related-card,
.content-section .related-card:hover,
.content-section .related-card:focus,
.content-section .related-card * {
  text-decoration: none !important;
}

.info-section ol,
.info-section ul {
  padding-left: 22px;
  margin-bottom: 14px;
}

.info-section li {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.75;
  margin-bottom: 6px;
}

.hub-related {
  margin-bottom: 40px;
}

.hub-related h2 {
  font-size: 20px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 16px;
}

.related-name {
  font-size: 13px;
  font-weight: 500;
}

/* Hub info table */
.hub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 6px;
}

.hub-table thead tr {
  background: #1e3a8a;
}

.hub-table th {
  padding: 10px 14px;
  text-align: left;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 13px;
}

.hub-table tbody tr {
  border-bottom: 1px solid #2d4060;
}

.hub-table tbody tr:nth-child(odd) {
  background: #1e2d45;
}

.hub-table tbody tr:nth-child(even) {
  background: #172236;
}

.hub-table td {
  padding: 9px 14px;
  color: #94a3b8;
}

/* Bar chart rows */
.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.chart-label {
  width: 220px;
  font-size: 13px;
  color: #94a3b8;
  flex-shrink: 0;
}

.chart-track {
  flex: 1;
  background: #2d4060;
  border-radius: 3px;
  height: 18px;
}

.chart-fill {
  height: 18px;
  border-radius: 3px;
  background: #1e3a8a;
}

.chart-fill--accent {
  background: #f97316;
}

.chart-fill--success {
  background: #16a34a;
}

.chart-fill--muted {
  background: #475569;
}

.chart-fill--danger {
  background: #dc2626;
}

.chart-value {
  width: 44px;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  text-align: right;
}

.chart-note {
  font-size: 12px;
  color: #475569;
  margin-top: 8px;
}

/* ---------------------------------------------------------------------------
   SETTINGS CARD (used in pomodoro and other tools)
   --------------------------------------------------------------------------- */
.settings-card {
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 28px;
}

.settings-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.settings-section {
  margin-bottom: 4px;
}

.settings-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 14px;
}

.settings-divider {
  border: none;
  border-top: 1px solid #2d4060;
  margin: 20px 0;
}

/* Duration blocks */
.settings-dur-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.pomo-dur-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 10px;
  padding: 16px 12px;
  transition: border-color 0.15s;
}

.pomo-dur-block:focus-within {
  border-color: #f97316;
}

.pomo-dur-input {
  width: 72px;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  background: transparent;
  border: none;
  color: #f8fafc;
  padding: 0;
  outline: none;
  -moz-appearance: textfield;
}

.pomo-dur-input::-webkit-inner-spin-button,
.pomo-dur-input::-webkit-outer-spin-button {
  opacity: 0.4;
}

.pomo-dur-unit {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pomo-dur-name {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  margin-top: 2px;
}

/* Behavior rows */
.settings-behavior-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pomo-behavior-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #1a2744;
}

.pomo-behavior-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pomo-behavior-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pomo-behavior-title {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.pomo-behavior-desc {
  font-size: 12px;
  color: #64748b;
}

.pomo-toggle {
  flex-shrink: 0;
}

.pomo-sound-select {
  flex-shrink: 0;
  min-width: 110px;
}

@media (max-width: 500px) {
  .settings-dur-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .pomo-dur-input {
    font-size: 22px;
    width: 56px;
  }
}

/* ---------------------------------------------------------------------------
   POMODORO TIMER
   --------------------------------------------------------------------------- */
.timer-card--pomodoro {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.pomodoro-modes {
  display: flex;
  gap: 0;
  background: #152038;
  border-radius: 6px;
  padding: 4px;
  margin-bottom: 24px;
}

.pomodoro-mode-btn {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-family: var(--font-body);
}

.pomodoro-mode-btn--active {
  background: #1e3a8a;
  color: #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.pomodoro-mode-btn:hover:not(.pomodoro-mode-btn--active) {
  color: #94a3b8;
}

.pomodoro-task-row {
  margin-bottom: 20px;
  text-align: left;
}

.pomodoro-task-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #60a5fa;
  margin-bottom: 8px;
}

.pomodoro-task-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #2d4060;
  border-radius: 6px;
  font-size: 14px;
  color: #e2e8f0;
  background: #152038;
  font-family: var(--font-body);
  transition: border-color .15s;
}

.pomodoro-task-input::placeholder { color: #475569; }

.pomodoro-task-input:focus {
  outline: none;
  border-color: #60a5fa;
}

.pomodoro-rounds {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.pomo-round-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2d4060;
  border: 2px solid #334155;
  display: inline-block;
  transition: background .2s, border-color .2s;
}

.pomo-round-dot--complete {
  background: #f97316;
  border-color: #f97316;
  box-shadow: 0 0 8px rgba(249,115,22,.4);
}

.pomo-rounds-label {
  font-size: 12px;
  color: #64748b;
  margin-left: 4px;
}

.timer-display-wrapper {
  margin-bottom: 24px;
}

.timer-display--pomodoro {
  font-size: 80px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f97316;
  line-height: 1;
  display: block;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px rgba(249,115,22,.2);
}

.timer-digits--pomo {
  display: block;
}

.countdown-progress-bar--pomo {
  height: 3px;
  background: #2d4060;
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
  max-width: 360px;
}

.countdown-progress-bar--pomo .countdown-progress-fill {
  background: #f97316;
  height: 3px;
}

.pomodoro-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 24px;
  padding-top: 20px;
}

.pomo-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  padding: 0 8px;
  border-right: 1px solid #2d4060;
}

.pomo-stat:last-child { border-right: none; }

.pomo-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
}

.pomo-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #e2e8f0;
  font-family: var(--font-display);
}

/* ===== Group Generator ===== */
.gg-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.gg-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #e2e8f0;
}

.gg-textarea {
  width: 100%;
  padding: 12px;
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 15px;
  resize: vertical;
  box-sizing: border-box;
}

.gg-textarea:focus {
  outline: none;
  border-color: #60a5fa;
}

.gg-num-input {
  width: 100%;
  padding: 10px 14px;
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 18px;
  box-sizing: border-box;
}

.gg-num-input:focus {
  outline: none;
  border-color: #60a5fa;
}

.gg-btn {
  width: 100%;
  margin-top: 12px;
}

@media (max-width: 600px) {
  .gg-layout { grid-template-columns: 1fr; }
}

/* ===========================================================================
   CLOCK TOOLS - Shared clock display
   =========================================================================== */

.clock-time {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 700;
  color: #f97316;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  display: block;
}

.clock-ampm {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: #60a5fa;
  margin-top: 4px;
}

/* Smaller clock display variant (alarm clock header) */
.digital-clock-display--sm .clock-time {
  font-size: 52px;
}

.digital-clock-display--sm .clock-ampm {
  font-size: 20px;
}

/* Tips list in info sections */
.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tips-list li {
  font-size: 14px;
  color: #94a3b8;
  padding: 10px 14px;
  background: #152038;
  border-radius: 6px;
  border-left: 3px solid #60a5fa;
  line-height: 1.6;
}

.tips-list li strong {
  color: #e2e8f0;
}

/* ===========================================================================
   TALKING CLOCK
   =========================================================================== */

.talking-clock-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
  padding: 16px;
  background: #152038;
  border-radius: 8px;
  border: 1px solid #2d4060;
}

/* ===========================================================================
   ALARM CLOCK
   =========================================================================== */

.timer-card--alarm {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(24px, 4vw, 44px);
  background: #1b2a42;
  border: 1px solid #36506f;
  border-radius: 8px;
}

body.page-alarm-clock .tool-page-main > :is(.timer-card--alarm, .alarms-list-section, .info-section, .faq-section, .related-tools) {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.timer-card--alarm .digital-clock-display {
  width: min(100%, 620px);
  margin: 0 auto 28px;
  padding: 22px 28px;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  background: #101d31;
  border: 1px solid #314866;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.page-alarm-clock .digital-clock-display--sm .clock-time {
  font-size: clamp(56px, 7vw, 92px);
  line-height: 1;
  white-space: nowrap;
}

.page-alarm-clock .digital-clock-display--sm .clock-ampm {
  margin-top: 0;
  padding-bottom: 9px;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

.alarm-setup {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 24px;
  text-align: left;
  background: #142238;
  border: 1px solid #314866;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.alarm-setup-header {
  margin-bottom: 18px;
}

.alarm-setup-heading {
  font-size: 16px;
  font-weight: 700;
  color: #c6d3e5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
  text-align: left;
}

.alarm-setup-copy {
  max-width: 680px;
  margin: 0;
  color: #9fb0c8;
  font-size: 14px;
  line-height: 1.5;
}

.alarm-time-row {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(190px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.alarm-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.alarm-time-input {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  background: #0f172a;
  border: 1px solid #4d6382;
  border-radius: 8px;
  padding: 10px 16px;
  outline: none;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  text-align: center;
  color-scheme: dark;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  white-space: nowrap;
}

.alarm-time-input:focus {
  border-color: #7cc2ff;
  box-shadow: 0 0 0 4px rgba(96,165,250,.18), inset 0 1px 0 rgba(255,255,255,.04);
}

.alarm-time-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: .9;
  cursor: pointer;
}

.page-alarm-clock .option-select {
  min-height: 54px;
  min-width: 0;
  width: 100%;
  padding: 0 40px 0 14px;
  color: #ffffff;
  background-color: #0f172a;
  border: 1px solid #4d6382;
  border-radius: 8px;
  font-size: 15px;
  color-scheme: dark;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.page-alarm-clock .option-select:focus {
  border-color: #7cc2ff;
  box-shadow: 0 0 0 4px rgba(96,165,250,.18), inset 0 1px 0 rgba(255,255,255,.04);
}

.page-alarm-clock .option-select option {
  color: #ffffff;
  background: #0f172a;
}

.alarm-test-btn {
  min-height: 54px;
  align-self: end;
}

.alarm-label-row {
  margin-bottom: 18px;
}

.alarm-label-text {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #b7c4d8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  text-align: left;
}

.alarm-label-input {
  width: 100%;
  min-height: 54px;
  background: #0f172a;
  border: 1px solid #4d6382;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.alarm-label-input:focus {
  border-color: #7cc2ff;
  box-shadow: 0 0 0 4px rgba(96,165,250,.18), inset 0 1px 0 rgba(255,255,255,.04);
}
.alarm-label-input::placeholder { color: #8fa1bb; }

.alarm-schedule {
  margin-bottom: 18px;
}

.alarm-repeat-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 5px;
  border: 1px solid #314866;
  border-radius: 8px;
  background: #0f172a;
}

.alarm-repeat-option {
  position: relative;
  min-width: 0;
}

.alarm-repeat-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.alarm-repeat-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 6px;
  color: #b7c4d8;
  font-weight: 800;
  text-align: center;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.alarm-repeat-option input:checked + span {
  background: #2f80ed;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(47,128,237,.22);
}

.alarm-repeat-option input:focus-visible + span {
  outline: 2px solid #7cc2ff;
  outline-offset: 2px;
}

.alarm-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.alarm-days[hidden] {
  display: none;
}

.alarm-days label {
  position: relative;
  min-width: 0;
}

.alarm-days input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.alarm-days span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #405979;
  border-radius: 7px;
  color: #c6d3e5;
  font-weight: 800;
  background: #101b2e;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.alarm-days input:checked + span {
  background: rgba(96,165,250,.18);
  border-color: #60a5fa;
  color: #ffffff;
}

.alarm-days input:focus-visible + span {
  outline: 2px solid #7cc2ff;
  outline-offset: 2px;
}

.alarm-options {
  display: flex;
  gap: 18px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.page-alarm-clock .alarm-options .option-label {
  color: #d6e1f0;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.alarm-preview {
  min-height: 48px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #314866;
  background: #101b2e;
  color: #d7e2f2;
  font-size: 14px;
  line-height: 1.45;
}

.alarm-preview strong {
  color: #7cc2ff;
}

.alarm-controls {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.alarm-status {
  min-height: 24px;
  margin-top: 16px;
}

.alarm-status-msg {
  font-size: 14px;
  color: #60a5fa;
  font-weight: 500;
  text-align: center;
}

.alarm-ringing {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 9999;
}

.alarm-ringing-icon {
  animation: alarmPulse 0.6s ease-in-out infinite alternate;
}

.alarm-ringing-icon svg {
  width: 78px;
  height: 78px;
  display: block;
  color: #f97316;
}

@keyframes alarmPulse {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

.alarm-ringing-title {
  font-size: 48px;
  font-weight: 700;
  color: #f97316;
}

.alarm-ringing-label {
  font-size: 20px;
  color: #94a3b8;
}

.alarm-ringing-controls {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.alarms-list-section {
  width: 100%;
  margin: 28px auto 32px;
  padding: 22px 24px;
  background: #1b2a42;
  border: 1px solid #36506f;
  border-radius: 8px;
}

.alarms-list-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 12px;
}

.alarms-empty p {
  color: #94a3b8;
  font-size: 14px;
  font-style: italic;
}

.alarms-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alarms-list li {
  display: grid;
  grid-template-columns: minmax(130px, auto) minmax(0, 1fr) auto;
  align-items: center;
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #e2e8f0;
  gap: 12px;
}

.alarms-list li.is-disabled {
  opacity: .62;
}

.alarms-list .alarm-item-time {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #f97316;
}

.alarms-list .alarm-item-label {
  min-width: 0;
  color: #d7e2f2;
}

.alarm-item-label strong {
  display: block;
  color: #f8fafc;
  font-size: 14px;
  margin-bottom: 2px;
}

.alarm-item-label span {
  display: block;
  color: #9fb0c8;
  font-size: 12px;
}

.alarms-list .alarm-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alarm-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 64px;
  height: 34px;
  padding: 3px;
  border: 1px solid #405979;
  border-radius: 999px;
  background: #46576e;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.alarm-toggle-btn::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  transition: transform .15s ease;
}

.alarm-toggle-btn.is-on {
  background: #2f80ed;
  border-color: #60a5fa;
}

.alarm-toggle-btn.is-on::before {
  transform: translateX(30px);
}

.alarm-delete-btn {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #405979;
  border-radius: 7px;
  background: #101b2e;
  color: #d7e2f2;
  font-weight: 800;
  cursor: pointer;
}

.alarm-delete-btn:hover {
  border-color: #ef4444;
  color: #ffffff;
}

@media (max-width: 760px) {
  .timer-card--alarm {
    padding: 20px;
  }

  .timer-card--alarm .digital-clock-display {
    padding: 18px;
    gap: 10px;
  }

  .page-alarm-clock .digital-clock-display--sm .clock-time {
    font-size: clamp(42px, 14vw, 64px);
  }

  .page-alarm-clock .digital-clock-display--sm .clock-ampm {
    padding-bottom: 5px;
    font-size: 20px;
  }

  .alarm-setup {
    padding: 18px;
  }

  .alarm-time-row {
    grid-template-columns: 1fr;
  }

  .alarm-repeat-toggle,
  .alarm-days {
    grid-template-columns: 1fr;
  }

  .alarm-controls,
  .alarm-options {
    justify-content: stretch;
  }

  .alarm-controls .btn,
  .alarm-time-row .btn,
  .alarm-options .option-label {
    width: 100%;
  }

  .alarms-list li {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .alarms-list .alarm-item-actions {
    justify-content: space-between;
  }
}

/* ===========================================================================
   CASH CLOCK
   =========================================================================== */

.cash-clock-setup {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.cash-rate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.cash-display {
  margin: 8px 0 20px;
}

.cash-session-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  margin-bottom: 8px;
}

.cash-amount-display {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  color: #16a34a;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.cash-rate-display {
  font-size: 13px;
  color: #64748b;
  margin-top: 6px;
}

.stat-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 16px 0 24px;
}

.stat-box {
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 8px;
  padding: 16px 20px;
  text-align: center;
  min-width: 140px;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #f97316;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

/* ===========================================================================
   COUNTDOWN TO DATE (ctd)
   =========================================================================== */

.ctd-setup {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.ctd-name-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctd-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ctd-name-input {
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 15px;
  color: #e2e8f0;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}

.ctd-name-input:focus { border-color: #60a5fa; }
.ctd-name-input::placeholder { color: #334155; }

.ctd-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ctd-date-group,
.ctd-time-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Override the timer number-input styles for native date/time pickers */
input[type="date"].countdown-input,
input[type="time"].countdown-input {
  width: 100%;
  font-size: 15px;
  font-weight: 400;
  font-family: var(--font-body);
  color: #e2e8f0;
  padding: 10px 12px;
  text-align: left;
  color-scheme: dark;
  cursor: pointer;
  box-sizing: border-box;
}

input[type="date"].countdown-input::-webkit-calendar-picker-indicator,
input[type="time"].countdown-input::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
  opacity: 0.7;
}

.ctd-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ctd-display {
  width: 100%;
}

.ctd-event-display-name {
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 20px;
  text-align: center;
}

.ctd-units {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ctd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.ctd-unit-value {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  color: #f97316;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.ctd-unit-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  margin-top: 4px;
}

.ctd-unit-sep {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: #2d4060;
  line-height: 1;
  padding-top: 8px;
}

.ctd-date-text {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 16px;
  text-align: center;
}

.ctd-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.ctd-past-msg {
  font-size: 16px;
  color: #94a3b8;
  text-align: center;
  padding: 24px;
}

.ctd-saved-section {
  margin-bottom: 32px;
}

.ctd-saved-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 12px;
}

.ctd-saved-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ctd-saved-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #e2e8f0;
  gap: 12px;
}

/* ===========================================================================
   CLOCK COUNTDOWN (canvas-based)
   =========================================================================== */

.clock-face-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.clock-face-canvas {
  border-radius: 50%;
  display: block;
  max-width: 100%;
}

/* ===========================================================================
   HOLIDAY TIMERS
   =========================================================================== */

.holiday-countdowns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0 40px;
}

.holiday-card {
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 10px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s;
}

.holiday-card:hover {
  border-color: #f97316;
}

.holiday-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 4px;
}

.holiday-name {
  font-size: 17px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
}

.holiday-date {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.holiday-countdown {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #f97316;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 8px;
}

/* ===========================================================================
   RESPONSIVE - Clocks
   =========================================================================== */
@media (max-width: 600px) {
  .clock-time { font-size: 56px; }
  .ctd-unit-value { font-size: 38px; }
  .ctd-units { gap: 2px; }
  .ctd-unit { min-width: 54px; }
  .ctd-unit-sep { font-size: 28px; }
  .cash-amount-display { font-size: 52px; }
  .holiday-countdowns { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .ctd-date-row { grid-template-columns: 1fr; }
}

/* ============================================================
   DATE CALCULATOR PAGE
   ============================================================ */

body.page-dates .tool-page-layout {
  max-width: 1040px;
}

.dates-calculator-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(22px, 3vw, 34px);
  background:
    radial-gradient(circle at 14% 0%, rgba(96, 165, 250, .12), transparent 34%),
    linear-gradient(180deg, #1e2d45 0%, #172033 100%);
}

.dates-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 24px;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid #2d4060;
}

.dates-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(96, 165, 250, .12);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
}

.dates-card-header h2 {
  margin: 14px 0 0;
  color: #f8fafc;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
}

.dates-card-header p {
  margin: 0;
  color: #a8b3c5;
  font-size: 15px;
  line-height: 1.65;
}

.dates-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 420px);
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 0;
}

.dates-tabs .hero-widget-tab {
  min-height: 40px;
  border-radius: 6px;
  color: #94a3b8;
  font-weight: 800;
}

.dates-tabs .hero-widget-tab.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: none;
}

.dates-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dates-input-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dates-input-group .ctd-label,
.dates-input-group .option-label {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

body.page-dates .countdown-input,
body.page-dates .option-select {
  width: 100%;
  min-height: 48px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 7px;
  color: #f8fafc;
  font-size: 15px;
}

body.page-dates .countdown-input:focus,
body.page-dates .option-select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .16);
  outline: none;
}

.dates-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.dates-actions .btn {
  min-height: 46px;
  border-radius: 7px;
}

.dates-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dates-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #152038;
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}

.dates-chip:hover {
  border-color: #60a5fa;
  background: #1e3a5f;
  color: #ffffff;
}

.dates-result {
  margin-top: 22px;
}

.dates-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dates-result-item {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 18px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dates-result-item--wide {
  grid-column: 1 / -1;
}

.dates-result-value {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: #60a5fa;
  line-height: 1;
}

.dates-result-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #94a3b8;
}

.dates-result-summary {
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0;
  padding: 14px 16px;
  background: rgba(96, 165, 250, .08);
  border: 1px solid rgba(96, 165, 250, .18);
  border-radius: 8px;
}

.dates-result-summary strong {
  color: #ffffff;
}

.dates-error {
  font-size: 14px;
  margin: 0;
  padding: 12px 14px;
  color: #fecaca;
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(248, 113, 113, .35);
  border-radius: 7px;
}

body.page-dates .info-section {
  border-radius: 8px;
}

@media (max-width: 820px) {
  .dates-card-header,
  .dates-inputs,
  .dates-result-grid {
    grid-template-columns: 1fr;
  }

  .dates-tabs {
    width: 100%;
  }

  .dates-actions {
    align-items: stretch;
  }

  .dates-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.option-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.option-select {
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
  cursor: pointer;
}

.option-select:focus {
  border-color: #60a5fa;
}

/* ---------------------------------------------------------------------------
   CHANCE GAMES HUB (/chance-games)
   --------------------------------------------------------------------------- */

.chance-game-card {
  background: #131f35;
  border: 1px solid #2d4060;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
}

.chance-game-header {
  margin-bottom: 20px;
}

.chance-game-title {
  font-size: 20px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 6px;
}

.chance-game-desc {
  font-size: 14px;
  color: #94a3b8;
  margin: 0;
}

.chance-game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Coin */
.coin-display {
  perspective: 600px;
  width: 100px;
  height: 100px;
  cursor: pointer;
}

.coin {
  width: 100px;
  height: 100px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(.25,.46,.45,.94);
}

.coin--flipping {
  animation: coinSpin 1s cubic-bezier(.25,.46,.45,.94) forwards;
}

@keyframes coinSpin {
  0%   { transform: rotateY(0deg); }
  40%  { transform: rotateY(900deg); }
  70%  { transform: rotateY(1260deg); }
  100% { transform: rotateY(var(--final-rot, 1080deg)); }
}

.coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.coin-face--heads {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 16px rgba(245,158,11,.4);
}

.coin-face--tails {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  transform: rotateY(180deg);
  box-shadow: 0 4px 16px rgba(96,165,250,.4);
}

.chance-result {
  font-size: 22px;
  font-weight: 700;
  min-height: 32px;
  color: #f1f5f9;
  text-align: center;
}

.chance-result--heads { color: #f59e0b; }
.chance-result--tails  { color: #60a5fa; }

.chance-stats {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #94a3b8;
}

.chance-stats strong { color: #e2e8f0; }

/* Dice */
.dice-config {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.dice-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 80px;
}

.dice-faces {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.dice-total {
  font-size: 18px;
  font-weight: 700;
  color: #f97316;
}

/* Spinner */
.spinner-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.spinner-canvas-wrapper {
  position: relative;
  flex-shrink: 0;
}

.spinner-canvas {
  display: block;
  border-radius: 50%;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}

.spinner-needle {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  color: #f97316;
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
}

.spinner-config {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 160px;
}

.spinner-options-label {
  font-size: 13px;
  color: #94a3b8;
}

.spinner-result {
  font-size: 20px;
  font-weight: 700;
  color: #f1f5f9;
  min-height: 28px;
  text-align: center;
}

.spinner-result--visible {
  color: #f97316;
}

/* Card Picker */
.card-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.playing-card {
  width: 90px;
  height: 126px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  flex-shrink: 0;
}

.playing-card--back {
  background: linear-gradient(135deg, #1e3a8a, #1e2d45);
  border: 1px solid #3d5580;
  color: #60a5fa;
}

.playing-card--red {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #e11d48;
}

.playing-card--black {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

.card-corner {
  position: absolute;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.card-corner--tl { top: 6px; left: 8px; }
.card-corner--br { bottom: 6px; right: 8px; transform: rotate(180deg); }

.card-center-suit {
  font-size: 2rem;
}

.card-result-text {
  font-size: 16px;
  font-weight: 600;
  color: #e2e8f0;
  min-height: 24px;
}

.card-stats {
  font-size: 14px;
  color: #94a3b8;
}

.card-stats strong { color: #e2e8f0; }


/* ============================================================
   TALLY COUNTER - Tally-counters.html
   ============================================================ */

.tally-section {
  margin-bottom: 2rem;
}

.tally-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  justify-content: center;
}

@keyframes tally-bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.14); color: #60a5fa; }
  70%  { transform: scale(0.97); }
  100% { transform: scale(1); color: #e2e8f0; }
}

.tally-count-display.bump {
  animation: tally-bump 0.22s ease-out forwards;
}

.tally-card {
  background: #1e2d45;
  border: 1px solid #2d4060;
  border-radius: 16px;
  border-top: 3px solid #2d4a70;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: border-color .15s;
}

.tally-card:focus-within {
  border-top-color: #60a5fa;
}

.tally-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tally-label-input {
  flex: 1;
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: .9375rem;
  font-weight: 600;
  padding: 6px 10px;
  outline: none;
  min-width: 0;
}

.tally-label-input:focus {
  border-color: #60a5fa;
}

.tally-card-remove {
  flex-shrink: 0;
  color: #475569;
}

.tally-card-remove:hover {
  color: #ef4444;
}

.tally-count-display {
  font-size: clamp(3.5rem, 10vw, 5rem);
  font-weight: 800;
  color: #e2e8f0;
  line-height: 1;
  letter-spacing: -.02em;
  min-width: 120px;
  text-align: center;
}

.tally-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.tally-btn {
  border-radius: 50%;
  border: 2px solid;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .1s, background .15s;
  flex-shrink: 0;
  background: transparent;
}

.tally-btn:active {
  transform: scale(.9);
}

.tally-btn--minus {
  width: 68px;
  height: 68px;
  color: #f87171;
  border-color: #7f1d1d;
  background: #2d1a1a;
}

.tally-btn--minus:hover {
  background: #3f1f1f;
  border-color: #ef4444;
}

.tally-btn--plus {
  width: 84px;
  height: 84px;
  color: #4ade80;
  border-color: #166534;
  background: #1a2d1a;
}

.tally-btn--plus:hover {
  background: #1f3a1f;
  border-color: #22c55e;
}

.tally-card-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tally-step-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tally-step-label {
  font-size: .8125rem;
  color: #64748b;
}

.tally-step-input {
  width: 56px;
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: .875rem;
  padding: 4px 6px;
  text-align: center;
  outline: none;
}

.tally-step-input:focus {
  border-color: #60a5fa;
}

.tally-add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 1.5rem;
}

.tally-global-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 12px;
  flex-wrap: wrap;
}

.tally-total {
  flex: 1;
  color: #94a3b8;
  font-size: .9375rem;
  min-width: 0;
}

.tally-total strong {
  color: #e2e8f0;
  font-weight: 700;
}

.use-cases-inline-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.use-case-chip {
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 20px;
  color: #94a3b8;
  font-size: .875rem;
  padding: 5px 14px;
}


/* ============================================================
   RANDOM NAME PICKER - Random-name-pickers.html
   ============================================================ */

.picker-card {
  background: linear-gradient(180deg, #172033 0%, #111827 100%);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.picker-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 680px) {
  .picker-layout { grid-template-columns: 1fr; }
}

.picker-input-col {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.picker-input-label {
  font-size: .8125rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.names-textarea {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #f8fafc;
  font-size: .9375rem;
  line-height: 1.6;
  padding: .75rem 1rem;
  resize: vertical;
  min-height: 240px;
  outline: none;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.names-textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .25);
}

.picker-input-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8125rem;
  color: #64748b;
}

.picker-input-actions {
  display: flex;
  gap: 4px;
}

.picker-options {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  padding-top: .75rem;
  border-top: 1px solid #1a2a40;
}

.option-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.picker-result-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.picker-result-area {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 1.5rem;
  text-align: center;
}

.picker-result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  color: #475569;
  font-size: .9375rem;
}

.picker-placeholder-icon {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px dashed #334155;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E") center/28px no-repeat;
}

.picker-result-display {
  width: 100%;
}

.picker-result-name {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #e2e8f0;
  margin-bottom: .375rem;
  word-break: break-word;
  line-height: 1.15;
}

.picker-result-meta {
  font-size: .875rem;
  color: #64748b;
}

.picker-pick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.picker-history {
  border-top: 1px solid #1a2a40;
  padding-top: 1rem;
}

.picker-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .625rem;
}

.picker-history-title {
  font-size: .875rem;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.picker-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 180px;
  overflow-y: auto;
}

.picker-history-list li {
  font-size: .875rem;
  color: #94a3b8;
  padding: 4px 10px;
  background: #152038;
  border-radius: 6px;
}

.saved-lists-section {
  margin-bottom: 1.75rem;
}

.saved-lists-section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: .375rem;
}

.saved-lists-section > p {
  font-size: .9375rem;
  color: #64748b;
  margin-bottom: .875rem;
}

.saved-lists-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.saved-list-chip {
  background: #152038;
  border: 1px solid #2d4060;
  border-radius: 20px;
  color: #60a5fa;
  font-size: .875rem;
  font-weight: 500;
  padding: 6px 16px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.saved-list-chip:hover {
  background: #1e3260;
  border-color: #60a5fa;
}

/* Modern aligned layout for /random-name-pickers */
body.page-name-picker .tool-page-layout {
  max-width: 1180px;
}

body.page-name-picker .tool-header {
  max-width: 860px;
}

body.page-name-picker .picker-card {
  max-width: 1080px;
  margin: 0 auto 28px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.1), transparent 34%),
    linear-gradient(180deg, #1e2d45 0%, #142038 100%);
  border: 1px solid #3c5678;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
}

body.page-name-picker .picker-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;
}

body.page-name-picker .picker-input-col,
body.page-name-picker .picker-result-col {
  min-width: 0;
}

body.page-name-picker .picker-input-col {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto auto;
  gap: 12px;
}

body.page-name-picker .picker-result-col {
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto auto minmax(0, auto);
  gap: 14px;
}

body.page-name-picker .picker-input-label {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

body.page-name-picker .names-textarea {
  min-height: 360px;
  height: 100%;
  resize: vertical;
  padding: 18px;
  color: #f8fafc;
  background: #0f172a;
  border: 1px solid #45617f;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.page-name-picker .names-textarea::placeholder {
  color: #64748b;
}

body.page-name-picker .picker-input-meta {
  min-height: 48px;
  gap: 12px;
  color: #9fb0c7;
  font-size: 14px;
  font-weight: 700;
}

body.page-name-picker .picker-input-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.page-name-picker .picker-input-actions .btn,
body.page-name-picker #pick-again-btn,
body.page-name-picker .picker-history .btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px;
}

body.page-name-picker .picker-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: #111c31;
  border: 1px solid #334b6d;
  border-radius: 8px;
}

body.page-name-picker .picker-options > .option-label {
  min-height: 44px;
  margin: 0;
  color: #d4deeb;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.page-name-picker .picker-options > .option-label:last-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 86px auto;
  justify-content: start;
  gap: 10px;
}

body.page-name-picker .picker-options .tally-step-input {
  width: 86px;
  height: 44px;
  background: #0f172a;
  border-color: #45617f;
  border-radius: 7px;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
}

body.page-name-picker .picker-result-area {
  min-height: 360px;
  height: 100%;
  padding: 28px;
  background:
    radial-gradient(circle at center, rgba(96, 165, 250, 0.08), transparent 48%),
    #0f172a;
  border: 1px solid #45617f;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.page-name-picker .picker-result-placeholder {
  color: #7d8ca3;
  font-size: 16px;
  font-weight: 700;
}

body.page-name-picker .picker-placeholder-icon {
  width: 72px;
  height: 72px;
  border-color: #375577;
  background-size: 36px;
  background-color: rgba(96, 165, 250, 0.05);
}

body.page-name-picker .picker-result-name {
  color: #f8fafc;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

body.page-name-picker .picker-result-meta {
  margin-top: 10px;
  color: #9fb0c7;
  font-size: 14px;
  font-weight: 700;
}

body.page-name-picker .picker-pick-btn {
  min-height: 64px;
  border-radius: 7px;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.2);
}

body.page-name-picker #pick-again-btn {
  width: 100%;
}

body.page-name-picker .picker-history {
  padding: 16px;
  background: #111c31;
  border: 1px solid #334b6d;
  border-radius: 8px;
}

body.page-name-picker .picker-history-header {
  margin-bottom: 10px;
}

body.page-name-picker .picker-history-title {
  color: #e2e8f0;
  font-weight: 800;
}

body.page-name-picker .picker-history-list {
  max-height: 160px;
  gap: 6px;
}

body.page-name-picker .picker-history-list li {
  padding: 8px 10px;
  background: #0f172a;
  border: 1px solid #26364d;
  color: #cbd5e1;
}

body.page-name-picker .saved-lists-section {
  max-width: 1080px;
  margin: 0 auto 32px;
  padding: 24px;
  background: #1e2d45;
  border: 1px solid #334b6d;
  border-radius: 8px;
}

body.page-name-picker .saved-lists-section h2 {
  margin: 0 0 6px;
  color: #f8fafc;
  font-size: 22px;
}

body.page-name-picker .saved-lists-section > p {
  margin: 0 0 16px;
  color: #9fb0c7;
}

body.page-name-picker .saved-lists-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.page-name-picker .saved-list-chip {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 6px;
  background: #111c31;
  border-color: #334b6d;
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 900px) {
  body.page-name-picker .picker-layout {
    grid-template-columns: 1fr;
  }

  body.page-name-picker .picker-input-col,
  body.page-name-picker .picker-result-col {
    grid-template-rows: none;
  }

  body.page-name-picker .saved-lists-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.page-name-picker .picker-card,
  body.page-name-picker .saved-lists-section {
    padding: 18px;
  }

  body.page-name-picker .names-textarea,
  body.page-name-picker .picker-result-area {
    min-height: 280px;
  }

  body.page-name-picker .picker-input-meta,
  body.page-name-picker .picker-options {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  body.page-name-picker .picker-input-actions {
    justify-content: stretch;
  }

  body.page-name-picker .picker-input-actions .btn {
    flex: 1 1 auto;
  }

  body.page-name-picker .saved-lists-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   RANDOM NUMBER GENERATOR - Random-number-generators.html
   ============================================================ */

.rng-settings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: #101b2e;
  border: 1px solid #2d4060;
  border-radius: 8px;
}

.rng-input-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
  align-items: end;
  gap: 1rem;
}

.rng-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 100px;
}

.rng-input-label {
  font-size: .78rem;
  font-weight: 800;
  color: #b7c4d8;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.rng-to {
  font-size: .95rem;
  font-weight: 800;
  color: #8fa1bb;
  padding-bottom: 18px;
  flex-shrink: 0;
}

.rng-count-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.rng-count-row .option-label.option-toggle {
  margin-left: 1rem;
  color: #d6e1f0;
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

.page-rng .countdown-input {
  width: 100%;
  min-height: 66px;
  padding: 8px 12px;
  background: #0f172a;
  border: 1px solid #4d6382;
  border-radius: 8px;
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3rem);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.page-rng .countdown-input--sm {
  width: 120px;
  min-height: 48px;
  font-size: 1.2rem;
}

.page-rng .countdown-input:focus {
  border-color: #7cc2ff;
  box-shadow: 0 0 0 4px rgba(96,165,250,.18), inset 0 1px 0 rgba(255,255,255,.04);
}

.rng-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.rng-result-area {
  background: #101b2e;
  border: 1px solid #375475;
  border-radius: 8px;
  padding: clamp(1.75rem, 4vw, 2.75rem) 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.rng-result-placeholder {
  color: #8fa1bb;
  font-size: 1.1rem;
  font-weight: 700;
}

.rng-result-display {
  width: 100%;
}

.rng-result-numbers {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  color: #7cc2ff;
  letter-spacing: 0;
  line-height: 1.15;
  word-break: break-all;
}

.rng-result-meta {
  font-size: .9rem;
  color: #b7c4d8;
  margin-top: .5rem;
}

.rng-history {
  margin-top: 1rem;
  border-top: 1px solid #1a2a40;
  padding-top: 1rem;
}

@media (max-width: 700px) {
  .rng-input-row {
    grid-template-columns: 1fr;
  }

  .rng-to {
    padding: 0;
    text-align: center;
  }

  .rng-count-row {
    align-items: stretch;
  }

  .rng-count-row .option-label.option-toggle {
    margin-left: 0;
  }
}

.info-section h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

/* ---------------------------------------------------------------------------
   SITEWIDE TOOL PAGE REFINEMENT
   Keeps older tool templates aligned with the newer professional layout.
   --------------------------------------------------------------------------- */
body.page-tool .tool-page-main > :is(.timer-card, .picker-card, .dates-calculator-card, .content-section, .info-section, .related-tools, .faq-section),
body.page-tool .tool-page-main > .tally-section,
body.page-tool .tool-page-main > .saved-lists-section,
body.page-tool .world-clocks-layout > :is(.content-section, .related-tools, .faq-section),
body.page-tool .world-clocks-layout > :is(.world-clocks-controls, .world-clock-add, .your-local-time) {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

body.page-tool .tool-page-main > :is(.content-section, .info-section, .faq-section, .related-tools) + :is(.content-section, .info-section, .faq-section, .related-tools) {
  margin-top: 24px;
}

body.page-tool .content-section,
body.page-tool .info-section {
  overflow-x: auto;
}

body.page-tool .content-section > h2:first-child,
body.page-tool .info-section > h2:first-child {
  margin-top: 0;
}

body.page-tool .content-section h2,
body.page-tool .info-section h2 {
  line-height: 1.2;
  letter-spacing: 0;
}

body.page-tool .content-section p,
body.page-tool .info-section p,
body.page-tool .content-section li,
body.page-tool .info-section li {
  max-width: 92ch;
}

body.page-clocks-hub .content-section p,
body.page-clocks-hub .content-section li {
  max-width: none;
}

body.page-tool .content-section table,
body.page-tool .info-section table,
body.page-tool .table-scroll table {
  min-width: 640px;
}

body.page-tool .table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.page-tool .info-card-grid,
body.page-tool .hub-grid,
body.page-tool .tool-grid {
  align-items: stretch;
}

body.page-tool .info-card,
body.page-tool .hub-card,
body.page-tool .tool-card {
  min-width: 0;
}

body.page-tool .hub-card,
body.page-tool .tool-card {
  border-radius: 8px;
}

body.page-tool .hub-card-title,
body.page-tool .tool-card-name,
body.page-tool .info-card h3 {
  line-height: 1.25;
  letter-spacing: 0;
}

body.page-tool .hub-card-desc,
body.page-tool .tool-card-desc,
body.page-tool .info-card p {
  line-height: 1.55;
}

body.page-tool .timer-controls,
body.page-tool .countdown-presets,
body.page-tool .hub-grid,
body.page-tool .related-grid,
body.page-tool .info-card-grid {
  row-gap: 12px;
}

body.page-tally-counter .tally-section {
  padding: clamp(20px, 3vw, 32px);
  margin-bottom: 32px;
  background: linear-gradient(180deg, #1e2d45 0%, #142038 100%);
  border: 1px solid #3c5678;
  border-radius: 8px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
}

body.page-tally-counter .tally-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  align-items: stretch;
}

body.page-tally-counter .tally-card {
  border-radius: 8px;
  background: #111c31;
  border-color: #334b6d;
}

body.page-tally-counter .tally-global-controls {
  border-radius: 8px;
  background: #111c31;
  border-color: #334b6d;
}

body.page-world-clocks .world-clocks-layout {
  max-width: 1180px;
}

body.page-world-clocks .world-clocks-controls,
body.page-world-clocks .world-clock-add,
body.page-world-clocks .your-local-time {
  padding: 18px;
  background: #1e2d45;
  border: 1px solid #334b6d;
  border-radius: 8px;
}

body.page-world-clocks .world-clocks-controls {
  justify-content: space-between;
}

body.page-world-clocks .world-clocks-controls .world-clock-search-input {
  max-width: none;
}

body.page-world-clocks .world-clock-card {
  min-height: 150px;
  border-radius: 8px;
  border-color: #334b6d;
}

body.page-world-clocks .world-clock-search-input {
  min-height: 44px;
  border-radius: 7px;
  border-color: #45617f;
  background: #0f172a;
}

@media (max-width: 820px) {
  body.page-tool .tool-page-layout,
  body.page-world-clocks .world-clocks-layout {
    padding-top: 28px;
    padding-bottom: 56px;
  }

  body.page-tool .tool-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  body.page-tool .timer-card,
  body.page-tool .content-section,
  body.page-tool .info-section,
  body.page-tool .faq-section,
  body.page-tally-counter .tally-section {
    padding: 20px;
  }

  body.page-world-clocks .world-clocks-controls,
  body.page-world-clocks .world-clock-add-row {
    flex-direction: column;
    align-items: stretch;
  }

  body.page-world-clocks .world-clocks-controls .btn,
  body.page-world-clocks .world-clock-add-row .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------------------------------------------------------------------------
   SITEWIDE MOBILE OVERFLOW GUARDRAILS
   Keeps large tool controls, long headings, and timer digits inside the viewport.
   --------------------------------------------------------------------------- */
body.page-tool .tool-page-layout,
body.page-tool .tool-page-main,
body.page-tool .timer-card,
body.page-tool .content-section,
body.page-tool .info-section,
body.page-tool .faq-section,
body.page-tool .related-tools,
body.page-tool .related-grid,
body.page-tool .hub-grid,
body.page-tool .tool-grid,
body.page-tool .info-card-grid,
body.page-tool .timer-display-wrapper,
body.page-tool .timer-display {
  min-width: 0;
}

body.page-tool .tool-title,
body.page-tool .tool-intro,
body.page-tool .content-section h2,
body.page-tool .content-section h3,
body.page-tool .content-section p,
body.page-tool .info-section h2,
body.page-tool .info-section h3,
body.page-tool .info-section p,
body.page-tool .faq-question,
body.page-tool .faq-answer {
  overflow-wrap: anywhere;
  word-break: normal;
}

body.page-tool .timer-display-wrapper {
  max-width: 100%;
  overflow: hidden;
}

body.page-tool .timer-card .timer-display,
body.page-tool .timer-card .timer-digits {
  max-width: 100%;
}

@media (max-width: 640px) {
  body.page-tool .tool-page-layout,
  body.page-hub .tool-page-layout,
  body.page-timer-link-generator .tool-page-layout,
  body.timer-page .page-content,
  body.clock-page .page-content,
  body.seasonal-page .page-content,
  body.page-timer-variant .content-wrap,
  body.page-sensory-timer .sensory-page,
  body.page-challenge .magnet-page,
  body.page-how-old-am-i .magnet-page,
  body.page-reaction-test .magnet-page,
  body.page-event-countdown .magnet-page,
  body.page-event-countdown-create .magnet-page,
  body.page-shareable-timer .magnet-page,
  body.page-time-difference .magnet-page,
  body.page-time-difference-form .magnet-page {
    width: min(100% - 28px, 1180px);
  }

  body.page-tool .tool-title {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  body.page-tool .tool-intro {
    font-size: clamp(1rem, 4.8vw, 1.25rem);
    line-height: 1.55;
  }

  body.page-tool .timer-card,
  body.page-tool .content-section,
  body.page-tool .info-section,
  body.page-tool .faq-section,
  body.page-tally-counter .tally-section {
    padding: 18px;
  }

  body.page-tool .timer-card .timer-display,
  body.page-tool .timer-card .timer-digits {
    font-size: clamp(3.25rem, 17vw, 5rem);
    white-space: nowrap;
    letter-spacing: 0;
  }

  body.page-tool .timer-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }

  body.page-tool .timer-controls .btn,
  body.page-tool .timer-controls .btn-timer {
    width: 100%;
    min-width: 0;
  }

  body.page-tool .countdown-inputs-row {
    width: 100%;
    padding: 14px;
    gap: 6px;
  }

  body.page-tool .countdown-input {
    width: min(24vw, 72px);
    font-size: clamp(1.8rem, 9vw, 2.45rem);
  }

  body.page-tool .countdown-sep {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }

  body.page-tool .tool-header,
  body.page-tool .timer-card,
  body.page-tool .info-section,
  body.page-tool .faq-section,
  body.page-tool .related-tools,
  body.page-hub .hub-header,
  body.page-hub .hub-grid,
  body.page-hub .content-section {
    max-width: 100%;
    overflow-x: clip;
  }

  body.page-tool .content-section {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.page-tool :is(.timer-card, .content-section, .info-section, .faq-section, .related-tools) :is(input, select, textarea, button, .btn) {
    max-width: 100%;
  }

  body.page-tool :is(.timer-card, .content-section, .info-section, .faq-section, .related-tools) :is(.btn, button) {
    min-width: 0;
  }

  body.page-tool :is(.timer-card, .content-section, .info-section, .faq-section, .related-tools) :is(.grid, [class*="grid"], [class*="row"], [class*="controls"], [class*="actions"]) {
    min-width: 0;
  }

  body.page-tool :is(.content-section, .info-section, .faq-section) :is(.table-scroll, [style*="overflow-x"]) table {
    min-width: 560px;
  }

  body.page-tool :is(.content-section, .info-section, .faq-section) :is(.table-scroll, [style*="overflow-x"]) {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 380px) {
  body.page-tool .timer-card .timer-display,
  body.page-tool .timer-card .timer-digits {
    font-size: clamp(2.6rem, 15vw, 3.6rem);
  }
}
