/* IngleWorkspaceCSS.css — Gold Standard v1.1 (CSS clean) — Feb 2026
   - Workspace-only CSS extracted from HTML
   - No duplicate modal systems; unified modal styling
   - No duplicate progress styles
*/

:root {
  --ws-max: 1120px;
  --ws-pad: 18px;

  --card: rgba(255, 255, 255, 0.78);
  --card2: rgba(255, 255, 255, 0.90);

  --stroke: rgba(0, 0, 0, 0.08);
  --stroke2: rgba(0, 0, 0, 0.12);

  --text: rgba(0, 0, 0, 0.92);
  --muted: rgba(0, 0, 0, 0.62);
  --muted2: rgba(0, 0, 0, 0.52);

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.05);

  --blue: #0b5fff;
  --blueShadow: 0 10px 22px rgba(11, 95, 255, 0.22);

  --gap: 12px;
}

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, sans-serif;

  color: rgba(0,0,0,0.88);
  background: rgba(250,250,252,1);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  letter-spacing: -0.01em;
}

.ws-wrap { max-width: var(--ws-max); margin: 0 auto; padding: var(--ws-pad); }

/* Topbar */
.ws-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.ws-title { font-size: 19px; font-weight: 650; }
.ws-sub { font-size: 13px; }

.ws-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

/* Buttons */
.ws-btn {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke2);
  background: var(--card2);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
  user-select: none;
}

.ws-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.ws-btn:active { transform: translateY(0px); box-shadow: var(--shadow-soft); }

.ws-btn.primary {
  background: var(--blue);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--blueShadow);
}

.ws-btn.primary:hover { box-shadow: 0 12px 26px rgba(11, 95, 255, 0.26); }

.ws-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Cards */
.ws-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--stroke);
  background: var(--card);
  padding: 14px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.ws-card h3 {
  margin: 0 0 10px 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: rgba(0,0,0,0.86);
}

.ws-hr {
  height: 1px;
  background: rgba(0,0,0,0.06);
  margin: 14px 0;
  border-radius: 999px;
}

/* Sections (Today / Tomorrow) */
.ws-section {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0,0,0,0.07);
  background: rgba(255,255,255,0.62);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.ws-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ws-section-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.70);
}

.ws-section-date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* Scoreboard */
.ws-scorebar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 10px;
}

.sb-cell {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.80);
  border: 1px solid rgba(0, 0, 0, 0.07);
  min-width: 0;
}

.sb-wide { grid-column: span 2; }

.sb-k {
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--muted2);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-v {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Grid */
.ws-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.ws-span-all { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .ws-grid { grid-template-columns: 1fr; }
  .sb-wide { grid-column: span 1; }
  .ws-actions { width: 100%; justify-content: flex-start; }
}

/* Textareas */
.ws-grid--today textarea.ws-ta { min-height: 240px; }
.ws-ta--essay { min-height: 320px; }
.ws-ta--summary { min-height: 220px; }

textarea.ws-ta {
  width: 100%;
  min-height: 220px;
  resize: vertical;

  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);

  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;

  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
  transition: border 140ms ease, box-shadow 140ms ease;
}

textarea.ws-ta:focus {
  outline: none;
  border-color: rgba(11, 95, 255, 0.25);
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.08);
}

/* Progress */
.ws-progress {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.55);
  overflow: hidden;
}

.ws-progress__bar {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: var(--blue);
  transition: width 180ms ease;
}

/* Indeterminate progress */
.ws-progress.isIndeterminate .ws-progress__bar {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  transition: none !important;
  animation: wsIndeterminate 1.0s ease-in-out infinite;
}

@keyframes wsIndeterminate {
  0%   { left: -40%; }
  100% { left: 100%; }
}

/* Recorder */
.rec-wrap { display:flex; flex-direction:column; gap:10px; }
.rec-controls { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }

.rec-pill {
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.86);
  font-size: 12px;
  color: rgba(0,0,0,0.78);
}

.rec-audio { width: 100%; }

#resetBtn { border-radius: 12px; width: 40px; padding: 10px 0; text-align: center; }

/* Utility */
.hidden { display:none !important; }
.ws-muted { font-size: 12px; color: var(--muted); }

/* Helper language blocks */
.ws-helper-wrap{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.ws-helper-label{
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  color: rgba(0,0,0,0.62);
  margin-bottom: 6px;
}

.ws-helper-box{
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.90);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* -------------------------------------------------
   Modal system (unified)
-------------------------------------------------- */
.ws-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 9999;
}

.ws-modal.hidden { display:none !important; }

.ws-modal__scrim,
.ws-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
}

.ws-modal__panel,
.ws-modal-panel {
  position: relative;
  width: min(720px, calc(100vw - 24px));
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  padding: 14px;
  overflow: hidden;
}

/* Notice modal wants a narrower panel */
.ws-modal-panel.isNarrow {
  width: min(520px, calc(100vw - 24px));
  padding: 18px 18px;
}

.ws-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ws-modal__title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ws-modal__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.ws-input {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;

  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.97);
  padding: 9px 12px;

  font: inherit;
  font-size: 12.5px;
  line-height: 1.2;

  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  text-overflow: clip;

  -webkit-overflow-scrolling: touch;
}

.ws-input:focus {
  outline: none;
  border-color: rgba(11, 95, 255, 0.25);
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.08);
}

