/* ==========================================================================
   twocans — design tokens + components
   Values taken from the design handoff ("Design Tokens" section).
   ========================================================================== */

:root {
  /* Canvas & surfaces */
  --tc-bg:          #EFE2CC;
  --tc-bg-wash:     #FBF3E4;
  --tc-main:        #FBF4E7;
  --tc-card:        #FFFFFF;
  --tc-sunken:      #FCF7EE;
  --tc-sunken-2:    #FCF6EC;
  --tc-sunken-3:    #FCF8F0;

  /* Ink */
  --tc-ink:         #4A3B33;
  /* Text shades: each at least 4.5:1 on white and on the cream washes, the
     WCAG AA minimum for body text. */
  --tc-ink-2:       #726457;
  --tc-ink-3:       #74644F;
  --tc-ink-4:       #776350;
  --tc-ink-5:       #7C6345;
  --tc-ink-6:       #726154;
  --tc-ink-7:       #7A634E;

  /* Accents */
  --tc-coral:       #FF7A59;
  --tc-coral-hover: #FF8765;
  --tc-coral-lip:   #E0573C;
  /* Coral as text: the lip is for the edge under a button, too light to read. */
  --tc-coral-ink:   #BA371E;
  /* Text on a coral fill: white on coral is 2.6:1, too faint; this is 5.3:1. */
  --tc-on-coral:    #3A2A22;
  --tc-coral-light: #FF8E70;
  --tc-coral-pale:  #FFA98F;
  --tc-coral-bg:    #FFE0D6;

  --tc-teal:        #5BC7B8;
  --tc-teal-deep:   #2A7269;
  --tc-teal-lip:    #1D514B;
  --tc-teal-pale:   #86DDD1;
  --tc-teal-bg:     #E6F6F2;

  --tc-sun:         #FFC857;
  --tc-sun-ink:     #98610E;
  --tc-sun-ink-2:   #E08A1E;
  --tc-sun-bg:      #FFF0D9;

  --tc-lav:         #A78BD0;
  --tc-lav-ink:     #7557A2;
  --tc-lav-bg:      #ECE3F7;

  --tc-sky:         #6FB7E8;
  --tc-sky-ink:     #256D9F;
  --tc-sky-bg:      #DCEEFB;

  --tc-red:         #DB351C;
  --tc-red-ink:     #B83B28;
  --tc-red-bg:      #FBE2DD;
  --tc-red-border:  #F2C9C0;

  --tc-green:       #5BB85B;
  --tc-green-bg:    #E3F4E3;
  --tc-green-ink:   #357935;

  /* Lines */
  --tc-border:      #F0E4D2;
  --tc-border-2:    #ECDFCB;
  --tc-border-3:    #E6D6BE;
  --tc-border-4:    #EFE2CC;
  --tc-string:      #CDB89B;
  --tc-dark:        #332925;
  --tc-twilio:      #F22F46;

  /* Type */
  --tc-display: 'Baloo 2', system-ui, sans-serif;
  --tc-body:    'Nunito', system-ui, sans-serif;

  /* Shadows */
  --tc-shadow-card:  0 8px 22px rgba(74, 59, 51, .05);
  --tc-shadow-card2: 0 10px 28px rgba(74, 59, 51, .06);
  --tc-shadow-lift:  0 16px 34px rgba(74, 59, 51, .12);
  --tc-shadow-modal: 0 30px 70px rgba(51, 41, 37, .4);
}

/* --------------------------------------------------------------- base reset */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--tc-body);
  color: var(--tc-ink);
  background: var(--tc-bg);
  -webkit-font-smoothing: antialiased;
}

input, button, textarea, select { font-family: inherit; }
input:focus, textarea:focus { outline: none; }
button { font-family: inherit; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #d8c6ab;
  border-radius: 10px;
  /* Transparent border inset via background-clip keeps the thumb off the very
     edge, so it reads as part of the panel rather than stuck to its rim. */
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #c9b295; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Firefox has no pseudo-elements for this; these are the equivalent knobs. */
* { scrollbar-width: thin; scrollbar-color: #d8c6ab transparent; }

/* --------------------------------------------------------------- animations */

@keyframes tc-float     { 0%, 100% { transform: translateY(0); }   50% { transform: translateY(-8px); } }
@keyframes tc-wiggle    { 0%, 100% { transform: rotate(-4deg); }   50% { transform: rotate(4deg); } }
@keyframes tc-ring      { 0%   { box-shadow: 0 0 0 0 rgba(95, 199, 184, .45); }
                          70%  { box-shadow: 0 0 0 16px rgba(95, 199, 184, 0); }
                          100% { box-shadow: 0 0 0 0 rgba(95, 199, 184, 0); } }
@keyframes tc-toast     { from { transform: translate(-50%, 18px); opacity: 0; }
                          to   { transform: translate(-50%, 0); opacity: 1; } }
@keyframes tc-pop       { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes tc-spin      { to { transform: rotate(360deg); } }
@keyframes tc-dash      { to { background-position: -28px 0; } }
@keyframes tc-eq        { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes tc-livepulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* -------------------------------------------------------------- type helpers */

.tc-display { font-family: var(--tc-display); font-weight: 800; }
.tc-muted   { font: 600 13px var(--tc-body); color: var(--tc-ink-3); }
.tc-meta    { font: 600 12px var(--tc-body); color: var(--tc-ink-3); }
.tc-micro   { font: 600 11px var(--tc-body); color: var(--tc-ink-4); }
.tc-field-note { display: block; margin-top: 5px; font-weight: 600; }

.tc-call-row__line { font-weight: 700; color: var(--tc-teal-deep); }

/* Weekly schedule editor: rows of day chips and a from–until time. */
.tc-sched__rows { display: flex; flex-direction: column; gap: 10px; }
.tc-sched__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 12px; border-radius: 14px; background: var(--tc-sunken-2); border: 1.5px solid var(--tc-border);
}
.tc-sched__days { display: flex; gap: 5px; }
.tc-sched__times { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tc-sched__times .tc-time-field { min-width: 118px; }
.tc-sched__remove {
  border: none; background: transparent; color: var(--tc-ink-4); font: 800 20px var(--tc-display);
  cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.tc-sched__remove:hover { background: var(--tc-card); color: var(--tc-coral-ink); }
.tc-sched__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; }
.tc-daychip { position: relative; cursor: pointer; }
.tc-daychip input { position: absolute; opacity: 0; width: 0; height: 0; }
.tc-daychip span[aria-hidden] {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  font: 800 12px var(--tc-display); color: var(--tc-ink-4);
  background: var(--tc-card); border: 1.5px solid var(--tc-border);
}
.tc-daychip input:checked + span { background: var(--tc-teal); border-color: var(--tc-teal); color: #fff; }
.tc-daychip input:focus-visible + span { outline: 2px solid var(--tc-teal-deep); outline-offset: 2px; }
.tc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Phone line: one row per number, and the phone it rings. */
.tc-ring-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tc-ring-row__num { font: 800 14px var(--tc-display); color: var(--tc-ink); min-width: 150px; display: flex; flex-direction: column; }
.tc-ring-row__pick { max-width: 300px; flex: 1; }

/* ============================================================= LOGIN SCREEN */

.tc-page {
  min-height: 100vh;
  width: 100%;
  background: radial-gradient(120% 80% at 80% -10%, var(--tc-bg-wash) 0%, var(--tc-bg) 60%);
}

.tc-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.tc-login__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
  max-width: 392px;
}

.tc-login__head { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.tc-logo { cursor: pointer; line-height: 0; background: none; border: none; padding: 0; }
.tc-logo--login { animation: tc-float 4s ease-in-out infinite; }

.tc-wordmark { font: 800 40px var(--tc-display); line-height: 1; letter-spacing: -.01em; }
.tc-wordmark--sm { font-size: 22px; }
.tc-wordmark .tc-two  { color: var(--tc-coral); }
.tc-wordmark .tc-cans { color: var(--tc-teal-deep); }

.tc-tagline { font: 600 15px var(--tc-body); color: var(--tc-ink-6); margin-top: 8px; }

.tc-login__card {
  width: 100%;
  background: var(--tc-card);
  border: 1.5px solid var(--tc-border);
  border-radius: 26px;
  padding: 26px 24px;
  box-shadow: 0 18px 40px rgba(74, 59, 51, .09);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Inline validation / auth failure, shown above the fields it refers to. */
.tc-form-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--tc-red-bg);
  border: 1.5px solid var(--tc-red-border);
  color: var(--tc-red-ink);
  border-radius: 14px;
  padding: 11px 14px;
  font: 700 13px var(--tc-body);
}
.tc-form-error::before {
  content: "!";
  flex: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--tc-red);
  color: #fff;
  font: 800 12px var(--tc-display);
  display: flex; align-items: center; justify-content: center;
}

.tc-setup-note {
  background: var(--tc-teal-bg);
  border: 1.5px solid #CFEDE6;
  color: var(--tc-teal-lip);
  border-radius: 14px;
  padding: 11px 14px;
  font: 600 12px/1.5 var(--tc-body);
}

.tc-login__alt  { text-align: center; font: 600 13px var(--tc-body); color: var(--tc-ink-4); margin-top: 2px; }
.tc-login__alt b { color: var(--tc-teal-deep); font-weight: 800; cursor: pointer; }
.tc-login__foot { font: 600 12px var(--tc-body); color: var(--tc-ink-4); text-align: center; max-width: 300px; }

/* ================================================================= APP SHELL */

.tc-shell { display: flex; align-items: stretch; min-height: 100vh; background: transparent; }

.tc-sidebar {
  width: 236px;
  flex: none;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.tc-brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 18px; }

.tc-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--tc-main);
  border-left: 1.5px solid #EBDDC6;
}

.tc-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 244, 231, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--tc-border-4);
  padding: 18px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tc-header__title { font: 800 26px var(--tc-display); line-height: 1.1; color: var(--tc-ink); }
.tc-header__sub   { font: 600 13px var(--tc-body); color: var(--tc-ink-3); margin-top: 2px; }
.tc-header__actions { display: flex; align-items: center; gap: 10px; flex: none; }

.tc-content { flex: 1; overflow: auto; padding: 24px 26px 120px; }

.tc-stack { display: flex; flex-direction: column; gap: 18px; }
.tc-stack--tight { gap: 12px; }
.tc-stack--snug  { gap: 4px; }
.tc-narrow  { max-width: 680px; }
.tc-narrow--log { max-width: 760px; }
.tc-narrow--vm  { max-width: 720px; }
.tc-narrow--guardians { max-width: 660px; }

/* ------------------------------------------------------------------ sidebar nav */

.tc-nav-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font: 800 14px var(--tc-display);
  text-align: left;
  width: 100%;
  transition: all .15s;
  background: transparent;
  color: var(--tc-ink-6);
}

.tc-nav-btn:hover { background: rgba(255, 255, 255, .55); }

.tc-nav-btn.is-active {
  background: var(--tc-card);
  color: var(--tc-ink);
  box-shadow: 0 6px 16px rgba(74, 59, 51, .08);
}

