﻿/* Palette: Crimson + Slate + White */
:root{
  --rule-gap: 30px;
  --gutter-width: 26px;
  --hole-radius: 7px;
  --hole-gap: 34px;
  --font-hand: 'Patrick Hand', 'Segoe Print','Bradley Hand','Comic Sans MS',cursive;

  --color-primary: #DC2626; /* crimson */
  --color-accent:  #64748B; /* slate */
  --color-bg:      #FFFFFF; /* page */
  --color-surface: #F3F4F6; /* paper */
  --color-ink:     #0F172A; /* text */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.08);
  --shadow-md: 0 8px 20px rgba(0,0,0,.08);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; color:var(--color-ink); background:var(--color-bg);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.notebook{ display:grid; grid-template-columns: 220px 1fr; min-height:100vh; }

/* Spine */
.spine{
  position:relative; background:linear-gradient(180deg,#F8FAFC 0%, #EEF2F7 100%);
  border-right: 2px solid #E5E7EB;
  padding: 20px 12px; box-shadow: var(--shadow-sm);
}
.brand{ font-weight:700; letter-spacing:.02em; color:var(--color-primary); margin-bottom:16px }

/* Tabs (notebook-style) */
.tabs{ display:flex; flex-direction:column; gap:8px; }
.tab{
  appearance:none; border:none; text-align:left; cursor:pointer;
  padding:10px 12px; color:var(--color-ink); background:#fff;
  border:1px solid #E5E7EB; border-left:3px solid var(--color-accent);
  border-radius: 0 8px 8px 0; box-shadow: var(--shadow-sm);
}
.tab[aria-selected="true"]{
  background: #fff; border-left-color: var(--color-primary); font-weight:600;
  transform: translateX(2px); box-shadow: var(--shadow-md);
}
.tab:focus-visible{ outline:2px solid var(--color-primary); outline-offset:2px }

/* Mobile */
@media (max-width: 720px){
  .notebook{ grid-template-columns: 1fr; }
  .spine{ position:sticky; top:0; z-index:10; border-right:none; border-bottom:2px solid #E5E7EB; }
  .tabs{ flex-direction:row; overflow:auto; }
  .tab{ border-radius:8px; border-left-width:1px; }
}
/* Staggered side tabs */
.tabs.stagger { position: relative; }
.tabs.stagger .tab{ width: 180px; margin-left: -12px; position: relative; }
.tabs.stagger .tab::after{ content:""; position:absolute; right:-8px; top:0; bottom:0; width:8px; border-radius:0 8px 8px 0; background:rgba(0,0,0,0.06); filter:blur(0.25px); }
.tabs.stagger .tab:nth-child(1){ border-left-color: var(--color-primary); background: #fff; }
.tabs.stagger .tab:nth-child(2){ border-left-color: #B91C1C; background: #FFFFFF; }
.tabs.stagger .tab:nth-child(3){ border-left-color: var(--color-accent); background: #FFFFFF; }


/* Stagger variety and tint backgrounds per tab */
.tabs.stagger .tab{ width: 180px; position: relative; }
.tabs.stagger .tab:nth-child(1){ margin-left:-12px; border-left-color: #DC2626; background: linear-gradient(90deg,#FFFFFF 0%, #FFF5F5 100%); }
.tabs.stagger .tab:nth-child(2){ margin-left:-20px; border-left-color: #B91C1C; background: linear-gradient(90deg,#FFFFFF 0%, #F1F5F9 100%); }
.tabs.stagger .tab:nth-child(3){ margin-left:-28px; border-left-color: #64748B; background: linear-gradient(90deg,#FFFFFF 0%, #EEF2F7 100%); }



/* Doodlepad look */
body.paper{
  /* Ruled lines over warm white */
  background:
    linear-gradient(0deg, rgba(255,255,255,0.98), rgba(255,255,255,0.98)),
    repeating-linear-gradient(to bottom, rgba(15,23,42,0.06) 0 1px, transparent 1px var(--rule-gap));
}
/* Spiral gutter + red margin */



/* Header */
.top{ position:relative; z-index:1; padding:32px 32px 12px 72px; }
.title-doodle{
  margin:0 0 6px; font-weight: 700; letter-spacing:.5px; color:#111827;
  font-family: var(--font-hand);
  font-size: clamp(28px, 6vw, 56px);
  text-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
.date-line{ margin: 0 0 8px; color:#374151; font-style:italic; font-size:clamp(14px,2.5vw,18px); }
.top-nav{ display:flex; gap:28px; padding:6px 0 0; margin-left: 40px; }
.top-nav a{ color:#1D4ED8; text-decoration:none; font-family: var(--font-hand); }
.top-nav a:hover{ text-decoration:underline; }
.rule.dashed{ border:0; height:2px; background: repeating-linear-gradient(to right, #e5e7eb 0 12px, transparent 12px 24px); margin: 6px 32px 0 72px; }

/* Page content */
.sheet{ position:relative; z-index:1; padding:20px 32px 48px 72px; }
.scribble{
  margin:18px 0 8px; font-weight:900; color:#111827;
  font-family: var(--font-hand);
  font-size: clamp(22px, 4vw, 36px);
}
.hand{ font-family: var(--font-hand); }
.bullets{ list-style: disc; padding-left: 24px; }

/* Paper right edge shadow */
body.paper .sheet{ box-shadow: inset -10px 0 12px rgba(0,0,0,0.04); }


/* Desk background and centered page */
.desk{ min-height:100vh; background:
  radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,0.7), transparent 60%),
  radial-gradient(120% 80% at 100% 100%, rgba(0,0,0,0.06), transparent 50%),
  repeating-linear-gradient(135deg, #EEE7DF 0 12px, #E8E0D7 12px 24px);
}
.page{
  position: relative; z-index:1; margin: 32px auto 56px; width: min(920px, calc(100% - 48px));
  border: 1px solid #E5E7EB; border-radius: 8px; box-shadow: 0 24px 60px rgba(0,0,0,0.18), 0 8px 18px rgba(0,0,0,0.12);
  background:
    linear-gradient(0deg, rgba(255,255,255,0.98), rgba(255,255,255,0.98)),
    /* ruled lines */
    repeating-linear-gradient(to bottom, rgba(15,23,42,0.06) 0 1px, transparent 1px var(--rule-gap)),
    /* crumple shading */
    radial-gradient(120% 80% at 12% 18%, rgba(0,0,0,0.03), transparent 60%),
    radial-gradient(90% 110% at 80% 35%, rgba(0,0,0,0.02), transparent 60%),
    radial-gradient(140% 100% at 40% 88%, rgba(0,0,0,0.02), transparent 60%);
  background-blend-mode: normal, normal, multiply, multiply, multiply;
}
/* right-edge subtle shadow */
.page::after{ content:""; position:absolute; top:0; right:0; bottom:0; width:36px; pointer-events:none; border-radius:0 8px 8px 0;
  background: linear-gradient(to left, rgba(0,0,0,0.10), rgba(0,0,0,0.00) 70%);
}

/* Spiral gutter and margin line within the page */
.page.spiral::before{
  content:""; position:absolute; z-index:0; left:0; top:0; bottom:0; width:var(--gutter-width);
  background:
    radial-gradient(circle at calc(var(--gutter-width)/2) calc(var(--hole-gap)/2), #cbd5e1 0 var(--hole-radius), transparent calc(var(--hole-radius) + 1px)) repeat-y,
    linear-gradient(to right, #e5e7eb, #e5e7eb) no-repeat;
  background-size: var(--gutter-width) var(--hole-gap), 1px 100%;
  background-position: 0 0, var(--gutter-width) 0;
  border-radius:8px 0 0 8px;
}
.page.spiral::after{
  content:""; position:absolute; z-index:0; left: calc(var(--gutter-width) + 32px); top:0; bottom:0; width:2px; background: rgba(220,38,38,0.28);
}

/* Shift inner content to account for gutter */
.page .top{ padding-left: calc(var(--gutter-width) + 48px); }
.page .sheet{ padding-left: calc(var(--gutter-width) + 48px); padding-right: 32px; padding-bottom: 56px; }

@media (max-width: 720px){
  .page{ width: calc(100% - 24px); margin:16px auto 28px; }
}

/* Top tab bar styled like notebook tabs */
.tabbar{ position:absolute; top:-28px; left:120px; z-index:2; display:flex; align-items:flex-end; gap:12px; }
.tab-links{ display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; max-height:none; }
.tab-toggle{
  display:none;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  border:1px solid #d1d5db;
  border-radius:10px;
  background: linear-gradient(#f9fafb,#f3f4f6);
  color:#111827;
  font-family: var(--font-hand);
  font-size:1rem;
  cursor:pointer;
  box-shadow:0 3px 6px rgba(0,0,0,0.12);
}
.tab-toggle:focus-visible{ outline:2px solid #4C1D95; outline-offset:2px; }
.tab-toggle__icon{
  position:relative;
  width:18px;
  height:2px;
  background:#111827;
  border-radius:2px;
}
.tab-toggle__icon::before,
.tab-toggle__icon::after{
  content:"";
  position:absolute;
  left:0;
  width:100%;
  height:100%;
  background:#111827;
  border-radius:2px;
}
.tab-toggle__icon::before{ top:-6px; }
.tab-toggle__icon::after{ top:6px; }
.tabbar .tab{
  display:inline-block; padding:10px 14px; border:1px solid #d1d5db; border-bottom:none; border-radius:10px 10px 0 0;
  background: linear-gradient(#f9fafb,#f3f4f6); color:#111827; text-decoration:none; font-family: var(--font-hand);
  box-shadow: 0 2px 0 rgba(0,0,0,0.08); transition: transform .15s ease, box-shadow .15s ease;
}
.tabbar .tab:hover{ transform: translateY(-1px); }
.tabbar .tab.is-active{ background: linear-gradient(#111827,#374151); color:#fff; border-color:#111827; box-shadow: 0 3px 0 rgba(0,0,0,0.2); }

/* Tilt page slightly for realism */
.page{ transform: rotate(-0.6deg); }
@media (max-width:720px){ .page{ transform:none; } }

@media (max-width: 960px){
  .tabbar{
    position:static;
    margin: 0 32px 18px;
    justify-content:center;
  }
  .tab-links{
    justify-content:center;
    max-height:none;
  }
}

@media (max-width: 720px){
  .tabbar{
    position:static;
    flex-direction:column;
    align-items:stretch;
    margin: 12px 16px 20px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.92);
    border:1px solid #e5e7eb;
    border-radius:14px;
    box-shadow:0 14px 30px rgba(0,0,0,0.12);
  }
  .tab-toggle{ display:flex; }
  .tab-links{
    width:100%;
    flex-direction:column;
    gap:6px;
    display:none;
    padding:0;
    background: rgba(255,255,255,0.98);
    border-radius:12px;
    box-shadow: inset 0 0 0 1px rgba(209,213,219,0.6);
  }
  .tabbar.is-open .tab-links{
    display:flex;
    margin-top:10px;
  }
  .tabbar .tab{
    width:100%;
    display:block;
    border-radius:10px;
    border-left-width:1px;
    border-bottom:1px solid #d1d5db;
    text-align:center;
  }
  .tabbar .tab.is-active{
    box-shadow:0 4px 10px rgba(0,0,0,0.16);
  }
}

/* Content emphasis colors */
.entry .scribble{ color:#6D28D9; }
.entry .hand strong, .entry strong{ color:#4C1D95; }

/* Images within entries */
.entry img{ width:100%; height:auto; border-radius:8px; box-shadow: 0 12px 22px rgba(0,0,0,0.18); border: 1px solid #E5E7EB; }
/* Override legacy rules: ensure page is visible */
.page{ opacity:1 !important; transform: rotate(-0.6deg); position: relative; inset: auto; }


/* Entry spacing tweaks */
.entry{ margin: 12px 0 28px; }
.entry + .entry{ margin-top: 32px; }
/* Responsive media embeds */
.embed{ aspect-ratio: 16 / 9; width:100%; max-width: 760px; margin: 10px 0 20px; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 22px rgba(0,0,0,0.18); border:1px solid #E5E7EB; }
.embed iframe{ width:100%; height:100%; border:0; display:block; }
/* Home link styling on title */
.title-doodle .home-link{ color: inherit; text-decoration: none; }
.title-doodle .home-link:hover{ text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* About page messy entry styling */
.entry-messy{
  position: relative;
  background: #fffdf5;
  box-shadow: 0 0 12px rgba(0,0,0,0.12), inset 0 0 0 2px rgba(0,0,0,0.05);
  transform: rotate(-0.8deg);
  padding-top: 2.5rem;
}
.entry-messy::before,
.entry-messy::after{
  content:"";
  position:absolute;
  background-repeat:no-repeat;
  pointer-events:none;
}
.entry-messy::before{
  width:120px;
  height:40px;
  top:0.4rem;
  left:2rem;
  background:linear-gradient(135deg, rgba(255,235,150,0.8), rgba(255,200,120,0.6));
  box-shadow:3px 3px 6px rgba(0,0,0,0.15);
  transform:rotate(2.5deg);
}
.entry-messy::after{
  width:70px;
  height:70px;
  right:1.5rem;
  bottom:0.8rem;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,150,150,0.3) 0 18%, transparent 22%),
    radial-gradient(circle at 70% 65%, rgba(130,200,255,0.35) 0 12%, transparent 16%);
  transform:rotate(-6deg);
}
.entry-messy .note-layout{
  display:flex;
  gap:1.5rem;
  align-items:flex-start;
  flex-wrap:wrap;
}
.entry-messy .portrait-note{
  max-width:180px;
  flex:0 0 auto;
  border:4px solid rgba(0,0,0,0.1);
  border-radius:12px;
  overflow:hidden;
  box-shadow:-6px 6px 12px rgba(0,0,0,0.15);
  transform:rotate(-3deg);
  background:#fff;
}
.entry-messy .portrait-note img{
  display:block;
  width:100%;
  height:auto;
  border:none;
  box-shadow:none;
  border-radius:0;
}
.entry-messy .note-copy{
  flex:1 1 240px;
  min-width:240px;
}
@media (max-width: 600px){
  .entry-messy{ transform:none; }
  .entry-messy .portrait-note{
    max-width:140px;
    margin:0 auto;
    transform:rotate(-2deg);
  }
  .entry-messy .note-copy{ text-align:left; }
}

/* Tone picker styling */
.tone-picker{
  margin:12px 0 18px;
}
.tone-picker__label{
  display:block;
  margin-bottom:6px;
  font-size:1rem;
}
.tone-chip-group{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));
  gap:10px;
}
.tone-chip{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:10px 12px;
  min-height:52px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,0.16);
  background:#ffffff;
  color:#0f172a;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}
.tone-chip-group .tone-chip:hover{
  transform:translateY(-1px);
  border-color:rgba(245,158,11,0.8);
}
.tone-chip.is-active{
  background:#fef3c7;
  border-color:#f59e0b;
  box-shadow:0 8px 20px rgba(0,0,0,0.12);
}
.tone-chip:focus-visible{
  outline:2px solid #f59e0b;
  outline-offset:2px;
}
.tone-chip__mark{
  font-size:1.35rem;
  font-weight:700;
}
.tone-chip__text{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height:1.2;
}
.tone-chip__title{
  font-size:0.9rem;
  font-weight:600;
}
.tone-chip__hint{
  font-size:0.75rem;
  color:rgba(15,23,42,0.7);
}
.tone-chip__wave{
  width:48px;
  height:26px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.tone-chip__wave svg{
  width:100%;
  height:auto;
}

@media (max-width: 600px){
  .tone-chip-group{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px;
  }
  .tone-chip{
    padding:10px;
    min-height:48px;
  }
}

.tone-visual{
  width:72px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:6px;
}
.tone-visual svg{
  width:100%;
  height:auto;
}

.loop-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  margin:12px 0;
  font-size:0.95rem;
}
.loop-toggle input{
  accent-color:#f97316;
}

.syllable-band{
  position:relative;
  margin:1.25rem 0 .75rem;
  padding-left:60px;
}
.syllable-band__tape{
  position:absolute;
  width:46px;
  height:22px;
  top:-8px;
  left:10px;
  background:rgba(254,215,170,0.9);
  border-radius:6px;
  transform:rotate(-5deg);
  box-shadow:0 4px 10px rgba(15,23,42,0.12);
}
.syllable-band__body{
  border-left:3px dashed rgba(245,158,11,0.65);
  padding-left:20px;
}
.syllable-band__label{
  font-family:'Patrick Hand', cursive;
  font-size:1.35rem;
  color:#b45309;
  margin:0;
}
.syllable-band__hint{
  margin:.2rem 0 0;
  font-size:.9rem;
  color:#475569;
}

.practice-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.resource-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:1.25rem;
  margin-top:1.5rem;
}
.resource-card{
  position:relative;
  border:2px dashed rgba(15,23,42,0.2);
  border-radius:18px;
  padding:1.1rem 1.1rem 1.25rem;
  background:linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.85) 100%);
  box-shadow:0 10px 24px rgba(15,23,42,0.08);
  transition:transform .18s ease, box-shadow .18s ease;
}
.resource-card::before{
  content:"";
  position:absolute;
  top:-12px;
  left:22px;
  width:48px;
  height:20px;
  background:rgba(254,215,170,0.85);
  border-radius:4px;
  transform:rotate(-2deg);
}
.resource-card:hover,
.resource-card:focus-within{
  transform:translateY(-4px);
  box-shadow:0 16px 32px rgba(15,23,42,0.12);
}
.resource-card__header{
  display:flex;
  align-items:center;
  gap:.5rem;
  margin-bottom:.65rem;
}
.resource-card__title{
  margin:0;
  font-family:'Patrick Hand', cursive;
  font-size:1.55rem;
  line-height:1.2;
}
.resource-card__tag{
  font-size:.75rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  background:#fde68a;
  color:#92400e;
  border-radius:999px;
  padding:.18rem .55rem;
}
.resource-card__tag--soon{
  background:#e0e7ff;
  color:#3730a3;
}
.resource-card--external::before{
  background:rgba(191,219,254,0.9);
}
.resource-card__blurb{
  margin:0 0 1rem;
  font-size:.98rem;
  color:#1f2937;
}
.resource-card__link{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  font-weight:600;
  color:#b45309;
  text-decoration:none;
  background:rgba(254,243,199,0.65);
  border:1px solid rgba(245,158,11,0.45);
  border-radius:999px;
  padding:.4rem .85rem;
  transition:background-color .18s ease, color .18s ease, border-color .18s ease;
}
.resource-card__link:hover,
.resource-card__link:focus-visible{
  background:#fef3c7;
  color:#92400e;
  border-color:#d97706;
}
.resource-card__link--disabled{
  cursor:not-allowed;
  opacity:.6;
  background:rgba(229,231,235,0.6);
  border-color:rgba(148,163,184,0.6);
  color:#475569;
}
.practice-panel{ border:2px dashed rgba(0, 0, 0, 0.2); border-radius:8px; padding:1rem; background:rgba(255,255,255,0.9); }
.practice-panel--focus{
  position:relative;
  background:linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(254,249,195,0.92) 100%);
  box-shadow:0 14px 28px rgba(148,81,0,0.12);
}
.practice-panel--focus::before{
  content:"";
  position:absolute;
  top:-12px;
  right:24px;
  width:58px;
  height:22px;
  background:rgba(253,230,138,0.85);
  border-radius:6px;
  transform:rotate(4deg);
  box-shadow:0 6px 12px rgba(190,130,0,0.18);
}
.practice-context{
  margin:-0.35rem 0 0.65rem;
  font-size:0.95rem;
  color:#7c2d12;
  background:rgba(255,255,255,0.7);
  border-left:3px solid rgba(245,158,11,0.75);
  padding:0.35rem 0.5rem;
  border-radius:6px;
}

.practice-playback{ margin-bottom:10px; }

.practice-sample{
  border:1px solid rgba(15,23,42,0.12);
  border-radius:12px;
  padding:12px;
  background:rgba(255,255,255,0.65);
  margin-bottom:10px;
}
.syllable-families{ display:flex; flex-direction:column; gap:0.85rem; padding:0.6rem; }
.syllable-family{ background:rgba(255,255,255,0.75); border:1px solid rgba(148,163,184,0.35); border-radius:12px; padding:0.55rem 0.65rem 0.65rem; box-shadow:inset 0 0 0 1px rgba(255,255,255,0.65); }
.syllable-family__pill{ display:inline-block; font-size:0.85rem; font-weight:600; letter-spacing:0.04em; text-transform:uppercase; background:#e0f2fe; color:#0f172a; border-radius:999px; padding:0.2rem 0.75rem; margin-bottom:0.45rem; }
.syllable-family .syllable-buttons{ gap:0.45rem; padding:0; border:none; }

.pinyin-filters{ display:flex; flex-wrap:wrap; gap:0.5rem; margin-bottom:0.75rem; }
.filter-chip{
  border:1px solid rgba(15,23,42,0.25);
  border-radius:999px;
  padding:0.25rem 0.85rem;
  background:rgba(255,255,255,0.85);
  cursor:pointer;
  transition:background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.filter-chip:hover,
.filter-chip:focus-visible{ background:#fef3c7; border-color:#f59e0b; outline:none; }
.filter-chip.is-active{ background:#fde68a; border-color:#f59e0b; color:#7c2d12; box-shadow:0 6px 12px rgba(124,45,18,0.18); }

.pinyin-search{ margin-bottom:1rem; }
.pinyin-search label{ display:block; font-weight:700; margin-bottom:0.35rem; }
.pinyin-search input{ width:100%; padding:0.4rem 0.6rem; border:1px solid rgba(0,0,0,0.2); border-radius:4px; }

.is-filtered-out{ display:none !important; }

.favorites-card{
  border:2px dashed rgba(99,102,241,0.4);
  border-radius:16px;
  padding:0.85rem 0.95rem 1rem;
  background:linear-gradient(180deg, rgba(224,231,255,0.95) 0%, rgba(237,233,254,0.85) 100%);
  box-shadow:0 14px 28px rgba(79,70,229,0.12);
  margin-bottom:1rem;
  position:relative;
}
.favorites-card::before{
  content:"";
  position:absolute;
  top:-14px;
  left:28px;
  width:64px;
  height:24px;
  background:rgba(199,210,254,0.9);
  border-radius:6px;
  transform:rotate(-6deg);
  box-shadow:0 8px 16px rgba(79,70,229,0.2);
}
.favorites-card__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0.5rem;
  margin-bottom:0.4rem;
}
.favorites-card__title{
  margin:0;
  font-size:1.25rem;
  color:#312e81;
}
.favorites-card__clear{
  border:1px solid rgba(79,70,229,0.4);
  background:rgba(255,255,255,0.85);
  border-radius:999px;
  padding:0.2rem 0.75rem;
  font-size:0.8rem;
  color:#4338ca;
  cursor:pointer;
  transition:background-color 0.15s ease, border-color 0.15s ease;
}
.favorites-card__clear:disabled{
  cursor:not-allowed;
  opacity:0.4;
}
.favorites-card__clear:not(:disabled):hover,
.favorites-card__clear:not(:disabled):focus-visible{
  background:rgba(199,210,254,0.7);
  border-color:#4338ca;
  outline:none;
}
.favorites-card__hint{
  margin:0 0 0.6rem;
  font-size:0.9rem;
  color:#4338ca;
}
.favorites-list{ display:flex; flex-wrap:wrap; gap:0.45rem; }
.favorites-chip{
  border:1px solid rgba(79,70,229,0.45);
  background:rgba(255,255,255,0.9);
  border-radius:12px;
  padding:0.3rem 0.75rem;
  font-weight:600;
  cursor:pointer;
  transition:transform 0.12s ease, border-color 0.12s ease;
}
.favorites-chip:hover,
.favorites-chip:focus-visible{
  transform:translateY(-1px);
  border-color:#312e81;
  outline:none;
}
.practice-sample__text strong{ font-size:1.05rem; }
.sample-actions{ margin-top:8px; }
.sample-actions button{
  border:1px solid rgba(15,23,42,0.2);
  border-radius:8px;
  padding:6px 12px;
  background:#fff;
  cursor:pointer;
}
.sample-actions button:disabled{
  opacity:0.5;
  cursor:not-allowed;
}
.sample-actions button:focus-visible{
  outline:2px solid #f59e0b;
  outline-offset:2px;
}

.syllable-group{ transition:opacity .2s ease, transform .2s ease; }
.syllable-group.is-muted{
  opacity:0.35;
}
.syllable-group .hand.is-related{
  position:relative;
  box-shadow:0 0 0 2px rgba(245,158,11,0.8);
  z-index:1;
}