.ws-modal__actions,
.ws-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 2px;
  flex-wrap: wrap;
}

.ws-toast {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.7);
}

/* Notice content typography */
.ws-modal-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ws-modal-message {
  font-size: 14px;
  color: rgba(0,0,0,0.78);
}

.ws-modal-detail {
  font-size: 13px;
  color: rgba(0,0,0,0.55);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}
/* Workspace Notice Modal */
.ws-modal.hidden { display: none; }

.ws-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.ws-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.ws-modal-card {
  position: relative;
  max-width: 560px;
  width: calc(100% - 32px);
  margin: 18vh auto 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  padding: 18px 18px 14px 18px;
}

.ws-modal-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.ws-modal-msg { font-size: 14px; margin-bottom: 6px; }
.ws-modal-detail { font-size: 12px; opacity: 0.75; margin-bottom: 14px; }

.ws-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ws-btn {
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #f6f7fb;
  cursor: pointer;
}

.ws-btn-primary {
  background: #3b82f6;
  color: #fff;
  border-color: rgba(0,0,0,0.0);
}
#wsNoticeModal .ws-modal-actions {
  display: flex !important;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

#wsNoticeModal #wsNoticeOk {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* === Workspace Notice Modal: gold standard === */
.ws-modal {
  position: fixed;
  inset: 0;
  display: flex;              /* shows when NOT .hidden */
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 99999;             /* above everything */
}

.ws-modal.hidden {
  display: none;
}

.ws-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 0;                 /* behind card */
}

.ws-modal-card {
  position: relative;
  z-index: 1;                 /* above scrim */
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  width: min(680px, calc(100vw - 48px));
  max-height: calc(100vh - 96px);
  overflow: visible;          /* IMPORTANT: don’t clip footer */
  padding: 18px 18px 16px 18px;
}

.ws-modal-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.ws-modal-msg {
  margin-bottom: 8px;
}

.ws-modal-detail {
  opacity: 0.75;
  font-size: 13px;
  margin-bottom: 14px;
}

.ws-modal-actions {
  display: flex !important;   /* force visible */
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

#wsNoticeOk {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.ws-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ws-card-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ws-btn-hear {
  min-width: 88px;
  padding: 8px 12px;
  border-radius: 999px;
}

.ws-text-block {
  font-weight: 750;
  font-size: 16px;
  line-height: 1.45;
}

.ws-text-block--question {
  font-size: 18px;
}

.ws-audio-dock {
  position: sticky;
  bottom: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.06);
}

.ws-audio-dock.hidden {
  display: none;
}

.ws-audio-dock__meta {
  min-width: 0;
  flex: 1 1 auto;
}

.ws-audio-dock__label {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.ws-audio-dock__sub {
  margin-top: 2px;
  font-size: 12px;
  color: #667085;
}

.ws-audio-dock__player {
  flex: 0 0 380px;
  max-width: 100%;
}

.ws-audio-dock__player audio {
  width: 100%;
}

.ws-btn-hear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 999px;
}

.ws-hear-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
  color: currentColor;
}

.ws-hear-icon path {
  fill: currentColor;
}

.ws-btn-hear:disabled .ws-hear-icon {
  opacity: 1;
}
.ws-btn-hear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 999px;
  color: rgba(0,0,0,0.82);
}

.ws-btn-hear::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000000'>\
<path d='M12 3a9 9 0 0 0-9 9v3a3 3 0 0 0 3 3h2v-8H6a6 6 0 0 1 12 0h-2v8h2a3 3 0 0 0 3-3v-3a9 9 0 0 0-9-9z'/>\
<path d='M9 13h2v4H9zm4-2h2v6h-2z'/>\
</svg>");
  opacity: 0.9;
}

.ws-btn-hear[disabled]::before {
  opacity: 0.9;
}
.ws-report-language {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}

.ws-report-language__label {
  font-size: 12px;
  font-weight: 600;
  color: #6e6e73;
}

.ws-report-language__select {
  min-width: 180px;
}
@media (max-width: 780px) {
  .ws-actions {
    flex-wrap: wrap;
  }

  .ws-report-language {
    width: 100%;
    min-width: 0;
  }

  .ws-report-language__select {
    width: 100%;
    min-width: 0;
  }
}
.vc-modal.hidden { display: none; }

.vc-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.vc-modal-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 320px;
}

.vc-modal-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.vc-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 14px;
}

.vc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.vc-modal.hidden { display: none; }
.vc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.vc-input {
  width: 100%;
  box-sizing: border-box;   /* ← critical fix */
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}
.vc-modal-card {
  background: #fff;
  padding: 20px 20px 16px;
  border-radius: 12px;
  width: 320px;
  box-sizing: border-box;
}
.sb-asterisk {
  color: #d93025;
  margin-left: 2px;
  font-weight: 700;
}

.ws-scorebar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sb-break {
  flex-basis: 100%;
  height: 0;
}

.sb-k {
  white-space: nowrap;
}

.sb-pronunciation {
  min-width: 150px;
}

.sb-asterisk {
  color: #d93025;
  margin-left: 2px;
  font-weight: 700;
}

.sb-note-cell {
  flex: 1 1 340px;
  min-width: 280px;
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  font-size: 12px;
  color: #666;
  line-height: 1.25;
}