.tc-nav-icon {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tc-nav-icon--dash { background: #FFE7C2; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 5px; }
.tc-nav-icon--dash i { background: #F5A623; border-radius: 2px; }

.tc-nav-icon--phones { background: var(--tc-coral-bg); }
.tc-nav-icon--phones i { width: 11px; height: 14px; border-radius: 3px 3px 4px 4px; background: var(--tc-coral); display: block; }

.tc-nav-icon--contacts { background: var(--tc-teal-bg); align-items: flex-end; }
.tc-nav-icon--contacts i.body { width: 16px; height: 9px; border-radius: 9px 9px 0 0; background: var(--tc-teal-deep); display: block; }
.tc-nav-icon--contacts i.head { width: 8px; height: 8px; border-radius: 50%; background: var(--tc-teal-deep); position: absolute; margin-bottom: 7px; }

.tc-nav-icon--log { background: var(--tc-lav-bg); flex-direction: column; gap: 3px; justify-content: center; padding: 0 6px; }
.tc-nav-icon--log i { height: 2.5px; background: var(--tc-lav); border-radius: 2px; align-self: stretch; }
.tc-nav-icon--log i:last-child { width: 60%; align-self: flex-start; }

.tc-nav-icon--voice { background: #FFEFD6; }
.tc-nav-icon--voice i { width: 9px; height: 9px; border-radius: 50%; border: 2.5px solid #E0991F; display: block; }
.tc-nav-icon--voice i + i { margin-left: 2px; }

.tc-nav-icon--trunk { background: var(--tc-sky-bg); }
.tc-nav-icon--trunk i { width: 14px; height: 0; border-top: 2.5px dashed var(--tc-sky-ink); display: block; }

.tc-nav-icon--dialplan { background: var(--tc-sky-bg); }
.tc-nav-icon--dialplan i { position: absolute; background: var(--tc-sky-ink); border-radius: 2px; }
.tc-nav-icon--dialplan i.h1 { width: 12px; height: 2.5px; top: 9px; left: 7px; }
.tc-nav-icon--dialplan i.h2 { width: 12px; height: 2.5px; top: 15px; left: 7px; }
.tc-nav-icon--dialplan i.v1 { width: 2.5px; height: 12px; top: 7px; left: 9px; }
.tc-nav-icon--dialplan i.v2 { width: 2.5px; height: 12px; top: 7px; left: 14px; }

.tc-nav-badge {
  margin-left: auto;
  background: var(--tc-coral);
  color: var(--tc-on-coral);
  font: 800 11px var(--tc-body);
  min-width: 20px;
  height: 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.tc-sidebar__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

.tc-quiet-card {
  background: var(--tc-card);
  border: 1.5px solid var(--tc-border);
  border-radius: 18px;
  padding: 13px 14px;
}
.tc-quiet-card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tc-quiet-card__label { font: 800 13px var(--tc-display); color: var(--tc-ink); }
.tc-quiet-card__value { font: 600 11px var(--tc-body); color: var(--tc-ink-4); }

.tc-signout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: none;
  background: transparent;
  border-radius: 12px;
  font: 700 13px var(--tc-body);
  color: #A08E7E;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.tc-signout:hover { background: rgba(255, 255, 255, .5); }
.tc-signout span {
  width: 30px; height: 30px; border-radius: 50%; background: #EAD9BE;
  display: flex; align-items: center; justify-content: center;
  font: 800 13px var(--tc-display); color: #7A6857;
}

/* -------------------------------------------------------------- bottom tabs */

.tc-bottomnav {
  display: none;
  position: sticky;
  bottom: 0;
  z-index: 25;
  background: rgba(255, 253, 248, .94);
  backdrop-filter: blur(8px);
  border-top: 1.5px solid var(--tc-border-4);
  justify-content: space-around;
  padding: 6px 4px 8px;
}

.tc-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: 800 10.5px var(--tc-body);
  color: var(--tc-ink-4);
  padding: 2px 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
/* The same box for every icon, so they share a centre line and a baseline. */
.tc-tab__glyph {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 28px; border-radius: 14px;
  font-size: 18px; line-height: 1;
  transition: background .15s ease, color .15s ease;
}
.tc-tab__glyph i { width: 22px; text-align: center; }
.tc-tab__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-tab.is-active { color: var(--tc-coral-ink); }
.tc-tab.is-active .tc-tab__glyph { background: var(--tc-coral-bg); color: var(--tc-coral-ink); }
.tc-tab:active .tc-tab__glyph { background: var(--tc-sunken-2); }
.tc-tab__dot {
  position: absolute; top: 2px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--tc-coral); box-shadow: 0 0 0 2px rgba(255, 253, 248, .94);
}

/* ==================================================================== BUTTONS */

.tc-btn {
  flex: none;
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font: 800 14px var(--tc-display);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s, box-shadow .1s, margin-top .1s;
}

/* Chunky "button lip": a hard offset shadow that shrinks when pressed. */
.tc-btn--coral { background: var(--tc-coral); color: var(--tc-on-coral); box-shadow: 0 4px 0 var(--tc-coral-lip); }
.tc-btn--coral:hover { background: var(--tc-coral-hover); }
.tc-btn--coral:active { box-shadow: 0 2px 0 var(--tc-coral-lip); transform: translateY(2px); }

.tc-btn--teal { background: var(--tc-teal-deep); color: #fff; box-shadow: 0 4px 0 var(--tc-teal-lip); }
.tc-btn--teal:active { box-shadow: 0 2px 0 var(--tc-teal-lip); transform: translateY(2px); }
.tc-btn--whatsapp { background: #25D366; color: #fff; box-shadow: 0 4px 0 #1DA851; }
.tc-btn--whatsapp:active { box-shadow: 0 2px 0 #1DA851; transform: translateY(2px); }

.tc-btn--sun { background: var(--tc-sun); color: #6E5212; box-shadow: 0 4px 0 #E6AE3D; padding: 10px 16px; font-size: 13px; border-radius: 12px; }
.tc-btn--sun:active { box-shadow: 0 2px 0 #E6AE3D; transform: translateY(2px); }

.tc-btn--danger { background: var(--tc-red); color: #fff; box-shadow: 0 4px 0 var(--tc-red-ink); }
.tc-btn--danger:active { box-shadow: 0 2px 0 var(--tc-red-ink); transform: translateY(2px); }

.tc-btn--ghost { border: 1.5px solid var(--tc-border-3); background: var(--tc-card); color: #7A6857; padding: 11px 16px; }
.tc-btn--ghost:hover { border-color: var(--tc-string); }

.tc-btn--outline-danger { border: 1.5px solid var(--tc-red-border); background: var(--tc-card); color: var(--tc-red); padding: 11px 16px; border-radius: 13px; font-size: 13px; }
.tc-btn--outline-danger:hover { border-color: var(--tc-red); background: #FFF6F4; }

.tc-btn--block { width: 100%; }
.tc-btn--lg { padding: 15px; border-radius: 16px; font-size: 17px; }
.tc-btn--sm { padding: 9px; border-radius: 11px; font-size: 13px; }
.tc-btn:disabled,
.tc-btn.is-disabled { background: #E8DAC4; color: var(--tc-ink-4); box-shadow: none; cursor: not-allowed; }
.tc-btn.is-disabled:active { transform: none; }

.tc-btn--icon {
  flex: none;
  width: 38px; height: 38px; padding: 0;
  border-radius: 11px;
  border: 1.5px solid var(--tc-border-3);
  background: var(--tc-sunken-2);
  color: #7A6857;
  font: 800 16px var(--tc-display);
  cursor: pointer;
}
.tc-btn--icon:hover { border-color: var(--tc-teal-deep); background: var(--tc-teal-bg); color: var(--tc-teal-deep); }

.tc-btn--icon-danger { border-color: #F2D7CF; background: var(--tc-card); color: #D88B7B; font-size: 17px; }
.tc-btn--icon-danger:hover { border-color: var(--tc-red); background: #FBE9E4; color: var(--tc-red); }

.tc-account {
  flex: none;
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--tc-border-3);
  cursor: pointer;
  font: 800 16px var(--tc-display);
  background: #EAD9BE;
  color: #7A6857;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.tc-account.is-active { background: var(--tc-coral); color: var(--tc-on-coral); }

/* Account / settings dropdown in the header. */
.tc-menu { position: relative; }
.tc-menu__caret {
  position: absolute;
  right: -1px; bottom: -1px;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .7;
}
.tc-menu__panel {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  min-width: 208px;
  background: var(--tc-card);
  border: 1.5px solid var(--tc-border-3);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(74, 59, 51, .16);
  padding: 6px;
  z-index: 40;
}
.tc-menu__item {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  font: 700 13px var(--tc-body);
  color: var(--tc-ink);
  text-decoration: none;
  cursor: pointer;
}
.tc-menu__item:hover { background: var(--tc-teal-bg); }
.tc-menu__item.is-active { background: var(--tc-teal-bg); color: var(--tc-teal-lip); }
.tc-menu__divider { height: 1.5px; background: var(--tc-border-3); margin: 5px 4px; }
.tc-menu__item i { width: 18px; margin-right: 6px; text-align: center; color: var(--tc-ink-4); }
.tc-menu__item.is-active i { color: inherit; }
/* A <button> that looks like the links around it. */
button.tc-menu__item { width: 100%; border: none; background: transparent; text-align: left; }
.tc-menu__item--signout, .tc-menu__item--signout i { color: var(--tc-coral-ink); }
.tc-menu__item--signout:hover { background: var(--tc-coral-bg); }
.tc-menu__who { padding: 8px 12px 6px; }
.tc-menu__name { font: 800 14px var(--tc-display); color: var(--tc-ink); }
.tc-menu__role { font: 600 11px var(--tc-body); color: var(--tc-ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

.tc-link { font: 800 12px var(--tc-body); color: var(--tc-teal-deep); cursor: pointer; background: none; border: none; padding: 0; }
.tc-back { font: 800 13px var(--tc-display); color: var(--tc-ink-7); cursor: pointer; align-self: flex-start; }
.tc-back:hover { color: var(--tc-ink); }

/* ================================================================ FORM FIELDS */

.tc-label { font: 700 13px var(--tc-body); color: var(--tc-ink-2); display: block; }
.tc-label--sm { font-size: 12px; }

.tc-input {
  width: 100%;
  margin-top: 6px;
  padding: 13px 15px;
  border: 1.5px solid var(--tc-border-2);
  border-radius: 14px;
  font: 600 16px var(--tc-body);
  color: var(--tc-ink);
  background: var(--tc-sunken);
}
.tc-input:focus { border-color: var(--tc-teal); }
.tc-input--white { background: var(--tc-card); padding: 12px 14px; border-radius: 12px; font-size: 16px; margin-top: 5px; }

.tc-textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 1.5px solid var(--tc-border-2);
  border-radius: 14px;
  padding: 13px 15px;
  font: 600 14px/1.5 var(--tc-body);
  color: var(--tc-ink);
  background: var(--tc-sunken);
}

/* Inline rename — dashed underline appears on focus. */
.tc-inline-input {
  width: 100%;
  font: 800 24px var(--tc-display);
  color: var(--tc-ink);
  border: none;
  background: transparent;
  border-bottom: 2px dashed transparent;
  padding: 2px 0;
}
.tc-inline-input:focus { border-bottom-color: var(--tc-border-3); }

.tc-time-field {
  flex: 1;
  min-width: 130px;
  background: var(--tc-sunken-2);
  border: 1.5px solid var(--tc-border);
  border-radius: 14px;
  padding: 11px 14px;
  font: 700 12px var(--tc-body);
  color: var(--tc-ink-2);
}
.tc-time-field input {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: none;
  background: transparent;
  font: 800 20px var(--tc-display);
  color: var(--tc-ink);
}

/* ------------------------------------------------------------------ switches */

.tc-switch {
  width: 48px;
  height: 28px;
  border-radius: 30px;
  position: relative;
  cursor: pointer;
  transition: background .18s;
  flex: none;
  display: block;
  border: none;
  padding: 0;
  background: #E2D2BB;
}
.tc-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: left .18s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .18);
}
.tc-switch.is-on { background: var(--tc-teal); }
.tc-switch.is-on::after { left: 23px; }

/* Transparent-white switch, for the teal gradient cards only (Bedtime mode).
   On a white .tc-card it is white on white — use the plain .tc-switch there. */
.tc-switch--light { background: rgba(255, 255, 255, .22); }
.tc-switch--light.is-on { background: rgba(255, 255, 255, .55); }

/* Checkbox-driven variant, used inside the contact editor form. */
.tc-switch-input { position: absolute; opacity: 0; width: 0; height: 0; }
.tc-switch-input:checked + .tc-switch { background: var(--tc-teal); }
.tc-switch-input:checked + .tc-switch::after { left: 23px; }
.tc-switch-input:focus-visible + .tc-switch { outline: 2px solid var(--tc-teal-deep); outline-offset: 2px; }

/* ==================================================================== CARDS */

.tc-card {
  background: var(--tc-card);
  border: 1.5px solid var(--tc-border);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--tc-shadow-card2);
}
.tc-card--sm  { border-radius: 18px; padding: 16px; box-shadow: var(--tc-shadow-card); }
.tc-card--lg  { border-radius: 24px; padding: 24px; }
.tc-card--flat { box-shadow: 0 6px 18px rgba(74, 59, 51, .05); border-radius: 18px; padding: 0; overflow: hidden; }

.tc-card__title { font: 800 16px var(--tc-display); }
.tc-card__head  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tc-card__hint  { font: 600 12px var(--tc-body); color: var(--tc-ink-3); }
.tc-card__head--wrap { flex-wrap: wrap; gap: 10px; }
.tc-card__lead  { margin: 0 0 14px; }
/* A card's title with its explanation under it, and a smaller one partway down. */
.tc-card__intro { margin-bottom: 14px; }
.tc-card__intro .tc-card__hint { margin: 4px 0 0; line-height: 1.5; }
.tc-card__intro--sub { margin-top: 20px; padding-top: 18px; border-top: 1.5px dashed var(--tc-border-3); }
.tc-card__subtitle { font: 800 14px var(--tc-display); }
.tc-card__hint--loose { line-height: 1.6; }
.tc-card__after { margin: 10px 0 0; }

.tc-divider { height: 1.5px; background: repeating-linear-gradient(90deg, var(--tc-border-3) 0 6px, transparent 6px 12px); }
.tc-divider--fine { background: repeating-linear-gradient(90deg, #EFE0C9 0 5px, transparent 5px 10px); }

/* The text flows as one paragraph beside the icon. (As a flex row, a <b> in
   the middle of a sentence became a column of its own.) */
.tc-info-banner {
  position: relative;
  display: block;
  min-height: 26px;
  line-height: 1.5;
  background: var(--tc-sunken-2);
  border: 1.5px solid var(--tc-border);
  border-radius: 16px;
  padding: 12px 16px 12px 52px;
  font: 700 13px var(--tc-body);
  color: var(--tc-ink-3);
}
.tc-info-banner__icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.tc-info-banner__icon--lav  { background: var(--tc-lav-bg); color: var(--tc-lav-ink); }
.tc-info-banner__icon--sun  { background: #FFEFD6; color: #E0991F; }
.tc-info-banner__icon--teal { background: var(--tc-teal-bg); color: var(--tc-teal-deep); }

/* ===================================================================== GRIDS */

.tc-grid { display: grid; gap: 18px; align-items: start; }
.tc-grid--stats    { grid-template-columns: repeat(auto-fit,  minmax(150px, 1fr)); gap: 14px; }
.tc-grid--stats4   { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tc-grid--devices  { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tc-grid--contacts { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tc-grid--roles    { grid-template-columns: repeat(auto-fit,  minmax(170px, 1fr)); gap: 12px; }

/* ============================================================= TIN CAN GLYPH */

.tc-can {
  /* A <span> is inline by default, which would drop width and height on the
     floor anywhere the can isn't already a flex item. */
  display: block;
  width: 42px;
  height: 48px;
  flex: none;
  border-radius: 8px 8px 11px 11px;
  background: var(--tc-coral);
  position: relative;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .07);
}
.tc-can::before {
  content: "";
  position: absolute;
  top: -3px; left: 2px; right: 2px;
  height: 9px;
  border-radius: 50%;
  background: #FF9277;
  filter: brightness(1.12);
}
.tc-can.is-offline { background: #D8C9B3; opacity: .85; }
.tc-can.is-offline::before { background: #E4D7C2; }

.tc-can--big { width: 54px; height: 62px; }
.tc-can--big::before { height: 12px; }
.tc-can--xl  { width: 58px; height: 66px; }
.tc-can--xl::before { height: 13px; }

.tc-can__model {
  position: absolute;
  bottom: 7px; left: 0; right: 0;
  text-align: center;
  font: 800 9px var(--tc-body);
  color: rgba(255, 255, 255, .85);
  letter-spacing: .05em;
}

/* The "string" between two cans: taut teal when online, cut coral when not. */
.tc-string { flex: none; width: 34px; height: 0; border-top: 3px solid var(--tc-teal); }
.tc-string.is-offline { border-top-style: dashed; border-top-color: #E0B4AB; }

.tc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--tc-green); animation: tc-ring 2.2s infinite; }
.tc-dot.is-offline { background: var(--tc-red); animation: none; }

/* ============================================================ PILLS & CHIPS */

.tc-pill {
  font: 800 11px var(--tc-body);
  padding: 4px 11px;
  border-radius: 20px;
  white-space: nowrap;
  display: inline-block;
}
.tc-pill--ok    { background: var(--tc-green-bg); color: var(--tc-green-ink); }
.tc-pill--bad   { background: var(--tc-red-bg); color: var(--tc-red-ink); }
.tc-pill--muted { background: #F1E7D7; color: var(--tc-ink-3); }
/* A count that wants a decision — how many people are waiting on the dashboard. */
.tc-pill--coral { background: var(--tc-coral); color: var(--tc-on-coral); }
.tc-pill--lg    { font-size: 12px; padding: 5px 13px; }

.tc-chip {
  font: 800 11px var(--tc-body);
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tc-chip--sun  { background: var(--tc-sun-bg); color: var(--tc-sun-ink); }
.tc-chip--teal { background: var(--tc-teal-bg); color: var(--tc-teal-deep); }
.tc-chip--lav  { background: var(--tc-lav-bg); color: var(--tc-lav-ink); }
.tc-chip--sky  { background: var(--tc-sky-bg); color: var(--tc-sky-ink); }
.tc-chip--red  { background: var(--tc-red-bg); color: var(--tc-red-ink); }

.tc-tag { font: 800 11px var(--tc-body); padding: 4px 9px; border-radius: 8px; }
.tc-tag--in-on   { background: var(--tc-teal-bg); color: var(--tc-teal-deep); }
.tc-tag--out-on  { background: var(--tc-coral-bg); color: var(--tc-coral-ink); }
.tc-tag--off     { background: #F1E7D7; color: var(--tc-ink-4); }

.tc-role-pill { font: 800 11px var(--tc-body); padding: 5px 12px; border-radius: 20px; white-space: nowrap; border: none; }
.tc-role-pill--owner  { background: var(--tc-coral-bg); color: var(--tc-coral-ink); cursor: default; }
.tc-role-pill--admin  { background: var(--tc-teal-bg); color: var(--tc-teal-deep); }
.tc-role-pill--viewer { background: var(--tc-lav-bg); color: var(--tc-lav-ink); }
button.tc-role-pill { cursor: pointer; }

/* =================================================================== AVATARS */

.tc-avatar {
  --tc-avatar-size: 40px;
  width: var(--tc-avatar-size);
  height: var(--tc-avatar-size);
  flex: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tc-display);
  font-weight: 800;
  font-size: calc(var(--tc-avatar-size) * .42);
  color: #fff;
  position: relative;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08);
}
.tc-avatar--44 { --tc-avatar-size: 44px; }
.tc-avatar--46 { --tc-avatar-size: 46px; }
.tc-avatar--52 { --tc-avatar-size: 52px; }
.tc-avatar--60 { --tc-avatar-size: 60px; }
.tc-avatar--64 { --tc-avatar-size: 64px; }

.tc-avatar__sos {
  position: absolute;
  right: -3px; bottom: -3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--tc-red);
  border: 2.5px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 10px var(--tc-display);
  color: #fff;
}

/* ================================================================= DASHBOARD */

.tc-livebar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--tc-teal), var(--tc-teal-deep));
  border-radius: 20px;
  padding: 15px 18px;
  color: #fff;
  box-shadow: 0 12px 28px rgba(61, 164, 151, .28);
  flex-wrap: wrap;
}
.tc-livebar__dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; flex: none; animation: tc-livepulse 1.1s infinite; }
.tc-livebar__body { flex: 1; min-width: 160px; }
.tc-livebar__title { font: 800 16px var(--tc-display); }
.tc-livebar__meta  { font: 700 13px var(--tc-body); opacity: .92; }
.tc-livebar .tc-btn--white { background: #fff; color: var(--tc-teal-lip); box-shadow: 0 4px 0 rgba(0, 0, 0, .12); padding: 11px 18px; border-radius: 13px; }
.tc-livebar .tc-btn--outline-white { border: 1.5px solid rgba(255, 255, 255, .6); background: transparent; color: #fff; padding: 11px 16px; border-radius: 13px; }

.tc-lowcredit {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FFF2E1;
  border: 1.5px solid #F7D9A8;
  border-radius: 18px;
  padding: 14px 18px;
}
.tc-lowcredit__icon {
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  background: var(--tc-sun);
  display: flex; align-items: center; justify-content: center;
  font: 800 20px var(--tc-display);
  color: #7A5A12;
}
.tc-lowcredit__title { font: 800 15px var(--tc-display); color: #8A6516; }
.tc-lowcredit__body  { font: 600 13px var(--tc-body); color: #A88B52; }

.tc-stat { background: var(--tc-card); border: 1.5px solid var(--tc-border); border-radius: 20px; padding: 16px 18px; box-shadow: var(--tc-shadow-card); }
.tc-stat__num   { font: 800 30px var(--tc-display); }
.tc-stat__label { font: 700 12px var(--tc-body); color: var(--tc-ink-3); }
.tc-stat--coral .tc-stat__num { color: var(--tc-coral-ink); }
.tc-stat--teal  .tc-stat__num { color: var(--tc-teal-deep); }
.tc-stat--lav   .tc-stat__num { color: var(--tc-lav-ink); }
.tc-stat--red   .tc-stat__num { color: var(--tc-red); }

.tc-line-row {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  padding: 6px;
  border-radius: 14px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
}
.tc-line-row:hover { background: var(--tc-sunken-2); }
.tc-line-row__name { display: block; font: 800 14px var(--tc-display); color: var(--tc-ink); }
.tc-line-row__meta { display: block; font: 600 12px var(--tc-body); color: var(--tc-ink-3); }

.tc-request {
  border: 1.5px solid var(--tc-border);
  border-radius: 16px;
  padding: 13px 14px;
  background: var(--tc-sunken-2);
}
.tc-request__label { font: 800 14px var(--tc-display); color: var(--tc-ink); }
.tc-request__num   { font: 600 12px var(--tc-body); color: var(--tc-ink-3); margin: 2px 0 4px; }
.tc-request__note  { font: 600 12px var(--tc-body); color: var(--tc-ink-5); margin-bottom: 11px; }
.tc-request__actions { display: flex; gap: 8px; }
.tc-request__actions form { flex: 1; display: flex; }
.tc-request__actions .tc-btn { flex: 1; }

/* Call log: the numbers the kids tried, folded away once dealt with. */
.tc-tried > summary { list-style: none; cursor: pointer; }
.tc-tried > summary::-webkit-details-marker { display: none; }
.tc-tried__head { display: flex; align-items: center; gap: 12px; }
.tc-tried__sub  { display: block; margin-top: 4px; line-height: 1.5; }
.tc-tried__count { font: 700 12px var(--tc-body); color: var(--tc-ink-4); white-space: nowrap; }
.tc-tried__count::after { content: " ▸"; }
.tc-tried[open] .tc-tried__count::after { content: " ▾"; }
.tc-tried__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }

.tc-empty { text-align: center; padding: 18px; font: 700 13px var(--tc-body); color: var(--tc-ink-5); }

.tc-bedtime {
  background: linear-gradient(135deg, var(--tc-teal), var(--tc-teal-deep));
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(61, 164, 151, .25);
  color: #fff;
}
.tc-bedtime__head  { display: flex; align-items: center; justify-content: space-between; }
.tc-bedtime__state { font: 700 13px var(--tc-body); opacity: .92; margin-top: 8px; }
.tc-bedtime__times { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tc-bedtime__slot  { flex: 1 1 120px; background: rgba(255, 255, 255, .18); border-radius: 13px; padding: 10px 12px; }
.tc-bedtime__slot dt { font: 700 11px var(--tc-body); opacity: .8; }
.tc-bedtime__slot dd { font: 800 18px var(--tc-display); margin: 0; }
.tc-bedtime__foot  { font: 600 12px var(--tc-body); opacity: .85; margin-top: 11px; }
.tc-bedtime__edit  { display: inline-block; margin-left: 4px; font-weight: 800; color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Dashboard: the queue that waits on a grown-up gets the wide column and the
   at-a-glance cards sit beside it. A plain grid lined each row up by its
   tallest card, and the queue is much taller than the rest, which left holes. */
.tc-dashboard { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) {
  .tc-dashboard { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .tc-grid--stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.tc-recent-row { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 12px; }
.tc-recent-row:hover { background: var(--tc-sunken-2); }
a.tc-recent-row { color: inherit; text-decoration: none; }

/* A call opened from the dashboard: land on it, and show which one it is. */
.tc-card[id^="call-"] { scroll-margin-top: 90px; }
.tc-card.is-focus { animation: tc-focus 2.4s ease-out 1; box-shadow: 0 0 0 2.5px var(--tc-teal); }
@keyframes tc-focus { 0%, 40% { background: var(--tc-teal-bg); } 100% { background: var(--tc-card); } }
@media (prefers-reduced-motion: reduce) { .tc-card.is-focus { animation: none; } }
.tc-recent-row__name { font: 800 14px var(--tc-display); color: var(--tc-ink); }
.tc-recent-row__meta { font: 600 11px var(--tc-body); color: var(--tc-ink-3); }
.tc-recent-row__dur  { font: 800 14px var(--tc-display); color: var(--tc-teal-deep); font-variant-numeric: tabular-nums; }

/* ==================================================================== PHONES */

.tc-device-card {
  background: var(--tc-card);
  border: 1.5px solid var(--tc-border);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--tc-shadow-card2);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.tc-device-card:hover { border-color: #E7D2B4; box-shadow: var(--tc-shadow-lift); transform: translateY(-2px); }
.tc-device-card__top  { display: flex; align-items: flex-start; justify-content: space-between; }
.tc-device-card__name { font: 800 19px var(--tc-display); color: var(--tc-ink); }
.tc-device-card__rule { font: 600 13px var(--tc-body); color: var(--tc-ink-3); }
.tc-device-card__foot { display: flex; align-items: center; justify-content: space-between; }
.tc-device-card__seen { font: 700 12px var(--tc-body); color: var(--tc-ink-4); }
.tc-device-card__open { font: 800 13px var(--tc-display); color: var(--tc-teal-deep); }

.tc-add-tile {
  border: 2px dashed #DDCAAB;
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  min-height: 200px;
  color: var(--tc-ink-4);
  background: transparent;
  transition: border-color .15s, color .15s;
}
.tc-add-tile:hover { border-color: var(--tc-coral); color: var(--tc-coral-ink); }
.tc-add-tile__plus {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--tc-coral-bg);
  display: flex; align-items: center; justify-content: center;
  font: 700 28px var(--tc-display); color: var(--tc-coral-ink);
}
.tc-add-tile__title { font: 800 15px var(--tc-display); }
.tc-add-tile__hint  { font: 600 12px var(--tc-body); text-align: center; max-width: 170px; }

.tc-device-head { display: flex; align-items: center; gap: 18px; padding: 22px; }
.tc-device-head__meta { font-size: 13px; }

/* One phone's page: what a parent changes on the left, what they look up on
   the right. One column, in that order, once there isn't room for both. */
.tc-device { max-width: 1120px; }
.tc-device__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tc-device__save { align-self: flex-start; }
.tc-device__wording { margin-top: 16px; }
.tc-device__wording .tc-textarea { margin-top: 6px; }
.tc-device__remove { align-self: flex-start; }
@media (max-width: 1100px) {
  .tc-device__grid { grid-template-columns: 1fr; }
}

.tc-rule-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1.5px solid var(--tc-border);
  border-radius: 16px;
  background: var(--tc-sunken-2);
}
.tc-rule-row__icon {
  width: 34px; height: 34px; flex: none;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font: 800 16px var(--tc-display);
}
.tc-rule-row__icon--in  { background: var(--tc-teal-bg); color: var(--tc-teal-deep); }
.tc-rule-row__icon--out { background: var(--tc-coral-bg); color: var(--tc-coral-ink); }
.tc-rule-row__title { font: 800 14px var(--tc-display); }
.tc-rule-row__hint  { font: 600 12px var(--tc-body); color: var(--tc-ink-3); }

.tc-preview-msg {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  font: 700 12px var(--tc-body);
  color: var(--tc-teal-deep);
  cursor: pointer;
  background: none; border: none; padding: 0;
}
.tc-preview-msg span {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--tc-teal-bg);
  display: flex; align-items: center; justify-content: center;
}

/* ================================================================== CONTACTS */

.tc-contact-card {
  background: var(--tc-card);
  border: 1.5px solid var(--tc-border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(74, 59, 51, .06);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 13px;
  text-align: left;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.tc-contact-card:hover { border-color: #E7D2B4; box-shadow: 0 16px 32px rgba(74, 59, 51, .12); transform: translateY(-2px); }
.tc-contact-card__head { display: flex; align-items: center; gap: 13px; }
.tc-contact-card__name { font: 800 18px var(--tc-display); color: var(--tc-ink); }
.tc-contact-card__rel  { font: 700 12px var(--tc-body); color: var(--tc-ink-3); }
.tc-contact-card__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-contact-card__foot { display: flex; align-items: center; gap: 10px; font: 700 12px var(--tc-body); color: var(--tc-ink-4); }

/* =================================================== CALL LOG & VOICEMAIL */

.tc-call-row { display: flex; align-items: center; gap: 14px; padding: 15px 18px; }
.tc-call-row__name { font: 800 16px var(--tc-display); color: var(--tc-ink); }
.tc-call-row__meta { font: 600 12px var(--tc-body); color: var(--tc-ink-3); }

.tc-transcript {
  margin: 0 18px 16px;
  padding: 13px 15px;
  background: var(--tc-sunken-2);
  border-radius: 13px;
  border: 1.5px solid #F2E7D5;
  font: 600 13px/1.6 var(--tc-body);
  color: #6E5C4D;
  white-space: pre-line;
}

.tc-vm-row { display: flex; align-items: center; gap: 13px; padding: 15px 18px; }
.tc-vm-row--bare { padding: 0 0 14px; }

/* Greetings screen: everything the line says, one card per listener, one
   row per recording — play, where it plays, and the upload that replaces it. */
.tc-greetings { max-width: 820px; }
.tc-greetings__intro { margin: 0 4px; font-size: 13px; line-height: 1.5; }
.tc-greetings__head  { margin-bottom: 4px; }
.tc-greetings__head .tc-card__hint { margin-top: 3px; }
.tc-greet {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1.5px dashed var(--tc-border-3);
}
.tc-greetings__head + .tc-greet { border-top: none; }
.tc-greet__play  { align-self: start; }
.tc-greet__stock {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--tc-sunken-2); color: var(--tc-ink-4);
  font-size: 16px;
}
.tc-greet__title { font: 800 14px var(--tc-display); color: var(--tc-ink); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tc-greet__when  { font: 600 12px var(--tc-body); color: var(--tc-ink-3); margin-top: 3px; line-height: 1.45; }
.tc-greet__says  { font: 600 12px var(--tc-body); color: var(--tc-ink-4); font-style: italic; margin-top: 4px; }
.tc-greet__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tc-greet__reset { font-size: 12px; }
@media (max-width: 560px) {
  .tc-greet { grid-template-columns: 44px minmax(0, 1fr); }
  .tc-greet__actions { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; }
}
.tc-vm-play {
  width: 46px; height: 46px; flex: none;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font: 800 16px var(--tc-display);
  background: var(--tc-teal-bg);
  color: var(--tc-teal-deep);
}
.tc-vm-play.is-playing { background: var(--tc-teal-deep); color: #fff; }
.tc-vm-row__name { font: 800 16px var(--tc-display); color: var(--tc-ink); display: flex; align-items: center; gap: 8px; }
.tc-vm-unheard { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--tc-coral); }

/* Equalizer bars — the per-bar duration/delay is set inline. */
.tc-eq { display: flex; align-items: center; gap: 3px; }
.tc-eq--vm { height: 26px; padding: 0 18px 10px; }
.tc-eq--live { height: 64px; padding: 0 4px; margin-bottom: 20px; }
.tc-eq i {
  flex: 1;
  height: 100%;
  border-radius: 4px;
  transform-origin: center;
  background: linear-gradient(var(--tc-sun), var(--tc-coral));
  animation-name: tc-eq;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

/* ================================================================= GUARDIANS */

.tc-guardian-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1.5px solid #F4EADB;
}
.tc-guardian-row__name { font: 800 15px var(--tc-display); color: var(--tc-ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tc-guardian-row__mail { font: 600 12px var(--tc-body); color: var(--tc-ink-3); }
.tc-mini-tag { font: 800 10px var(--tc-body); padding: 2px 8px; border-radius: 20px; }
.tc-mini-tag--you     { background: var(--tc-bg); color: var(--tc-ink-6); }
.tc-mini-tag--pending { background: var(--tc-sun-bg); color: var(--tc-sun-ink); }

.tc-invite-row {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--tc-sunken-3);
}
.tc-invite-row input { flex: 1; min-width: 170px; margin-top: 0; }
.tc-invite-row__roles { display: flex; gap: 6px; flex: none; }

.tc-pill-btn {
  flex: 1;
  border: 1.5px solid var(--tc-border-3);
  background: var(--tc-card);
  color: var(--tc-ink-7);
  padding: 10px;
  border-radius: 12px;
  font: 800 13px var(--tc-display);
  cursor: pointer;
}
.tc-pill-btn.is-active { border: 2px solid var(--tc-teal-deep); background: var(--tc-teal-bg); color: var(--tc-teal-lip); }

.tc-role-explainer { font: 800 13px var(--tc-display); }
.tc-role-explainer--owner  { color: var(--tc-coral-ink); }
.tc-role-explainer--admin  { color: var(--tc-teal-deep); }
.tc-role-explainer--viewer { color: var(--tc-lav-ink); }

/* ================================================================ PHONE LINE */

.tc-trunk-head { display: flex; align-items: center; gap: 16px; }
.tc-trunk-mark {
  width: 58px; height: 58px; flex: none;
  border-radius: 16px;
  background: var(--tc-twilio);
  display: flex; align-items: center; justify-content: center;
  font: 800 26px var(--tc-display);
  color: #fff;
}
.tc-trunk-name { display: flex; align-items: center; gap: 9px; }
.tc-trunk-name h2 { font: 800 20px var(--tc-display); margin: 0; }
.tc-credit { font: 800 38px var(--tc-display); line-height: 1.1; color: var(--tc-ink); }
.tc-credit.is-low { color: var(--tc-coral-ink); }
.tc-credit-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.tc-trunk-empty {
  background: var(--tc-card);
  border: 2px dashed #DDCAAB;
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.tc-trunk-empty__string { width: 120px; height: 0; border-top: 3px dashed var(--tc-string); margin: 8px 0; }

.tc-provider-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--tc-border-2);
  border-radius: 16px;
  padding: 15px;
  width: 100%;
  background: var(--tc-card);
  text-align: left;
}
.tc-provider-row--active { border: 2px solid var(--tc-twilio); background: #FFF4F0; cursor: pointer; }
.tc-provider-row--soon   { opacity: .55; }
.tc-provider-row__mark {
  width: 42px; height: 42px; flex: none;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font: 800 20px var(--tc-display);
  color: #fff;
}
.tc-provider-row__mark--twilio { background: var(--tc-twilio); }
.tc-provider-row__mark--soon   { background: var(--tc-border-3); color: var(--tc-ink-6); font-size: 18px; }
.tc-provider-row__name { font: 800 15px var(--tc-display); }

/* ==================================================================== MODALS */

/*
 * align-items:flex-start + margin:auto on the panel centres a short dialog but
 * lets a tall one start at the top and scroll, instead of overflowing off both
 * ends of the screen — which is what centring alone does on a phone.
 */
.tc-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(51, 41, 37, .45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.tc-modal--sheet { align-items: flex-end; padding: 0; overflow: hidden; }
.tc-modal--sheet .tc-modal__panel { margin: 0; }
.tc-modal--listen { z-index: 115; background: rgba(51, 41, 37, .5); }

.tc-modal__panel {
  width: 100%;
  margin: auto;                 /* centres when it fits, scrolls when it doesn't */
  max-width: 480px;
  background: var(--tc-main);
  border-radius: 26px;
  box-shadow: var(--tc-shadow-modal);
  overflow: hidden;
  animation: tc-pop .25s ease;
}
.tc-modal__panel--sm { max-width: 460px; }
/*
 * The scroll lives on the body, not the panel.
 *
 * A scrollbar is painted in its element's padding box, which sits outside the
 * border-radius clip — so `overflow:auto` on the rounded panel drew a square
 * scrollbar straight through the rounded top corner. Clipping the panel and
 * scrolling an inner box keeps the corner clean, and has the bonus that the
 * header no longer moves.
 */
.tc-modal__panel--sheet {
  max-width: 520px;
  max-height: 92dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -20px 60px rgba(51, 41, 37, .35);
}
.tc-modal__panel--sheet > .tc-modal__head { flex: none; }

.tc-modal__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  background: var(--tc-card);
  border-bottom: 1.5px solid var(--tc-border-4);
}
/* No longer sticky: the header is a flex item outside the scrolling body, so
   it stays put on its own. */
.tc-modal__head--sticky { padding: 16px 22px; }
.tc-modal__head--dark { background: var(--tc-dark); color: #fff; gap: 9px; }
.tc-modal__title { font: 800 18px var(--tc-display); flex: 1; }
.tc-modal__close { cursor: pointer; color: var(--tc-ink-4); font: 800 20px var(--tc-display); margin-left: 6px; background: none; border: none; }
.tc-modal__body { padding: 24px 22px; }
.tc-modal__body--sheet {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Keep the layout still whether or not a scrollbar is needed. */
  scrollbar-gutter: stable;
}

.tc-steps { display: flex; gap: 5px; }
.tc-step-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #E2D2BB; transition: background .2s; }
.tc-step-dot.is-done { background: var(--tc-coral); }

.tc-wizard-title { font: 800 20px var(--tc-display); margin-bottom: 4px; }
.tc-wizard-sub   { font: 600 13px var(--tc-body); color: var(--tc-ink-3); margin-bottom: 18px; }
.tc-wizard-actions { display: flex; gap: 10px; }
.tc-wizard-actions .tc-btn--grow { flex: 1; }

.tc-model-card {
  flex: 1;
  min-width: 150px;
  border: 1.5px solid var(--tc-border-2);
  border-radius: 18px;
  padding: 18px;
  cursor: pointer;
  background: var(--tc-card);
  transition: all .15s;
  text-align: center;
}
.tc-model-card.is-picked { border: 2.5px solid var(--tc-coral); background: #FFF4F0; }
.tc-model-card__box {
  width: 46px; height: 30px;
  border-radius: 6px;
  background: #E9EEF2;
  border: 1.5px solid #D3DBE2;
  margin: 0 auto 10px;
  position: relative;
}
.tc-model-card__box i { position: absolute; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--tc-green); }
.tc-model-card__box i:nth-child(1) { left: 5px; }
.tc-model-card__box i:nth-child(2) { left: 14px; }
.tc-model-card__name { font: 800 16px var(--tc-display); }
.tc-model-card__ports { font: 600 12px var(--tc-body); color: var(--tc-ink-3); }

.tc-steps-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.tc-step-item { display: flex; gap: 13px; align-items: flex-start; }
.tc-step-item span {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  font: 800 13px var(--tc-display);
  display: flex; align-items: center; justify-content: center;
}
.tc-step-item:nth-child(1) span { background: var(--tc-coral-bg); color: var(--tc-coral-ink); }
.tc-step-item:nth-child(2) span { background: var(--tc-teal-bg); color: var(--tc-teal-deep); }
.tc-step-item:nth-child(3) span { background: var(--tc-lav-bg); color: var(--tc-lav-ink); }
.tc-step-item p { font: 600 14px var(--tc-body); color: #5C4D40; padding-top: 2px; margin: 0; }

.tc-note {
  font: 600 12px var(--tc-body);
  color: var(--tc-ink-4);
  background: var(--tc-sunken-2);
  border: 1.5px solid #F2E7D5;
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 16px;
}
.tc-note--flush { margin: 0; }

.tc-spinner-step { text-align: center; padding: 18px 0; }
.tc-spinner {
  width: 58px; height: 58px;
  border: 5px solid var(--tc-border);
  border-top-color: var(--tc-coral);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: tc-spin .9s linear infinite;
}
.tc-spinner--twilio { border-top-color: var(--tc-twilio); }
.tc-spinner-step h3 { font: 800 19px var(--tc-display); margin: 0; }
.tc-spinner-step p  { font: 600 13px var(--tc-body); color: var(--tc-ink-3); margin: 6px 0 0; }

.tc-success-tick {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--tc-green-bg);
  color: var(--tc-green-ink);
  font: 800 30px var(--tc-display);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.tc-name-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--tc-border-2);
  border-radius: 14px;
  font: 700 16px var(--tc-display);
  color: var(--tc-ink);
  background: var(--tc-card);
  text-align: center;
  margin-bottom: 16px;
}

/* ---------------------------------------------------------- contact editor */

.tc-editor-head { display: flex; align-items: center; gap: 16px; }
.tc-editor-head__fields { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tc-editor-head__fields input { margin-top: 0; }
.tc-editor-hint { font: 600 11px var(--tc-body); color: var(--tc-ink-4); margin: -6px 0 0; }
.tc-editor-hint--warn { color: var(--tc-red-ink); }

.tc-code-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1.5px solid #F7E2BD;
  border-radius: 14px;
  background: #FFFAF0;
}
.tc-code-row__icon {
  width: 40px; height: 40px; flex: none;
  border-radius: 11px;
  background: var(--tc-sun-bg);
  color: var(--tc-sun-ink);
  font: 800 18px var(--tc-display);
  display: flex; align-items: center; justify-content: center;
}
.tc-code-row__title { font: 800 14px var(--tc-display); }
.tc-code-row__hint  { font: 600 11px var(--tc-body); color: var(--tc-ink-3); }
.tc-code-input {
  width: 74px; flex: none;
  text-align: center;
  padding: 11px 8px;
  border: 1.5px solid var(--tc-border-2);
  border-radius: 12px;
  font: 800 18px var(--tc-display);
  letter-spacing: .12em;
  color: var(--tc-ink);
  background: var(--tc-card);
  margin-top: 0;
}

.tc-win-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.tc-win-card {
  flex: 1;
  min-width: 120px;
  border: 1.5px solid var(--tc-border-2);
  border-radius: 15px;
  padding: 12px 13px;
  cursor: pointer;
  background: var(--tc-card);
  transition: all .15s;
  display: block;
}
.tc-win-card__label { font: 800 14px var(--tc-display); color: var(--tc-ink); }
.tc-win-card__sub   { font: 600 11px var(--tc-body); color: var(--tc-ink-3); }
.tc-win-radio { position: absolute; opacity: 0; width: 0; height: 0; }
/* The custom window's own weekly times, only while Custom hours is picked. */
.tc-win-custom { display: none; margin-top: 12px; }
div:has(> .tc-win-grid #win-custom:checked) > .tc-win-custom { display: block; }
.tc-win-radio:checked + .tc-win-card--teal { border: 2px solid var(--tc-teal-deep); background: var(--tc-teal-bg); }
.tc-win-radio:checked + .tc-win-card--sun  { border: 2px solid var(--tc-sun-ink-2); background: var(--tc-sun-bg); }
.tc-win-radio:checked + .tc-win-card--lav  { border: 2px solid var(--tc-lav-ink); background: var(--tc-lav-bg); }
.tc-win-radio:checked + .tc-win-card--sky  { border: 2px solid var(--tc-sky-ink); background: var(--tc-sky-bg); }

.tc-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1.5px solid var(--tc-border);
  border-radius: 14px;
  background: var(--tc-card);
}
.tc-toggle-row__title { font: 800 14px var(--tc-display); }
.tc-toggle-row__hint  { font: 600 11px var(--tc-body); color: var(--tc-ink-3); }
.tc-toggle-row--lav { border-color: var(--tc-lav-bg); background: #F8F4FD; }
.tc-toggle-row--lav .tc-toggle-row__title { color: var(--tc-lav-ink); }
.tc-toggle-row--lav .tc-toggle-row__hint  { color: #A38FC0; }
.tc-toggle-row--sos { border-color: var(--tc-red-bg); background: #FFF6F4; }
.tc-toggle-row--sos .tc-toggle-row__title { color: var(--tc-red-ink); }
.tc-toggle-row--sos .tc-toggle-row__hint  { color: #D6917F; }
/* "Always put through": reassurance rather than alarm, so teal, not red. */
.tc-toggle-row--always { border-color: var(--tc-teal-bg); background: #F3FBFA; }
.tc-toggle-row--always .tc-toggle-row__title { color: var(--tc-teal-lip); }
.tc-toggle-row--always .tc-toggle-row__hint  { color: #74A9A2; }

/* ------------------------------------------------------------- listen modal */

.tc-listen-parties { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 18px; }
.tc-listen-party { text-align: center; }
.tc-listen-party__label { font: 700 11px var(--tc-body); color: var(--tc-ink-3); margin-top: 6px; }
.tc-listen-phone {
  width: 46px; height: 54px;
  border-radius: 9px 9px 12px 12px;
  background: linear-gradient(var(--tc-coral-light), var(--tc-coral));
  position: relative;
  margin: 0 auto;
}
.tc-listen-phone::before {
  content: "";
  position: absolute;
  top: -3px; left: 2px; right: 2px;
  height: 10px;
  border-radius: 50%;
  background: var(--tc-coral-pale);
}
.tc-listen-string { flex: none; width: 40px; border-top: 3px solid var(--tc-teal); }

.tc-mode-grid { display: flex; gap: 8px; margin-bottom: 12px; }
.tc-mode-card {
  flex: 1;
  min-width: 90px;
  text-align: center;
  cursor: pointer;
  border-radius: 14px;
  padding: 11px 8px;
  transition: all .15s;
  border: 1.5px solid var(--tc-border-3);
  background: var(--tc-card);
  color: var(--tc-ink-7);
  font: 800 13px var(--tc-display);
}
.tc-mode-card.is-active { border: 2px solid var(--tc-teal-deep); background: var(--tc-teal-bg); color: var(--tc-teal-lip); }

.tc-mode-desc {
  font: 600 13px var(--tc-body);
  color: #7A6857;
  background: var(--tc-sunken-2);
  border: 1.5px solid #F2E7D5;
  border-radius: 12px;
  padding: 11px 14px;
  text-align: center;
  margin-bottom: 14px;
}
.tc-listen-note { font: 600 11px var(--tc-body); color: var(--tc-ink-4); text-align: center; margin-bottom: 16px; }
.tc-live-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--tc-coral); flex: none; animation: tc-livepulse 1.1s infinite; }

/* ===================================================================== TOAST */

.tc-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  background: var(--tc-dark);
  color: #fff;
  padding: 13px 22px;
  border-radius: 30px;
  font: 800 14px var(--tc-display);
  box-shadow: 0 14px 30px rgba(51, 41, 37, .35);
  animation: tc-toast .3s ease;
  white-space: nowrap;
}

/* ================================================================ RESPONSIVE */

/* The prototype used a manual Desktop/Tablet/Phone switcher; production drives
   the same two layouts off the viewport, as the handoff recommends. */
@media (max-width: 880px) {
  .tc-sidebar { display: none; }
  .tc-main { border-left: none; }
  .tc-bottomnav { display: flex; }
  .tc-content { padding: 20px 16px 40px; }
  .tc-header { padding: 16px; }
  .tc-header__title { font-size: 22px; }
}

@media (max-width: 520px) {
  .tc-header__actions .tc-btn { padding: 10px 12px; font-size: 13px; }
  .tc-grid--devices, .tc-grid--contacts { grid-template-columns: 1fr; }
  .tc-modal { padding: 0; align-items: flex-end; overflow: hidden; }
  .tc-modal__panel {
    margin: 0;
    border-radius: 26px 26px 0 0;
    max-height: 94dvh;
    /* Clip at the panel, scroll inside — see the sheet rule above. */
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .tc-modal__panel > .tc-modal__head { flex: none; }
  .tc-modal__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  }
}

/* Utility bits used sparingly in the views. */
.tc-row      { display: flex; align-items: center; gap: 10px; }
.tc-row--between { justify-content: space-between; }
.tc-row--tight { gap: 8px; }
.tc-row--wrap  { flex-wrap: wrap; }
.tc-grow     { flex: 1; min-width: 0; }
.tc-nowrap   { white-space: nowrap; }
.tc-none     { flex: none; }
.tc-mt-auto  { margin-top: auto; }
.tc-mt-14    { margin-top: 14px; }
.tc-inline-form { display: inline-flex; }

/* ------------------------------------------------- add-a-guardian form ---- */

.tc-add-guardian { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.tc-add-guardian__title { font: 800 15px var(--tc-display); color: var(--tc-ink); }
.tc-add-guardian__fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.tc-add-guardian__fields .tc-input { margin-top: 5px; }
.tc-add-guardian__fields label.tc-grow { min-width: 180px; }
.tc-add-guardian__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.tc-add-guardian__foot .tc-micro { flex: 1; min-width: 220px; }

/* The invite row is now a block form rather than a single line. */
.tc-invite-row { align-items: stretch; }



/* ------------------------------------------------ SIP credentials --------- */

.tc-creds {
  border: 1.5px solid var(--tc-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--tc-card);
}

.tc-cred {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1.5px solid #F4EADB;
}
.tc-cred:last-child { border-bottom: none; }
.tc-cred__main { flex: 1; min-width: 0; }

.tc-cred__label {
  font: 800 10px var(--tc-body);
  color: var(--tc-ink-3);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 3px;
}
.tc-cred__value {
  font: 700 15px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--tc-ink);
  overflow-wrap: anywhere;
}
.tc-cred__value--empty {
  font-family: var(--tc-body);
  font-weight: 600;
  font-style: italic;
  color: var(--tc-ink-4);
}
.tc-cred__note { font: 600 11px/1.45 var(--tc-body); color: var(--tc-ink-4); margin-top: 4px; }

.tc-copy {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--tc-border-3);
  background: var(--tc-sunken-2);
  color: #7A6857;
  font-size: 15px;
  cursor: pointer;
  transition: all .15s;
}
.tc-copy:hover { border-color: var(--tc-teal-deep); background: var(--tc-teal-bg); color: var(--tc-teal-deep); }
.tc-copy.is-copied { border-color: var(--tc-green-ink); background: var(--tc-green-bg); color: var(--tc-green-ink); }

.tc-cred__advanced { border-top: 1.5px solid #F4EADB; }
.tc-cred__advanced > summary {
  padding: 12px 14px;
  font: 800 13px var(--tc-display);
  color: var(--tc-teal-deep);
  cursor: pointer;
  background: var(--tc-sunken-3);
  list-style: none;
}
.tc-cred__advanced > summary::-webkit-details-marker { display: none; }
.tc-cred__advanced > summary::before { content: "▸ "; }
.tc-cred__advanced[open] > summary::before { content: "▾ "; }
.tc-cred__advanced[open] > summary { border-bottom: 1.5px solid #F4EADB; }

/* ------------------------------------------------ dialable numbers -------- */

.tc-dial {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border: 1.5px solid var(--tc-border);
  border-radius: 14px;
  background: var(--tc-sunken-2);
}
.tc-dial + .tc-dial { margin-top: 8px; }
.tc-dial__num {
  flex: none;
  min-width: 52px;
  text-align: center;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--tc-teal-bg);
  color: var(--tc-teal-lip);
  font: 800 18px var(--tc-display);
  letter-spacing: .04em;
}
.tc-dial--self .tc-dial__num { background: var(--tc-coral-bg); color: var(--tc-coral-ink); }
.tc-dial__label { display: block; font: 800 14px var(--tc-display); color: var(--tc-ink); }
.tc-dial__sub { display: block; font: 600 12px/1.4 var(--tc-body); color: var(--tc-ink-3); }

/* Status pill stacked over the test-call button on the device header card. */
.tc-device-head__side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.tc-device-head__side .tc-btn { white-space: nowrap; }

/* A call with nothing recorded against it — say so plainly rather than blank. */
.tc-transcript--empty {
  font-style: italic;
  color: var(--tc-ink-4);
  background: var(--tc-sunken);
}



/* Recording playback in the call log — the voicemail pattern, client-driven.
   The bars exist only while sound is actually coming out, exactly like the
   mockup; pausing or finishing removes them. Clicking the bars seeks. */
.tc-eqstrip { display: none; cursor: pointer; }
.tc-eqstrip.is-open { display: block; }

/* A transcript still being worked on — gently animated so it reads as busy
   rather than broken. */
.tc-transcribing { position: relative; }
.tc-transcribing::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--tc-teal-deep);
  animation: tc-livepulse 1.1s infinite;
  vertical-align: middle;
}

/* ------------------------------------------------ call-log filters -------- */

.tc-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--tc-card);
  border: 1.5px solid var(--tc-border);
  border-radius: 18px;
  padding: 10px 12px;
  box-shadow: var(--tc-shadow-card);
}

.tc-filters__search {
  flex: 1;
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--tc-sunken-2);
  border: 1.5px solid var(--tc-border-2);
  border-radius: 12px;
  padding: 0 12px;
}
.tc-filters__icon { color: var(--tc-ink-4); font-size: 15px; flex: none; }
.tc-filters__search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 10px 0;
  font: 600 14px var(--tc-body);
  color: var(--tc-ink);
}
.tc-filters__search input::placeholder { color: var(--tc-ink-4); }

.tc-filters__select {
  flex: none;
  border: 1.5px solid var(--tc-border-2);
  background: var(--tc-sunken-2);
  border-radius: 12px;
  padding: 10px 12px;
  font: 700 13px var(--tc-body);
  color: var(--tc-ink-2);
  cursor: pointer;
}

/* Matched words inside a transcript or name. */
.tc-mark {
  background: var(--tc-sun-bg);
  color: var(--tc-sun-ink);
  border-radius: 4px;
  padding: 0 2px;
  font-weight: 800;
}

.tc-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 2px 8px;
}
.tc-pager { justify-content: center; }
.tc-pager__count {
  font: 700 12px var(--tc-body);
  color: var(--tc-ink-4);
  /* Pushed to its own line so the numbers stay centred as a group. */
  flex-basis: 100%;
  text-align: center;
  margin-top: 2px;
}

/*
 * Page numbers, built like the rest of the buttons here: a round face sitting
 * on a hard "lip" that shortens when pressed, so the whole thing depresses
 * under your finger. Same trick as .tc-btn--coral, just circular.
 */
.tc-pager__page {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 800 14px var(--tc-display);
  text-decoration: none;
  cursor: pointer;
  background: var(--tc-card);
  color: #7A6857;
  box-shadow: 0 3px 0 var(--tc-border-3);
  transition: background .15s, box-shadow .1s, transform .1s, color .15s;
}
.tc-pager__page:hover {
  background: var(--tc-teal-bg);
  color: var(--tc-teal-deep);
  box-shadow: 0 3px 0 #BFE3DC;
}
.tc-pager__page:active {
  box-shadow: 0 1px 0 var(--tc-border-3);
  transform: translateY(2px);
}

/* The page you are on is pressed in rather than standing proud. */
.tc-pager__page.is-current {
  background: var(--tc-teal-deep);
  color: #fff;
  box-shadow: 0 3px 0 var(--tc-teal-lip);
  cursor: default;
}
.tc-pager__page.is-current:active { transform: none; box-shadow: 0 3px 0 var(--tc-teal-lip); }

/* ‹ › are a shade quieter than the numbers: they are the same action as
   tapping the next number along, not a separate one. */
.tc-pager__page--step { font-size: 18px; line-height: 1; }
.tc-pager__page.is-disabled {
  opacity: .4;
  pointer-events: none;
  box-shadow: 0 3px 0 var(--tc-border-3);
}

.tc-pager__gap {
  font: 800 13px var(--tc-display);
  color: var(--tc-ink-4);
  padding: 0 2px;
  align-self: center;
}

@media (max-width: 420px) {
  .tc-pager__page { width: 34px; height: 34px; font-size: 13px; }
  .tc-pager { gap: 7px; }
}

@media (max-width: 520px) {
  .tc-filters__select { flex: 1; }
}

/* ------------------------------------------------ provisioning QR --------- */

.tc-qr {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--tc-sunken-2);
  border: 1.5px solid var(--tc-border);
  border-radius: 18px;
}

.tc-qr__code {
  flex: none;
  width: 168px; height: 168px;
  padding: 10px;
  background: #fff;
  border: 1.5px solid var(--tc-border-2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.tc-qr__code svg { width: 100%; height: 100%; display: block; }
.tc-qr__fallback { font: 700 12px var(--tc-body); color: var(--tc-ink-4); text-align: center; }

.tc-qr__body { flex: 1; min-width: 200px; }
.tc-qr__title { font: 800 16px var(--tc-display); margin-bottom: 8px; }
.tc-qr__steps {
  margin: 0 0 10px;
  padding-left: 18px;
  font: 600 13px/1.7 var(--tc-body);
  color: #5C4D40;
}
.tc-qr__note { font: 600 11px/1.5 var(--tc-body); color: var(--tc-ink-4); margin: 0 0 10px; }

.tc-qr__manual > summary,
.tc-manual-setup > summary {
  cursor: pointer;
  font: 800 13px var(--tc-display);
  color: var(--tc-teal-deep);
  list-style: none;
  padding: 6px 0;
}
.tc-qr__manual > summary::-webkit-details-marker,
.tc-manual-setup > summary::-webkit-details-marker { display: none; }
.tc-qr__manual > summary::before,
.tc-manual-setup > summary::before { content: "▸ "; }
.tc-qr__manual[open] > summary::before,
.tc-manual-setup[open] > summary::before { content: "▾ "; }
.tc-manual-setup { margin-top: 14px; }

@media (max-width: 520px) {
  .tc-qr { gap: 14px; justify-content: center; }
  .tc-qr__code { width: 150px; height: 150px; }
}

/* ------------------------------------------------ profile photos --------- */

.tc-avatar--photo { overflow: hidden; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08); }
.tc-avatar--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The SOS badge sits above the picture, not under it. */
.tc-avatar--photo .tc-avatar__sos { z-index: 1; overflow: visible; }

/* Tap-the-picture photo picker.
   inline-flex, not inline-block: the tin can is a <span>, and an inline box
   ignores width and height — the picker then collapsed to nothing and the file
   input covering it had no area left to click. */
.tc-photo-pick { position: relative; display: inline-flex; cursor: pointer; flex: none; }
.tc-photo-pick input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tc-photo-pick__hint {
  position: absolute;
  right: -6px; bottom: -6px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--tc-card);
  border: 2px solid var(--tc-border-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(74, 59, 51, .22);
  pointer-events: none;
  transition: border-color .15s, transform .15s;
}
.tc-photo-pick:hover .tc-photo-pick__hint,
.tc-photo-pick:has(input:focus-visible) .tc-photo-pick__hint {
  border-color: var(--tc-teal-deep);
  transform: scale(1.08);
}
.tc-photo-pick:hover > :first-child { filter: brightness(.94); }
/* Keyboard focus only — :focus-within would leave the ring stuck on after a
   mouse click, since the file input keeps focus once the dialog closes. */
.tc-photo-pick:has(input:focus-visible) {
  outline: 2px solid var(--tc-teal-deep);
  outline-offset: 3px;
  border-radius: 12px;
}

/* A phone's picture stands in for the tin can when one is set. */
.tc-device-photo {
  width: 58px; height: 66px;
  flex: none;
  border-radius: 10px 10px 13px 13px;
  object-fit: cover;
  display: block;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .07);
}
.tc-device-photo--card { width: 54px; height: 62px; }
.tc-photo-pick--device .tc-photo-pick__hint { right: -4px; bottom: -4px; }

/* ============================================================== JOKE LINE */

.tc-nav-icon--joke { background: #FFEFD6; position: relative; }
.tc-nav-icon--joke i.eye {
  width: 3px; height: 3px; border-radius: 50%;
  background: #E0991F; display: block; margin: -4px 1.5px 0;
}
.tc-nav-icon--joke i.grin {
  position: absolute; bottom: 5px; left: 50%; margin-left: -6px;
  width: 12px; height: 6px; display: block;
  border: 2px solid #E0991F; border-top: 0;
  border-radius: 0 0 12px 12px;
}

/* Add-a-joke row: description, file picker, button. */
.tc-joke-add {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 20px;
}
.tc-joke-add__body { flex: 1 1 240px; min-width: 0; }
.tc-joke-add__title { font: 800 15px var(--tc-display); margin-bottom: 2px; }

/* The file input covers its label, so the whole pill is the target — the same
   arrangement as the photo picker, and for the same reason. Used by both audio
   uploads: the joke line and the message a refused caller hears. */
.tc-audio-file { position: relative; overflow: hidden; cursor: pointer; flex: none; max-width: 100%; }
.tc-audio-file input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%;
}
.tc-audio-file span {
  display: block; max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* A joke that has been taken off the line is dimmed, not hidden — it is still
   yours, it just isn't in the rotation. */
.tc-card--flat.is-off { opacity: .58; }

.tc-switch--sm { width: 38px; height: 22px; flex: none; }
.tc-switch--sm::after { width: 16px; height: 16px; top: 3px; left: 3px; }
.tc-switch--sm.is-on::after { left: 19px; }

.tc-joke-edit { margin-top: 10px; }
.tc-joke-edit .tc-input {
  width: 100%;
  padding: 9px 13px;
  border-radius: 11px;
  font: 600 13.5px var(--tc-body);
}

/* ============================================================== RETENTION */

/* How long recordings are kept — sits under the call log's info banner. */
.tc-retention {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 4px;
  margin: -4px 0 2px;
  font: 600 13px var(--tc-body);
  color: var(--tc-ink-2);
}
.tc-retention__label { font-weight: 700; }
.tc-retention__note {
  flex: 1 1 220px;
  min-width: 0;
  font: 600 12.5px var(--tc-body);
  color: var(--tc-ink-3);
}
.tc-retention .tc-filters__select { padding: 6px 10px; font-size: 13px; }

/* A message whose audio has been deleted keeps its place in the list, but the
   play control is visibly inert rather than missing. */
.tc-vm-play.is-gone {
  opacity: .3;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================================== ASKS & GROUPS */

/* The clip on a card for a number nobody recognises: the child's own voice
   asking who they meant, or the message an unknown caller left in the mailbox. */
.tc-request__clip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0 2px;
  font: 600 12.5px var(--tc-body);
  color: var(--tc-ink-3);
}
.tc-vm-play--sm { width: 30px; height: 30px; font-size: 11px; flex: none; }

/* Group calls: the switch that turns a contact into several people. */
.tc-group-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--tc-teal-bg);
  cursor: pointer;
}
.tc-group-toggle__title { display: block; font: 800 13.5px var(--tc-display); }
.tc-group-toggle__hint {
  display: block;
  font: 600 12px var(--tc-body);
  color: var(--tc-ink-3);
  margin-top: 1px;
}

.tc-members {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--tc-card);
  border: 1.5px solid var(--tc-border-3);
}
.tc-members__title { font: 800 13.5px var(--tc-display); margin-bottom: 2px; }
.tc-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  cursor: pointer;
  border-radius: 10px;
}
.tc-member:hover { background: var(--tc-teal-bg); }
.tc-member input { width: 17px; height: 17px; flex: none; accent-color: var(--tc-teal-deep); }
.tc-member__name { display: block; font: 700 13px var(--tc-body); }
.tc-member__num { display: block; font: 600 11.5px var(--tc-body); color: var(--tc-ink-3); }

/* A group in the contact list reads as several people, not one. */
.tc-group-badge {
  font: 800 10.5px var(--tc-body);
  color: var(--tc-teal-deep);
  background: var(--tc-teal-bg);
  border-radius: 20px;
  padding: 2px 8px;
}
.tc-quiet-card__value a { color: inherit; text-decoration: none; border-bottom: 1.5px dashed currentColor; }

/* A group call: who it reached. */
.tc-call-row__who { font: 700 12px var(--tc-body); color: var(--tc-teal-deep); margin-top: 3px; }
.tc-recent-row__who { color: var(--tc-teal-deep); font-weight: 700; }

/* Announcements: the dashboard's buttons, and the screen that sets them up. */
.tc-announce-bar__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.tc-announce-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 14px; border-radius: 16px; cursor: pointer;
  background: var(--tc-sun-bg); border: 1.5px solid var(--tc-border);
  font: 800 15px var(--tc-display); color: var(--tc-ink);
  box-shadow: 0 3px 0 rgba(74, 59, 51, .08);
}
.tc-announce-btn:hover:not(:disabled) { transform: translateY(-1px); background: #FFE7A8; }
.tc-announce-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.tc-announce-btn:disabled { opacity: .5; cursor: not-allowed; }
.tc-announce-btn__emoji { font-size: 22px; line-height: 1; }

.tc-announce { max-width: 760px; }
.tc-announce__card > summary { list-style: none; cursor: pointer; }
.tc-announce__card > summary::-webkit-details-marker { display: none; }
.tc-announce__head { display: flex; align-items: center; gap: 14px; }
.tc-announce__emoji { font-size: 28px; line-height: 1; }
.tc-announce__sum { display: block; margin-top: 3px; }
.tc-announce__card[open] .tc-announce__toggle { visibility: hidden; }
.tc-announce__form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.tc-announce__emoji-field { width: 80px; }
.tc-announce__set { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tc-announce__set legend { margin-bottom: 6px; }
.tc-announce__choice { display: flex; gap: 10px; align-items: flex-start; font: 600 13px/1.45 var(--tc-body); color: var(--tc-ink-2); }
.tc-announce__choice input { margin-top: 3px; }
.tc-announce__phones { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-left: 26px; font: 700 13px var(--tc-body); }
.tc-announce__phone { display: flex; gap: 6px; align-items: center; }
.tc-announce__url { word-break: break-all; }
.tc-announce__code { font: 600 12px/1.5 ui-monospace, monospace; background: var(--tc-sunken-2); border-radius: 12px; padding: 12px; overflow-x: auto; white-space: pre; margin: 10px 0 0; }
.tc-announce__foot { margin-top: 18px; }
.tc-link--danger { color: var(--tc-coral-ink); }
.tc-announce__form > .tc-btn { align-self: flex-start; }

/* Icon picker: a button showing the icon, and a panel of emoji and icons. */
.tc-iconpick { position: relative; margin-top: 4px; }
.tc-iconpick__current {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px;
  border-radius: 12px; border: 1.5px solid var(--tc-border); background: var(--tc-card); cursor: pointer;
  font-size: 22px; color: var(--tc-ink);
}
.tc-iconpick__caret { font-size: 11px; color: var(--tc-ink-4); }
.tc-iconpick__panel {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
  width: min(520px, calc(100vw - 48px)); padding: 12px;
  background: var(--tc-card); border: 1.5px solid var(--tc-border); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(74, 59, 51, .18);
}
.tc-iconpick__bar { display: flex; gap: 8px; flex-wrap: wrap; }
.tc-iconpick__search { flex: 1 1 220px; }
.tc-iconpick__cat { flex: 0 1 190px; }
.tc-iconpick__emoji { display: flex; flex-wrap: wrap; gap: 2px; margin: 10px 0; padding-bottom: 10px; border-bottom: 1.5px dashed var(--tc-border-3); }
.tc-iconpick__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 4px;
  max-height: 260px; overflow-y: auto;
}
.tc-iconpick__opt {
  display: flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border: none; border-radius: 10px; background: transparent; cursor: pointer;
  font-size: 20px; color: var(--tc-ink-2);
}
.tc-iconpick__opt:hover { background: var(--tc-sunken-2); color: var(--tc-teal-deep); }
.tc-iconpick__opt.is-on { background: var(--tc-teal); color: #fff; }
.tc-iconpick__foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.tc-announce-btn__emoji i { color: var(--tc-coral-ink); }
.tc-announce__emoji i { color: var(--tc-coral-ink); }
.tc-announce__note { margin: -4px 0 2px 26px; }

/* Installed as an app: keep the bottom tabs clear of the iPhone home bar. */
.tc-bottomnav { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }

/* Face ID sign-in: the passkeys card, and the sign-in page's button. */
.tc-passkeys .tc-card__title i { color: var(--tc-teal-deep); margin-right: 4px; }
.tc-passkey-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1.5px dashed var(--tc-border-3); }
.tc-passkey-row:first-child { border-top: none; }
.tc-passkey-row__icon { font-size: 20px; color: var(--tc-ink-4); width: 24px; text-align: center; }
.tc-passkey-row__name { font: 800 14px var(--tc-display); color: var(--tc-ink); }
.tc-passkey-row__meta { font: 600 12px var(--tc-body); color: var(--tc-ink-3); }
.tc-passkey-login { width: 100%; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.tc-passkey-login[hidden] { display: none; }

/* Call log: filters and calls in the main column; the numbers the kids tried,
   the privacy note and retention beside them on a wide screen, stacked above
   the calls on a narrow one. */
.tc-calllog {
  display: grid; gap: 12px; max-width: 760px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "filters" "side" "list";
}
.tc-calllog__filters { grid-area: filters; }
.tc-calllog__side    { grid-area: side; }
.tc-calllog__list    { grid-area: list; }
.tc-call-row__note { font: 600 12px var(--tc-body); color: var(--tc-ink-4); margin-top: 3px; }
@media (min-width: 1180px) {
  .tc-calllog {
    max-width: 1180px; column-gap: 20px; align-items: start;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas: "filters side" "list side";
  }
  /* Sticky within .tc-content, which already starts below the header and has
     its own padding — so no offset of its own. */
  .tc-calllog__side {
    position: sticky; top: 0;
    max-height: calc(100vh - 140px); overflow-y: auto;
  }
  /* Taller than the screen, the column scrolls; its cards keep their height
     rather than being squeezed — squeezed, their text spilled over each other. */
  .tc-calllog__side > * { flex-shrink: 0; }
  .tc-calllog__side .tc-tried__list { grid-template-columns: minmax(0, 1fr); }
  /* The title gets the width; the count and badge drop below it. */
  .tc-calllog__side .tc-tried__head { flex-wrap: wrap; row-gap: 8px; }
  .tc-calllog__side .tc-tried__head > .tc-grow { flex-basis: 100%; }
  .tc-calllog__side .tc-retention { flex-direction: column; align-items: flex-start; }
  .tc-calllog__side .tc-retention > * { flex: none; }
}

/* Adult mode: impossible to miss on the phone's page, the phones list and the
   dashboard — a child's phone must never sit in it unnoticed. */
.tc-adult-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--tc-red); color: #fff;
  font: 800 12px var(--tc-display); letter-spacing: .02em; white-space: nowrap;
}
.tc-adult-badge--sm { padding: 2px 8px; font-size: 10.5px; gap: 4px; }
.tc-device-head.is-adult { border-color: var(--tc-red); box-shadow: 0 0 0 3px var(--tc-red-bg), var(--tc-shadow-card2); }
.tc-adult-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: 20px;
  background: var(--tc-red); color: #fff;
  box-shadow: 0 10px 26px rgba(220, 70, 60, .25);
}
.tc-adult-banner__icon { font-size: 26px; }
.tc-adult-banner__title { font: 800 16px var(--tc-display); }
.tc-adult-banner__text { font: 600 13px/1.5 var(--tc-body); opacity: .95; margin-top: 3px; }
.tc-adult-banner .tc-btn--white { background: #fff; color: var(--tc-red); box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.tc-adult-off { border-style: dashed; }
.tc-adult-card { border-color: var(--tc-red-border); }
.tc-adult-card .tc-card__title i { color: var(--tc-red); margin-right: 4px; }

/* Confirmation dialog. */
.tc-dialog {
  border: none; padding: 0; border-radius: 22px; max-width: min(460px, calc(100vw - 32px));
  box-shadow: 0 24px 60px rgba(74, 59, 51, .3); background: var(--tc-card); color: var(--tc-ink);
}
.tc-dialog::backdrop { background: rgba(60, 45, 35, .45); backdrop-filter: blur(2px); }
.tc-dialog__body { padding: 24px; }
.tc-dialog__icon {
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--tc-red-bg); color: var(--tc-red); font-size: 22px; margin-bottom: 12px;
}
.tc-dialog__title { font: 800 19px var(--tc-display); margin: 0 0 10px; }
.tc-dialog__lead { font: 600 13.5px/1.5 var(--tc-body); color: var(--tc-ink-2); margin: 0 0 10px; }
.tc-dialog__list { margin: 0 0 12px; padding-left: 20px; font: 600 13.5px/1.6 var(--tc-body); color: var(--tc-ink-2); }
.tc-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* A main column with a sidebar beside it on a wide screen, above it on a
   narrow one — the jokes screen. Same shape as the call log's. */
.tc-split {
  display: grid; gap: 12px; max-width: 760px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "side" "main";
}
.tc-split__side { grid-area: side; }
.tc-split__main { grid-area: main; }
@media (min-width: 1180px) {
  .tc-split {
    max-width: 1180px; column-gap: 20px; align-items: start;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas: "main side";
  }
  /* Scrolls with the page: a column with a scrollbar of its own felt clunky. */
  .tc-split__side > * { flex-shrink: 0; }
  .tc-split__side .tc-retention { flex-direction: column; align-items: flex-start; }
  .tc-split__side .tc-retention > * { flex: none; }
  .tc-split__side .tc-joke-add { flex-direction: column; align-items: stretch; }
  .tc-split__side .tc-joke-add > * { flex: none; }
}

/* A joke's words: the title, and for a grown-up, the edit box too. */
.tc-joke-title-form { margin: 0; }
.tc-joke-title {
  display: block; width: 100%; box-sizing: border-box;
  resize: none; overflow: hidden; field-sizing: content; min-height: 0;
  font: 800 15px/1.35 var(--tc-display); color: var(--tc-ink);
  background: transparent; border: 1.5px solid transparent; border-radius: 9px;
  padding: 3px 8px; margin-left: -9px;
}
.tc-joke-title::placeholder { color: var(--tc-ink-4); font-weight: 700; }
.tc-joke-title:hover { border-color: var(--tc-border-3); border-style: dashed; }
.tc-joke-title:focus { outline: none; background: var(--tc-card); border-color: var(--tc-teal); border-style: solid; }

/* Two equal columns on a wide screen (the phone line), one on a narrow one. */
.tc-twocol { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 680px; align-items: start; }
@media (min-width: 1180px) {
  .tc-twocol { max-width: 1240px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Voicemail: messages two a row on a wide screen. */
.tc-vm-page { max-width: 720px; }
.tc-vm-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1180px) {
  .tc-vm-page { max-width: 1240px; }
  .tc-vm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tc-photo-note--pending { color: var(--tc-teal-deep); font-weight: 800; }

/* A split whose main column comes first on a phone too (Family & guardians). */
.tc-split--main-first { grid-template-areas: "main" "side"; }
@media (min-width: 1180px) {
  .tc-split--main-first { grid-template-areas: "main side"; }
  .tc-split__side .tc-grid--roles { grid-template-columns: minmax(0, 1fr); }
}

/* Phones: the line at a glance, then roomier cards of equal height. */
.tc-phones { max-width: 1240px; }
.tc-phones .tc-grid--devices { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: stretch; }
.tc-phones .tc-add-tile { min-height: 200px; }

/* Home Assistant screen. */
.tc-ha-status { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tc-ha-status__icon { font-size: 26px; width: 30px; text-align: center; }
.tc-ha-status__title { font: 800 16px var(--tc-display); color: var(--tc-ink); margin-bottom: 2px; }
.tc-ha-status--ok  { border-color: var(--tc-teal); }
.tc-ha-status--ok .tc-ha-status__icon  { color: var(--tc-teal-deep); }
.tc-ha-status--bad { border-color: var(--tc-red-border); }
.tc-ha-status--bad .tc-ha-status__icon { color: var(--tc-red); }
.tc-ha-status--off .tc-ha-status__icon { color: var(--tc-ink-4); }
.tc-ha-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tc-ha-grid__wide { grid-column: 1 / -1; }
.tc-ha-grid .tc-input { margin-top: 5px; width: 100%; box-sizing: border-box; }
.tc-ha-toggle { display: flex; gap: 10px; align-items: center; font: 600 13.5px var(--tc-body); color: var(--tc-ink-2); }
.tc-ha-list { margin: 0 0 12px; padding-left: 18px; font: 600 13px/1.55 var(--tc-body); color: var(--tc-ink-2); }
.tc-ha-list li + li { margin-top: 6px; }
@media (max-width: 560px) { .tc-ha-grid { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ hello
   The self-service page a grandparent opens from a link: their photo and
   their name, spoken. Built on the sign-in page's card. */
.tc-form-error[hidden] { display: none; }
.tc-avatar--96 { --tc-avatar-size: 96px; font-size: 38px; }
.tc-hello { max-width: 440px; }
.tc-hello__title { font: 800 26px var(--tc-display); margin: 0; line-height: 1.15; }
.tc-hello__lead { font: 600 15px/1.5 var(--tc-body); color: var(--tc-ink-6); margin: 0; }
.tc-hello__part {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding-top: 14px; border-top: 1.5px dashed var(--tc-border);
}
.tc-hello__step { display: flex; align-items: center; gap: 9px; font: 800 17px var(--tc-display); margin: 0; }
.tc-hello__step span {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--tc-teal-bg); color: var(--tc-teal-deep); font-size: 14px;
}
.tc-hello__photo { align-self: center; }
.tc-hello__hint { font: 600 13.5px/1.5 var(--tc-body); color: var(--tc-ink-6); margin: 0; }
.tc-hello__photo + .tc-hello__hint { align-self: center; text-align: center; }
.tc-hello__recorder, .tc-hello__rec, .tc-hello__upload { width: 100%; }
.tc-hello__recorder { display: flex; flex-direction: column; gap: 10px; }
.tc-hello__rec.is-recording { background: var(--tc-red); animation: tc-pulse 1s ease-in-out infinite; }
.tc-hello__now, .tc-hello__take {
  display: flex; flex-direction: column; gap: 6px; width: 100%;
  font: 700 12.5px var(--tc-body); color: var(--tc-ink-6);
}
.tc-hello__now audio, .tc-hello__take audio { width: 100%; }
.tc-hello__take[hidden], .tc-hello__rec[hidden] { display: none; }
.tc-hello__upload { justify-content: center; gap: 8px; }
.tc-hello__done {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--tc-teal-bg); color: var(--tc-teal-deep);
  border-radius: 14px; padding: 11px 14px; font: 700 14px/1.4 var(--tc-body);
}
@keyframes tc-pulse { 50% { opacity: .78; } }
.tc-hello__photo-actions { display: flex; gap: 8px; width: 100%; }
.tc-hello__photo-actions > * { flex: 1; justify-content: center; }
.tc-hello__camera { position: relative; gap: 8px; }
.tc-hello__camera input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.tc-hello__webcam { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.tc-hello__webcam[hidden] { display: none; }
.tc-hello__webcam video {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 20px;
  background: var(--tc-ink); transform: scaleX(-1);
}
.tc-hello__photo-actions .tc-btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }

/* ------------------------------------------------------------ router ports */
.tc-port-row {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  padding: 12px 14px; border: 1.5px solid var(--tc-border); border-radius: 16px; background: var(--tc-card);
}
.tc-port-row input { margin-top: 3px; flex: none; accent-color: var(--tc-teal-deep); }
.tc-port-row__title { display: block; font: 800 14px var(--tc-display); }
.tc-port-row__why { display: block; font: 600 12.5px/1.45 var(--tc-body); color: var(--tc-ink-6); }
.tc-port-row__bad { display: block; font: 700 12.5px/1.45 var(--tc-body); color: var(--tc-red-ink); margin-top: 4px; }
.tc-port-row__ports { flex: none; font: 600 12.5px var(--tc-body); color: var(--tc-ink-6); white-space: nowrap; text-align: right; }
.tc-port-row__ports b { color: var(--tc-ink); }
.tc-port-ok { color: var(--tc-teal-deep); margin-left: 4px; }
.tc-port-bad { color: var(--tc-red); margin-left: 4px; }
.tc-ports-status {
  margin-top: 12px; border-radius: 14px; padding: 11px 14px; font: 700 13.5px/1.45 var(--tc-body);
  background: var(--tc-teal-bg); color: var(--tc-teal-deep);
}
.tc-ports-status--bad { background: var(--tc-red-bg); color: var(--tc-red-ink); }
@media (max-width: 520px) {
  .tc-port-row { flex-wrap: wrap; }
  .tc-port-row__ports { width: 100%; text-align: left; padding-left: 26px; }
}

/* ------------------------------------------------------- getting started */
.tc-start { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.tc-start__intro { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.tc-start__title { font: 800 22px var(--tc-display); margin: 0 0 4px; }
.tc-start__actions { display: flex; gap: 8px; }
.tc-start__bar { height: 8px; border-radius: 99px; background: var(--tc-border); overflow: hidden; margin: 12px 0 6px; }
.tc-start__bar span { display: block; height: 100%; background: var(--tc-teal-deep); border-radius: 99px; transition: width .4s; }
.tc-start__bar--sm { height: 5px; margin: 6px 0 0; max-width: 260px; }
.tc-start__step { display: flex; gap: 16px; align-items: flex-start; }
.tc-start__step .tc-grow { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tc-start__step .tc-card__hint { margin: 0; }
.tc-start__step-title { font: 800 17px var(--tc-display); margin: 0; }
.tc-start__mark {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font: 800 15px var(--tc-display); background: var(--tc-bg); color: var(--tc-ink-6); border: 2px solid var(--tc-border);
}
.tc-start__step.is-next { border-color: var(--tc-teal-deep); box-shadow: 0 0 0 3px var(--tc-teal-bg); }
.tc-start__step.is-next .tc-start__mark { background: var(--tc-teal-deep); border-color: var(--tc-teal-deep); color: #fff; }
.tc-start__step.is-done .tc-start__mark { background: var(--tc-teal-bg); border-color: var(--tc-teal-deep); color: var(--tc-teal-deep); }
.tc-start__step.is-done, .tc-start__step.is-skipped { opacity: .85; }
.tc-start__status { font: 700 13.5px var(--tc-body); color: var(--tc-teal-deep); display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.tc-start__status--wait { color: var(--tc-ink-6); }
.tc-start__more { margin: 4px 0 0; line-height: 1.6; }
.tc-start-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--tc-teal-bg); border: 1.5px solid var(--tc-teal-deep); border-radius: 16px;
  padding: 12px 16px; font: 600 14px var(--tc-body); color: var(--tc-ink);
}
.tc-start-banner > .fa-solid { color: var(--tc-teal-deep); font-size: 18px; }
.tc-menu__badge {
  margin-left: auto; font: 800 11px var(--tc-body); color: var(--tc-teal-deep);
  background: var(--tc-teal-bg); border-radius: 99px; padding: 2px 7px;
}
.tc-start__list { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font: 600 13px/1.5 var(--tc-body); color: var(--tc-ink-6); }
.tc-start__list b { color: var(--tc-ink); }

/* GHP621 hotkeys: the phone's black face, keys 1–3 above 4–6, with the
   pickers beneath in the same places. */
.tc-gsface {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 14px;
  background: #0B0B0C; border-radius: 16px; padding: 20px 16px 22px;
  box-shadow: inset 0 0 0 2px #26262A;
}
.tc-gsface__key { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.tc-gsface__label {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 14px var(--tc-body); color: #F4F4F5; min-height: 1.3em;
}
.tc-gsface__key.is-empty .tc-gsface__label { color: #5A5A60; }
.tc-gsface__button {
  width: min(80px, 100%); height: 32px; border-radius: 6px; background: #4A4A52;
  transition: background .15s, box-shadow .15s;
}
.tc-gsface__key.is-active .tc-gsface__button { background: var(--tc-teal); box-shadow: 0 0 0 3px rgba(91, 199, 184, .35); }
.tc-gskeys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
.tc-gskeys .tc-input { min-width: 0; width: 100%; }
@media (max-width: 420px) {
  .tc-gsface { gap: 18px 8px; padding: 16px 10px 18px; }
  .tc-gsface__label { font-size: 12px; }
  .tc-gskeys { gap: 10px 8px; }
  .tc-gskeys .tc-input { font-size: 13px; padding-left: 8px; padding-right: 8px; }
}

/* A phone's page in tabs — Rules, Keys & faceplate, Setup. Links, so each has
   its own address; a strip that scrolls sideways on a narrow screen. */
.tc-tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 2px solid var(--tc-border-3); margin: 4px 0 2px;
}
.tc-tabs::-webkit-scrollbar { display: none; }
.tc-tabs__tab {
  flex: none; padding: 10px 16px; margin-bottom: -2px; border-bottom: 3px solid transparent;
  font: 800 15px var(--tc-display); color: var(--tc-ink-3); text-decoration: none; white-space: nowrap;
}
.tc-tabs__tab:hover { color: var(--tc-ink); }
.tc-tabs__tab.is-active { color: var(--tc-ink); border-bottom-color: var(--tc-coral); }
.tc-device__grid--keys { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .tc-device__grid--keys { grid-template-columns: 1fr; } }

/* A white desk phone (GHP610, GHP620): its face in its own colour. */
.tc-gsface--white { background: #F4F4F2; box-shadow: inset 0 0 0 2px #DDDDD8; }
.tc-gsface--white .tc-gsface__label { color: #2B2B2E; }
.tc-gsface--white .tc-gsface__key.is-empty .tc-gsface__label { color: #B5B5B0; }
.tc-gsface--white .tc-gsface__button { background: #D6D6D1; }

/* Adding a phone: the kind, then the model, each drawn as it looks. */
.tc-wizard-pick { border-color: var(--tc-teal-deep); background: var(--tc-teal-bg); }
.tc-wizard-pick .tc-provider-row__mark { background: var(--tc-teal-deep); }
.tc-wizard-pick__go { color: var(--tc-teal-deep); font: 800 18px var(--tc-display); }
.tc-wizard-group { font: 800 14px var(--tc-display); color: var(--tc-ink); margin: 16px 0 8px; }
.tc-wizard-group:first-of-type { margin-top: 4px; }
.tc-wizard-models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tc-wizard-models form { display: flex; }
.tc-wizard-model {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px;
  border: 2px solid var(--tc-border-3); border-radius: 16px; background: #fff; cursor: pointer; font: inherit;
}
.tc-wizard-model:hover, .tc-wizard-model:focus-visible { border-color: var(--tc-teal-deep); background: var(--tc-teal-bg); }
.tc-wizard-model__name { font: 800 17px var(--tc-display); color: var(--tc-ink); }
.tc-wizard-model__sub { font: 700 12px var(--tc-body); color: var(--tc-ink-3); text-align: center; }
.tc-wizard-model__phone {
  display: grid; grid-template-columns: repeat(3, 12px); gap: 6px 5px; align-content: end;
  width: 58px; height: 46px; padding: 8px 8px 9px; border-radius: 9px; box-sizing: border-box; margin-bottom: 4px;
}
.tc-wizard-model__phone span { height: 6px; border-radius: 2px; }
.tc-wizard-model__phone--black { background: #1C1C1F; }
.tc-wizard-model__phone--black span { background: #55555C; }
.tc-wizard-model__phone--white { background: #F1F1EE; box-shadow: inset 0 0 0 2px #D9D9D4; }
.tc-wizard-model__phone--white span { background: #C9C9C4; }
.tc-wizard-model__adapter {
  display: flex; gap: 6px; align-items: center; justify-content: center;
  width: 58px; height: 46px; border-radius: 9px; background: #F1F1EE; box-shadow: inset 0 0 0 2px #D9D9D4;
  color: var(--tc-ink-3); font-size: 14px; margin-bottom: 4px;
}

/* When a Grandstream last fetched its settings, and sending them again. */
.tc-device__fetched { font: 700 13px var(--tc-body); color: var(--tc-ink-2); margin: 2px 0 12px; }
.tc-device__fetched .fa-circle-check { color: var(--tc-teal-deep); }
.tc-device__fetched .fa-hourglass-half { color: var(--tc-ink-4); }
.tc-device__remote { gap: 8px; margin-bottom: 14px; }

/* Phones found on the network, at the top of adding one. */
.tc-wizard-found {
  border: 1.5px dashed var(--tc-border-3); border-radius: 16px; padding: 12px 14px; margin-bottom: 18px;
  background: var(--tc-card);
}
.tc-wizard-found__title { font: 800 15px var(--tc-display); color: var(--tc-ink); }
.tc-wizard-found .tc-card__hint { margin: 6px 0 0; }
.tc-wizard-found .tc-stack { margin-top: 10px; }
.tc-wizard-found__phone { cursor: pointer; }
.tc-wizard-found__phone:hover:not(:disabled) { border-color: var(--tc-teal-deep); background: var(--tc-teal-bg); }
.tc-wizard-found__phone .tc-provider-row__mark { background: var(--tc-teal-deep); }
.tc-wizard-found__phone:disabled { cursor: default; opacity: .7; }

/* The faceplate preview beside a desk phone's hotkeys, at real size in mm (the
   label strip enlarged, being tiny). See views/partials/faceplate_preview.php. */
.tc-fpview { display: flex; justify-content: center; padding: 6px 0 16px; }
.tc-fpview__card {
  position: relative; overflow: hidden; background: #FBF3E4; border-radius: 3px;
  box-shadow: 0 0 0 1px var(--tc-border-3), 0 6px 18px rgba(74, 59, 51, .12);
}
.tc-fpview--strip .tc-fpview__card { zoom: 2.2; }
.tc-fpview__logo { position: absolute; left: 50%; top: 3.2mm; width: 26mm; height: 13mm; transform: translateX(-50%); }
.tc-fpview__title {
  position: absolute; left: 3mm; right: 3mm; top: 17.5mm; text-align: center; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; font: 800 5.2mm/1.15 var(--tc-display); color: var(--tc-ink);
}
.tc-fpview__slot { position: absolute; border: .25mm dashed #999; border-radius: 1.8mm; background: #fff; box-sizing: border-box; }
.tc-fpview__photo {
  position: absolute; width: var(--photo); height: var(--photo); border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center; color: #fff;
  font: 800 calc(var(--photo) * .46) var(--tc-display); box-shadow: 0 0 0 .35mm #fff;
}
.tc-fpview__photo img { width: 100%; height: 100%; object-fit: cover; }
.tc-fpview__name {
  position: absolute; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font: 800 var(--name)/1.15 var(--tc-display); color: var(--tc-ink);
}

/* A desk phone's hotkeys on its card in the phones list. */
.tc-device-card__keys { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.tc-keydot {
  width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font: 800 11px var(--tc-display);
}
.tc-keydot img { width: 100%; height: 100%; object-fit: cover; }
.tc-keydot--empty { background: transparent; color: var(--tc-ink-4); box-shadow: inset 0 0 0 1.5px var(--tc-border-3); }

/* After saving someone: put them on a desk phone's free hotkey? */
.tc-key-offer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; border: 2px solid var(--tc-teal-pale); background: var(--tc-teal-bg); }
.tc-key-offer__icon { width: 40px; height: 40px; border-radius: 11px; background: var(--tc-teal-deep); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.tc-key-offer__title { font: 800 16px var(--tc-display); color: var(--tc-ink); }

/* An announcement playing by itself: its days and time. The days are chips.
   Not faded while "at a set time" is off — faded text is too faint to read;
   the tick box says whether it's on. */
.tc-announce__when { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 8px 0 0 26px; }
.tc-announce__time { width: auto; min-width: 120px; }
.tc-daypick { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-daypick__day input { position: absolute; opacity: 0; pointer-events: none; }
.tc-daypick__day span {
  display: inline-block; min-width: 44px; padding: 7px 8px; text-align: center; cursor: pointer;
  border: 1.5px solid var(--tc-border-3); border-radius: 999px;
  font: 800 13px var(--tc-display); color: var(--tc-ink-3); background: var(--tc-card);
}
.tc-daypick__day input:checked + span { background: var(--tc-teal-bg); border-color: var(--tc-teal-deep); color: var(--tc-teal-deep); }
.tc-daypick__day input:focus-visible + span { outline: 2px solid var(--tc-teal-deep); outline-offset: 2px; }

/* Record, beside an audio upload's "choose a file". Red while recording. */
.tc-rec-btn.is-recording { background: var(--tc-coral); border-color: var(--tc-coral); color: var(--tc-on-coral); }
.tc-rec-btn.is-recording .fa-microphone { animation: tc-rec-pulse 1s ease-in-out infinite; }
@keyframes tc-rec-pulse { 50% { opacity: .35; } }

/* A phone's header card on a narrow screen: the name gets the row, and its
   status and Test call go underneath instead of squeezing it. */
@media (max-width: 560px) {
  .tc-device-head { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .tc-device-head > form.tc-grow { flex: 1 1 0; min-width: 0; }
  .tc-device-head__side {
    flex: 1 0 100%; flex-direction: row; align-items: center; justify-content: space-between;
    border-top: 1px dashed var(--tc-border-3); padding-top: 12px;
  }
}

/* Number pickers on a narrow screen: the name above, the picker full width,
   so a whole number shows. A long button label wraps rather than running off. */
@media (max-width: 560px) {
  .tc-ring-row { gap: 6px 12px; }
  .tc-ring-row + .tc-ring-row { margin-top: 8px; }
  .tc-ring-row__num { min-width: 0; flex: 1 0 100%; }
  .tc-ring-row__pick { max-width: none; flex: 1 0 100%; }
  .tc-card .tc-btn { white-space: normal; max-width: 100%; text-align: center; }
}

/* A number's mailbox, under who it rings. */
.tc-ring-row--sub { margin-top: -2px; }
.tc-ring-row--sub .tc-ring-row__num { font-weight: 700; }

/* Which mailbox a message is in, and moving it. */
.tc-vm-box { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--tc-border-3); }
.tc-vm-box .tc-row { gap: 8px; align-items: center; }
.tc-vm-box__label { font: 800 12px var(--tc-body); color: var(--tc-ink-3); white-space: nowrap; }
.tc-vm-box__pick { width: auto; max-width: 100%; padding-top: 7px; padding-bottom: 7px; font-size: 13px; }

/* The version, on the System page: a newer one stands out. */
.tc-update.is-new { border: 2px solid var(--tc-coral-pale); background: var(--tc-coral-bg); }

/* Read by a screen reader, not shown. */
.tc-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.tc-mt-8 { margin-top: 8px; }

/* Nav glyphs drawn with an icon rather than CSS shapes. */
.tc-nav-icon--fa { background: var(--tc-sunken-2); color: var(--tc-ink-3); font-size: 14px; }
.tc-nav-btn.is-active .tc-nav-icon--fa { background: var(--tc-teal-bg); color: var(--tc-teal-deep); }

/* Keeping a voicemail for good — the star beside it. */
.tc-btn--icon { display: inline-flex; align-items: center; justify-content: center; }
.tc-btn--icon-kept { color: var(--tc-sun-ink); border-color: var(--tc-sun); background: var(--tc-sun-bg); text-decoration: none; }
.tc-btn--icon-kept:hover { color: var(--tc-sun-ink); border-color: var(--tc-sun-ink-2); background: var(--tc-sun-bg); }

/* Keepsakes, by year. */
.tc-keepsakes__year + .tc-keepsakes__year { margin-top: 18px; }
.tc-keepsakes__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 2px 10px; }
.tc-keepsakes__title { font: 800 22px var(--tc-display); margin: 0; }
.tc-keepsakes__count { font: 700 13px var(--tc-body); color: var(--tc-ink-3); flex: 1; }
.tc-keepsake__avatar { background: var(--tc-sun); color: var(--tc-on-coral); }
.tc-keepsake__caption { margin-top: 10px; }
.tc-keepsake__caption .tc-input { font-weight: 700; }
.tc-keepsake__name { margin-top: 10px; font: 800 15px var(--tc-display); }

/* The times tables quiz. */
.tc-quiz-tables { border: 0; padding: 0; margin: 0; }
.tc-quiz-tables__grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tc-quiz-table { position: relative; }
.tc-quiz-table input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tc-quiz-table span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  border: 1.5px solid var(--tc-border-3); background: var(--tc-sunken-2);
  font: 800 15px var(--tc-display); color: var(--tc-ink-3);
}
.tc-quiz-table input:checked + span { background: var(--tc-teal-deep); border-color: var(--tc-teal-deep); color: #fff; }
.tc-quiz-table input:focus-visible + span { outline: 3px solid var(--tc-teal); outline-offset: 2px; }

.tc-quiz-phones { display: grid; gap: 16px; margin-top: 10px; }
.tc-quiz-phone__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tc-quiz-bars { display: grid; gap: 6px; }
.tc-quiz-bar { display: grid; grid-template-columns: 72px 1fr 44px; align-items: center; gap: 10px; }
.tc-quiz-bar__label { font: 800 13px var(--tc-display); color: var(--tc-ink-2); }
.tc-quiz-bar__track { height: 10px; border-radius: 6px; background: var(--tc-sunken-2); border: 1px solid var(--tc-border-3); overflow: hidden; }
.tc-quiz-bar__fill { display: block; height: 100%; background: var(--tc-teal); border-radius: 6px; }
.tc-quiz-bar__pct { font: 700 12px var(--tc-body); color: var(--tc-ink-3); text-align: right; }

.tc-quiz-games { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.tc-quiz-games li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tc-quiz-games__score {
  min-width: 52px; text-align: center; padding: 5px 8px; border-radius: 10px;
  background: var(--tc-sunken-2); border: 1.5px solid var(--tc-border-3);
  font: 800 14px var(--tc-display);
}
.tc-quiz-games__score.is-perfect { background: var(--tc-sun-bg); border-color: var(--tc-sun); color: var(--tc-sun-ink); }

/* The animal riddles, on the Games page. */
.tc-riddles summary { cursor: pointer; }
.tc-riddles__list { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 6px; font-size: 13px; color: var(--tc-ink-2); }
.tc-riddles__answer { color: var(--tc-teal-deep); }

/* Sleeps till Christmas, on the Games page. */
.tc-xmas__tree { color: var(--tc-teal-deep); }
.tc-xmas__today { margin: 8px 0 4px; padding: 10px 14px; border-radius: 12px; background: var(--tc-sun-bg); font: 700 15px var(--tc-display); color: var(--tc-ink-2); }
.tc-xmas__ring { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.tc-xmas__ring .tc-input { width: auto; min-width: 150px; max-width: 170px; }
.tc-xmas-page { max-width: 760px; }

/* The radio's songs. */
.tc-radio-song.is-off { opacity: .6; }
.tc-radio-song__title { font: 800 15px var(--tc-display); padding: 6px 10px; }

/* An upload on its way: a bar while the file goes up, then a wheel while the
   server prepares it — see uploadStatus() in twocans.js. */
.tc-upload { flex-basis: 100%; display: flex; align-items: center; gap: 10px; margin-top: 10px; min-width: 200px; }
.tc-upload__track { flex: 1; height: 8px; border-radius: 5px; background: var(--tc-sunken-2); border: 1px solid var(--tc-border-3); overflow: hidden; }
.tc-upload__fill { display: block; width: 0; height: 100%; background: var(--tc-teal); border-radius: 5px; transition: width .2s ease; }
.tc-upload__text { font: 700 13px var(--tc-body); color: var(--tc-ink-3); white-space: nowrap; }
.tc-upload__spin {
  display: none; flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid var(--tc-teal-bg); border-top-color: var(--tc-teal-deep);
  animation: tc-spin .8s linear infinite;
}
.tc-upload.is-preparing .tc-upload__spin { display: block; }
.tc-upload.is-preparing .tc-upload__fill { background: var(--tc-teal-pale); }
@media (prefers-reduced-motion: reduce) { .tc-upload__spin { animation-duration: 2.4s; } }
/* Nothing else in the form can be pressed while it's sending. */
form.is-sending label, form.is-sending button, form.is-sending input, form.is-sending select { pointer-events: none; opacity: .6; }
form.is-sending .tc-upload { opacity: 1; }

/* Reordering by dragging a handle — see data-tc-sortable in twocans.js. */
.tc-sort-handle {
  flex: none; width: 30px; height: 38px; padding: 0; border: 0; border-radius: 9px;
  background: transparent; color: var(--tc-ink-4); cursor: grab; touch-action: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}
.tc-sort-handle:hover, .tc-sort-handle:focus-visible { background: var(--tc-sunken-2); color: var(--tc-teal-deep); }
.tc-sort-handle:focus-visible { outline: 3px solid var(--tc-teal); outline-offset: 1px; }
[data-tc-sortable].is-sorting { cursor: grabbing; user-select: none; }
[data-tc-sort-id] { position: relative; }
[data-tc-sort-id].is-dragging { z-index: 3; box-shadow: 0 14px 34px rgba(58, 42, 34, .22); cursor: grabbing; }
[data-tc-sort-id].is-dragging .tc-sort-handle { cursor: grabbing; color: var(--tc-teal-deep); }
/* In order (not shuffled): each song's place in it. */
.tc-radio-list.is-ordered { counter-reset: song; }
.tc-radio-list.is-ordered .tc-radio-song { counter-increment: song; }
.tc-radio-list.is-ordered .tc-radio-song .tc-sort-handle::after {
  content: counter(song); font: 800 11px var(--tc-display); margin-left: 2px; color: var(--tc-ink-3);
}
.tc-radio-list.is-ordered .tc-sort-handle { width: 40px; }

/* Radio stations, and the tags on each song. */
.tc-station { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-top: 1px solid var(--tc-border-3); }
.tc-station:first-of-type { border-top: 0; }
.tc-station__key {
  flex: none; width: 30px; height: 30px; border-radius: 9px; margin-top: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tc-teal-deep); color: #fff; font: 800 15px var(--tc-display);
}
.tc-station__name { font: 800 15px var(--tc-display); padding: 6px 10px; }
.tc-station__voice { align-items: center; gap: 8px; }
.tc-station__shuffle { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--tc-ink-3); font-size: 13px; }
.tc-song-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tc-song-tag {
  padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--tc-border-3);
  background: var(--tc-card); color: var(--tc-ink-3); font: 700 12px var(--tc-body); cursor: pointer;
}
.tc-song-tag:hover { border-color: var(--tc-teal-deep); color: var(--tc-teal-deep); }
.tc-song-tag.is-on { background: var(--tc-teal-bg); border-color: var(--tc-teal-deep); color: var(--tc-teal-deep); }
.tc-song-tag:focus-visible { outline: 3px solid var(--tc-teal); outline-offset: 2px; }

/* A desk phone's handset left off the hook. */
.tc-offhook {
  margin-top: 8px; padding: 8px 12px; border-radius: 10px;
  background: var(--tc-sun-bg); color: var(--tc-sun-ink); font: 700 13px var(--tc-body);
}

/* A desk phone setting changed from what's best for a child's phone. */
.tc-changed { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--tc-sun-bg); color: var(--tc-sun-ink); font: 700 11px var(--tc-body); vertical-align: middle; }
.tc-untested { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--tc-lav-bg); color: var(--tc-lav-ink); font: 700 11px var(--tc-body); vertical-align: middle; letter-spacing: .02em; }
.tc-wizard-model .tc-untested { margin-top: 2px; }
.tc-phone-settings { max-width: 760px; }

/* Numbers to dial, side by side below the phone's two columns. */
.tc-dial-card { margin-top: 0; }
.tc-dial-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tc-dial-grid .tc-dial + .tc-dial { margin-top: 0; }
.tc-mac-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }

/* Pausing a phone for a while. */
.tc-pause { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; }
.tc-pause__title { font: 800 15px var(--tc-display); }
.tc-pause__title .fa-circle-pause { color: var(--tc-ink-3); margin-right: 4px; }
.tc-pause.is-paused { background: var(--tc-sun-bg); border-color: var(--tc-sun); }
.tc-pause.is-paused .fa-circle-pause { color: var(--tc-sun-ink); }

/* The week page. */
.tc-week__nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tc-week__title { margin: 0; text-align: center; font: 800 20px var(--tc-display); display: flex; flex-direction: column; }
.tc-week__grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tc-week__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tc-week__name { font: 800 18px var(--tc-display); color: var(--tc-ink); text-decoration: none; }
.tc-week__name:hover { color: var(--tc-teal-deep); }
.tc-week__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.tc-week__stat { background: var(--tc-sunken-2); border-radius: 12px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; }
.tc-week__stat b { font: 800 22px var(--tc-display); color: var(--tc-teal-deep); }
.tc-week__stat span { font: 700 11px var(--tc-body); color: var(--tc-ink-3); }
.tc-week__sub { font: 800 13px var(--tc-display); margin: 4px 0 6px; color: var(--tc-ink-2); }
.tc-week__people { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.tc-week__notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; color: var(--tc-ink-2); }
.tc-week__notes .fa-solid { width: 16px; color: var(--tc-ink-3); }

/* Timer & clock. */
.tc-helpers { max-width: 760px; }
.tc-timers { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 8px; }
.tc-timers li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--tc-sunken-2); }

/* Notifications on your own devices. */
.tc-push__devices { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.tc-push__devices li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--tc-sunken-2); }
.tc-push__devices li.is-this { outline: 2px solid var(--tc-teal); }
.tc-push__devices li.is-this b::after { content: ' (this one)'; font-weight: 600; color: var(--tc-teal-deep); }
.tc-push__iphone { margin-top: 10px; }
.tc-push [hidden] { display: none !important; }

/* A phone's wallpaper, on the shape of its screen. */
.tc-wallpaper { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 12px; }
.tc-wallpaper__screen { position: relative; border-radius: 10px; overflow: hidden; background: #1f1a17; border: 6px solid #2b2522; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.tc-wallpaper__screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tc-wallpaper__none { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; color: #f3e9dd; font: 700 13px var(--tc-body); }
@media (max-width: 640px) { .tc-wallpaper { grid-template-columns: 1fr; } }
