/* île speaks — standalone surface. Additive; mirrors the Classroom look using the same literal tokens
   (graphite #0F0F0E, cream #EAE0C4, warm-white rgba(230,226,220,X), Spectral italic prose, DM Sans UI,
   pill controls, dotted status pill, atmosphere via the shared .stage/.g/.orb). design-system.css is untouched. */

.sp-start {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; padding: 32px; text-align: center;
}
.sp-start[hidden] { display: none; }

.sp-title {
  font-family: 'Spectral', serif; font-size: 34px; font-weight: 300; font-style: italic;
  color: rgba(234,224,196,.88); letter-spacing: .01em;
}
.sp-sub {
  font-family: 'Spectral', serif; font-style: italic; font-size: 16px; font-weight: 300;
  color: rgba(230,226,220,.5); max-width: 420px; line-height: 1.65;
}
.sp-note {
  min-height: 16px; font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 300;
  color: rgba(230,226,220,.5); max-width: 380px; line-height: 1.5;
}

/* Primary pill (same shape language as the Classroom bottom pill) */
.sp-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 30px; border-radius: 26px; margin-top: 6px;
  background: rgba(234,224,196,.1); border: .5px solid rgba(234,224,196,.3);
  color: rgba(234,224,196,.9);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 400; letter-spacing: .02em;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.sp-pill:hover:not(:disabled) { background: rgba(234,224,196,.17); border-color: rgba(234,224,196,.5); color: #EAE0C4; }
.sp-pill:disabled { opacity: .4; cursor: default; }

/* Live session — uses Classroom's own .teaching/.convo/.at/.ap/.lr/.cur/.bwrap/.bubble classes from design-system.css
   (same background, tiers, streaming cursor). Only layout glue for the dock is defined here. */
.sp-start { z-index: 20; }
.teaching.sp-session[hidden] { display: none; }
/* Flat ground: no blurred panel behind the text, and the field uses the full width (no side rails on this surface). */
.teaching.sp-session { left: 0; right: 0; }
.teaching.sp-session::before { display: none; }
.sp-session .convo { right: 320px; padding-left: 72px; padding-right: 24px; }
.sp-session.notes-off .convo { right: 0; }
.sp-notes {
  position: absolute; right: 32px; top: 52px; bottom: 96px; width: 272px;
  display: flex; flex-direction: column; gap: 6px; z-index: 5;
}
.sp-notes[hidden] { display: none; }
.sp-notes-label { margin: 0 0 0 4px; }
.sp-notes-text {
  flex: 1 1 auto; min-height: 0; resize: none; width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.042); border: .5px solid rgba(255,255,255,.1); border-radius: 18px;
  padding: 16px 18px; outline: none;
  font-family: 'Spectral', serif; font-weight: 300; font-size: 16px; line-height: 1.8;
  color: rgba(230,226,220,.82); caret-color: #EAE0C4;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent;
  transition: border-color .4s ease, background .4s ease;
}
.sp-notes-text::placeholder { font-style: italic; color: rgba(230,226,220,.34); }
.sp-notes-text:focus { border-color: rgba(234,224,196,.16); background: rgba(255,255,255,.052); }
@media (max-width: 899px) {
  .sp-session .convo { right: 0; bottom: 250px; padding-right: 32px; }
  .sp-session.notes-off .convo { bottom: 88px; }
  .sp-notes { left: 20px; right: 20px; width: auto; top: auto; bottom: 96px; height: 140px; }
}
.sp-dock { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.sp-pillbar { width: auto; cursor: default; }
.sp-error {
  position: absolute; left: 0; right: 0; bottom: 92px; z-index: 31;
  display: flex; justify-content: center; text-align: center; padding: 0 24px;
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 300; color: rgba(230,226,220,.6);
}
.sp-error[hidden] { display: none; }

.sp-controls { display: flex; gap: 10px; align-items: center; }
.sp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 20px; border-radius: 20px; min-height: 36px;
  background: rgba(255,255,255,.05); border: .5px solid rgba(255,255,255,.1);
  color: rgba(230,226,220,.7);
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 400;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.sp-btn:hover:not(:disabled) { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); }
.sp-btn:disabled { opacity: .35; cursor: default; }
.sp-btn-main { background: rgba(234,224,196,.1); border-color: rgba(234,224,196,.28); color: rgba(234,224,196,.85); }
.sp-btn-main:hover:not(:disabled) { background: rgba(234,224,196,.17); border-color: rgba(234,224,196,.45); color: #EAE0C4; }
.sp-btn[aria-pressed="true"] { background: rgba(234,224,196,.16); border-color: rgba(234,224,196,.45); color: #EAE0C4; }

/* Notes header: label left, quiet text actions right */
.sp-notes-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 0 4px; }
.sp-notes-head .sp-notes-label { margin: 0; }
.sp-notes-actions { display: inline-flex; gap: 6px; }
.sp-mini {
  height: 22px; padding: 0 10px; border-radius: 12px; cursor: pointer;
  background: transparent; border: .5px solid rgba(255,255,255,.1); color: rgba(230,226,220,.55);
  font-family: 'DM Sans', sans-serif; font-size: 10px; letter-spacing: .04em;
  transition: background .2s, border-color .2s, color .2s;
}
.sp-mini:hover:not(:disabled) { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: rgba(230,226,220,.85); }
.sp-mini:disabled { opacity: .3; cursor: default; }
.sp-mini.confirm { border-color: rgba(196,105,74,.6); color: #D4896D; }
.sp-notes-text::-webkit-scrollbar { width: 4px; }
.sp-notes-text::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 2px; }

/* Terracotta voice line — slim rounded bars (no circles, no glow, no blur). Moves with the voices:
   idle = slow breathing, île speaking = tall and quick, you speaking = medium. */
.sp-wave { --tc: #C4694A; display: inline-flex; align-items: center; gap: 3px; height: 16px; }
.sp-wave i {
  display: block; width: 2px; height: 100%; background: var(--tc); border-radius: 1px; opacity: .85;
  transform: scaleY(.22); transform-origin: center;
  animation: spBreath 3.6s ease-in-out infinite;
}
.sp-wave i:nth-child(2) { animation-delay: .25s; } .sp-wave i:nth-child(3) { animation-delay: .5s; }
.sp-wave i:nth-child(4) { animation-delay: .75s; } .sp-wave i:nth-child(5) { animation-delay: 1s; }
.sp-wave i:nth-child(6) { animation-delay: 1.25s; } .sp-wave i:nth-child(7) { animation-delay: 1.5s; }
.sp-wave i:nth-child(8) { animation-delay: 1.75s; } .sp-wave i:nth-child(9) { animation-delay: 2s; }
.sp-wave-hero { height: 48px; gap: 7px; margin: 8px 0 4px; }
.sp-wave-hero i { width: 3px; animation: spBreathHero 4.4s ease-in-out infinite; }
.sp-wave-hero i:nth-child(2) { animation-delay: .25s; } .sp-wave-hero i:nth-child(3) { animation-delay: .5s; } .sp-wave-hero i:nth-child(4) { animation-delay: .75s; } .sp-wave-hero i:nth-child(5) { animation-delay: 1s; } .sp-wave-hero i:nth-child(6) { animation-delay: 1.25s; } .sp-wave-hero i:nth-child(7) { animation-delay: 1.5s; } .sp-wave-hero i:nth-child(8) { animation-delay: 1.75s; } .sp-wave-hero i:nth-child(9) { animation-delay: 2s; }
@keyframes spBreathHero { 0%,100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes spBreath { 0%,100% { transform: scaleY(.2); } 50% { transform: scaleY(.75); } }
@keyframes spTalk { 0%,100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes spListen { 0%,100% { transform: scaleY(.2); } 50% { transform: scaleY(.55); } }
.sp-wave[data-state="ai"] i { animation: spTalk .9s ease-in-out infinite; opacity: 1; }
.sp-wave[data-state="you"] i { animation: spListen 1.4s ease-in-out infinite; opacity: .9; }
.sp-wave[data-state="ai"] i:nth-child(2n) { animation-duration: 1.15s; }
.sp-wave[data-state="ai"] i:nth-child(3n) { animation-duration: .75s; }
.sp-wave[data-state="ai"] i:nth-child(1) { animation-delay: 0s; } .sp-wave[data-state="ai"] i:nth-child(2) { animation-delay: .12s; }
.sp-wave[data-state="ai"] i:nth-child(3) { animation-delay: .24s; } .sp-wave[data-state="ai"] i:nth-child(4) { animation-delay: .08s; }
.sp-wave[data-state="ai"] i:nth-child(5) { animation-delay: .2s; }
/* Terracotta hairline under the start-screen title, drawn once */
.sp-title { position: relative; padding-bottom: 10px; }
.sp-title::after {
  content: ''; position: absolute; left: 50%; bottom: 0; height: 1px; width: 56px; margin-left: -28px;
  background: #C4694A; opacity: .7; transform-origin: center; animation: spDraw 1.4s .2s cubic-bezier(.34,1.1,.64,1) both;
}
@keyframes spDraw { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: .7; } }
@media (prefers-reduced-motion: reduce) {
  .sp-wave i, .sp-wave[data-state] i { animation: none; transform: scaleY(.5); }
  .sp-title::after { animation: none; }
}

/* Session clock: quiet tabular time in the status pill + a 1px terracotta line across the top that fills over the 10-minute limit */
.sp-clock {
  font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 400; letter-spacing: .06em;
  font-variant-numeric: tabular-nums; color: rgba(230,226,220,.5); min-width: 0; margin-left: 2px;
}
.sp-clock:not(:empty)::before { content: '·'; margin-right: 8px; color: rgba(230,226,220,.28); }
.sp-clock.low { color: #D4896D; }
.sp-clockline { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(255,255,255,.06); z-index: 6; pointer-events: none; }
.sp-clockline i { display: block; height: 100%; width: 100%; background: #C4694A; opacity: .75; transform: scaleX(0); transform-origin: left center; transition: transform 1s linear; }
@media (prefers-reduced-motion: reduce) { .sp-clockline i { transition: none; } }

/* Tap a word / select a phrase -> "+ Notes" chip */
.sp-addnote { position: fixed; z-index: 40; border-color: rgba(196,105,74,.6); color: #D4896D; background: rgba(15,15,14,.96); height: 26px; padding: 0 12px; font-size: 11px; }
.sp-addnote[hidden] { display: none; }
.sp-addnote:hover:not(:disabled) { background: rgba(196,105,74,.14); border-color: rgba(196,105,74,.9); color: #E6A58A; }
.sp-session .convo { -webkit-user-select: text; user-select: text; cursor: text; }
.sp-notes-text.flash { border-color: rgba(196,105,74,.7); }
.sp-session .convo ::selection, .sp-session .convo::selection { background: rgba(196,105,74,.38); color: #F0ECE6; }

/* Quiet how-to hints */
.sp-tip {
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 300; line-height: 1.6;
  color: rgba(230,226,220,.42); max-width: 380px; margin-top: 2px;
}
.sp-notes-tip {
  margin: 6px 6px 0; font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 300; line-height: 1.55;
  color: rgba(230,226,220,.4);
}
@media (max-width: 899px) { .sp-notes-tip { display: none; } }
