.iihapp-plugin {
  --bg: #f2efe6;
  --bg-strong: #e6e1d2;
  --panel: rgba(255, 252, 245, 0.88);
  --panel-strong: rgba(252, 247, 235, 0.96);
  --text: #1e241f;
  --muted: #465348;
  --line: rgba(28, 40, 33, 0.12);
  --gold: #ad8b3a;
  --shadow: 0 20px 48px rgba(26, 32, 23, 0.1);
  --shadow-soft: 0 10px 26px rgba(26, 32, 23, 0.08);
  --radius: 22px;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: "Segoe UI", "Helvetica Neue", sans-serif;
  --heading: #162019;
  --heading-soft: #243229;
  color: var(--text);
  font-family: var(--font-body);
}

.iihapp-plugin.theme-dark {
  --bg: #101613;
  --bg-strong: #17201c;
  --panel: rgba(22, 30, 27, 0.92);
  --panel-strong: rgba(28, 37, 33, 0.96);
  --text: #e7ede7;
  --muted: #c5d0c8;
  --line: rgba(222, 235, 226, 0.14);
  --gold: #d0af62;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  --card-text-dark: #eef5ee;
  --heading: #f2f6f2;
  --heading-soft: #e4ede5;
}

.iihapp-plugin,
.iihapp-plugin * {
  box-sizing: border-box;
}

.iihapp-plugin .app-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(173, 139, 58, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(49, 91, 69, 0.18), transparent 32%),
    linear-gradient(180deg, #f8f4ea 0%, var(--bg) 100%);
  border-radius: 24px;
  overflow: hidden;
}

.iihapp-plugin .sidebar {
  padding: 28px 22px;
  background: linear-gradient(180deg, rgba(24, 36, 29, 0.96), rgba(36, 52, 42, 0.96));
  color: #f6f1e4;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

@media (min-width: 1081px) {
  .iihapp-plugin .sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
  }
}

.iihapp-plugin .brand-logo {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 0 14px;
}

.iihapp-plugin .brand-block h1,
.iihapp-plugin .hero h2,
.iihapp-plugin .panel h2,
.iihapp-plugin #selectedDayHeading,
.iihapp-plugin .schedule-block h3,
.iihapp-plugin .exercise-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--heading);
}

.iihapp-plugin .eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--gold);
}

.iihapp-plugin .muted {
  color: var(--muted);
}

.iihapp-plugin .panel p,
.iihapp-plugin .panel label,
.iihapp-plugin .panel .small,
.iihapp-plugin .panel .result-meta,
.iihapp-plugin .panel .chart-label,
.iihapp-plugin .panel .stat-label {
  color: var(--heading-soft);
}

.iihapp-plugin .sidebar .muted {
  color: rgba(246, 241, 228, 0.78);
}

.iihapp-plugin.theme-dark .sidebar .muted {
  color: rgba(231, 237, 231, 0.78);
}

.iihapp-plugin .sidebar h2,
.iihapp-plugin .sidebar h1,
.iihapp-plugin .sidebar h3,
.iihapp-plugin .sidebar label,
.iihapp-plugin .sidebar .field span,
.iihapp-plugin .sidebar .check-row span,
.iihapp-plugin .sidebar .today-summary,
.iihapp-plugin .sidebar .today-summary * {
  color: #f5f1e6;
}

.iihapp-plugin .sidebar .panel-toggle-btn,
.iihapp-plugin .sidebar .panel-toggle-btn span:first-child,
.iihapp-plugin .sidebar .panel h2 {
  color: #fbf7ee !important;
}

.iihapp-plugin .sidebar .field small,
.iihapp-plugin .sidebar .settings-group h3,
.iihapp-plugin .sidebar #themeStatus,
.iihapp-plugin .sidebar #settingsStatus,
.iihapp-plugin .sidebar #notificationStatus,
.iihapp-plugin .sidebar #accountSyncStatus,
.iihapp-plugin .sidebar .panel-toggle-indicator {
  color: #efe6cf !important;
}

.iihapp-plugin .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.iihapp-plugin .panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(173, 139, 58, 0.75), rgba(73, 117, 92, 0.35), transparent 70%);
  pointer-events: none;
}

.iihapp-plugin .sidebar .panel {
  background: rgba(255, 248, 232, 0.08);
  border-color: rgba(255, 248, 232, 0.16);
  box-shadow: none;
}

.iihapp-plugin .panel-accent {
  background: rgba(173, 139, 58, 0.14) !important;
}

.iihapp-plugin .today-practice-panel {
  background: var(--panel-strong);
}

.iihapp-plugin .today-practice,
.iihapp-plugin .today-summary {
  display: grid;
  gap: 12px;
}

.iihapp-plugin .today-practice .today-summary-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.26);
}

.iihapp-plugin.theme-dark .today-practice .today-summary-block {
  background: rgba(255, 255, 255, 0.05);
}

.iihapp-plugin .today-plan-note {
  padding: 10px 12px;
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  background: rgba(173, 139, 58, 0.12);
  color: var(--heading-soft);
}

.iihapp-plugin .mastery-panel {
  background: rgba(255, 248, 232, 0.1) !important;
}

.iihapp-plugin .panel-header-tight {
  margin-bottom: 10px;
}

.iihapp-plugin .panel-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  color: inherit;
  padding: 0;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.iihapp-plugin .panel-toggle-btn,
.iihapp-plugin .panel-toggle-btn span:first-child {
  color: var(--heading);
}

.iihapp-plugin .panel-toggle-btn span:first-child {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.iihapp-plugin .panel-toggle-body {
  margin-top: 12px;
}

.iihapp-plugin .settings-group {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 248, 232, 0.14);
}

.iihapp-plugin .settings-group h3 {
  margin: 0;
  font-size: 1rem;
}

.iihapp-plugin .field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.iihapp-plugin .inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.iihapp-plugin .check-row {
  display: flex;
  align-items: start;
  gap: 10px;
}

.iihapp-plugin .check-row input {
  margin-top: 3px;
}

.iihapp-plugin input[type="checkbox"] {
  accent-color: #49755c;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.iihapp-plugin input,
.iihapp-plugin textarea,
.iihapp-plugin button,
.iihapp-plugin select {
  font: inherit;
}

.iihapp-plugin .field input,
.iihapp-plugin .field select,
.iihapp-plugin .search-row input,
.iihapp-plugin textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

.iihapp-plugin textarea {
  min-height: 200px;
  resize: vertical;
}

.iihapp-plugin .primary-btn,
.iihapp-plugin .ghost-btn,
.iihapp-plugin .day-card,
.iihapp-plugin .exercise-card {
  border: 0;
  cursor: pointer;
}

.iihapp-plugin .primary-btn,
.iihapp-plugin .ghost-btn {
  border-radius: 999px;
  padding: 12px 16px;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.iihapp-plugin .primary-btn {
  background: linear-gradient(135deg, #284b39, #49755c);
  color: #fff9ee;
  box-shadow: 0 10px 24px rgba(40, 75, 57, 0.2);
}

.iihapp-plugin .ghost-btn {
  background: rgba(49, 91, 69, 0.1);
  color: var(--text);
  border: 1px solid rgba(49, 91, 69, 0.12);
}

.iihapp-plugin .sidebar .ghost-btn {
  background: rgba(255, 248, 232, 0.12);
  color: #f8f3e8;
  border: 1px solid rgba(255, 248, 232, 0.2);
}

.iihapp-plugin .sidebar .ghost-btn:hover {
  background: rgba(255, 248, 232, 0.18);
}

.iihapp-plugin .theme-toggle {
  width: 100%;
  justify-content: center;
}

.iihapp-plugin.theme-dark .ghost-btn {
  background: rgba(208, 175, 98, 0.18);
  color: var(--text);
  border: 1px solid rgba(208, 175, 98, 0.28);
}

.iihapp-plugin .primary-btn:hover,
.iihapp-plugin .ghost-btn:hover,
.iihapp-plugin .exercise-card:hover,
.iihapp-plugin .day-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.iihapp-plugin .main-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  background: transparent;
}

.iihapp-plugin .hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  min-width: 0;
}

.iihapp-plugin .hero > div:first-child,
.iihapp-plugin .panel-header > div:first-child,
.iihapp-plugin .content-grid > section,
.iihapp-plugin .panel,
.iihapp-plugin .search-preview {
  min-width: 0;
}

.iihapp-plugin .hero h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.iihapp-plugin .hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 14px;
  min-width: 360px;
}

.iihapp-plugin .stat-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.iihapp-plugin .stat-label,
.iihapp-plugin .small {
  font-size: 0.88rem;
}

.iihapp-plugin .content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.iihapp-plugin .content-grid > section {
  grid-column: 1 / -1;
  width: 100%;
}

.iihapp-plugin .timer-panel {
  background:
    radial-gradient(circle at top right, rgba(173, 139, 58, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 243, 231, 0.96));
}

.iihapp-plugin .panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.iihapp-plugin .panel h2,
.iihapp-plugin .panel-toggle-btn span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.iihapp-plugin .panel.calendar-panel .panel-header h2::before { content: "\1F5D3"; }
.iihapp-plugin .panel.day-panel .panel-header h2::before { content: "\1F9ED"; }
.iihapp-plugin .panel.notes-panel .panel-header h2::before { content: "\270E"; }
.iihapp-plugin .panel.timer-panel .panel-header h2::before { content: "\23F1"; }
.iihapp-plugin .panel.progress-panel .panel-header h2::before { content: "\1F4CA"; }
.iihapp-plugin .panel.search-panel .panel-header h2::before { content: "\1F50D"; }
.iihapp-plugin .panel-accent h2::before { content: "\2600"; }
.iihapp-plugin .panel-toggle-btn span:first-child::before { content: "\2699"; }

.iihapp-plugin .step-guide-details {
  display: grid;
  gap: 14px;
}

.iihapp-plugin .step-related-list {
  display: grid;
  gap: 12px;
}

.iihapp-plugin .step-practice-sections {
  display: grid;
  gap: 12px;
}

.iihapp-plugin .step-practice-detail {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.iihapp-plugin .step-practice-detail summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--heading);
}

.iihapp-plugin .step-practice-detail summary::-webkit-details-marker {
  display: none;
}

.iihapp-plugin .step-practice-detail summary::after {
  content: '+';
  float: right;
  font-family: var(--font-body);
  font-weight: 700;
}

.iihapp-plugin .step-practice-detail[open] summary::after {
  content: '-';
}

.iihapp-plugin .step-practice-body {
  padding: 0 18px 18px;
}

.iihapp-plugin .step-practice-body p {
  margin: 0 0 12px;
  line-height: 1.65;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.iihapp-plugin .step-practice-body p:last-child {
  margin-bottom: 0;
}

.iihapp-plugin .step-practice-line {
  padding-left: 12px;
  border-left: 2px solid rgba(173, 139, 58, 0.35);
  font-weight: 600;
}

.iihapp-plugin .step-practice-item {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.iihapp-plugin .step-practice-item:last-child {
  margin-bottom: 0;
}

.iihapp-plugin .step-practice-item .step-practice-line {
  margin-bottom: 0;
}

.iihapp-plugin .book-reference-body {
  display: grid;
  gap: 12px;
}

.iihapp-plugin .book-reference-body p {
  margin: 0;
  line-height: 1.72;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.iihapp-plugin .day-panel h2,
.iihapp-plugin #selectedDayHeading {
  color: var(--heading);
}

.iihapp-plugin .step-related-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.iihapp-plugin .step-related-body {
  margin-top: 12px;
}

.iihapp-plugin .step-related-body[hidden] {
  display: none !important;
}

.iihapp-plugin.theme-dark .step-related-card {
  background: rgba(255, 255, 255, 0.05);
}

.iihapp-plugin.theme-dark .step-practice-detail {
  background: rgba(255, 255, 255, 0.05);
}

.iihapp-plugin .panel-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.iihapp-plugin .section-toggle-btn[aria-expanded="false"] {
  opacity: 0.9;
}

.iihapp-plugin .notes-panel .panel-toggle-body[hidden],
.iihapp-plugin .step-guide-panel .panel-toggle-body[hidden],
.iihapp-plugin .day-panel .panel-toggle-body[hidden],
.iihapp-plugin .timer-panel .panel-toggle-body[hidden],
.iihapp-plugin .progress-panel .panel-toggle-body[hidden] {
  display: none !important;
}

.iihapp-plugin .compact-check {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(49, 91, 69, 0.08);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.iihapp-plugin .compact-btn {
  padding: 10px 14px;
  font-size: 0.9rem;
}

.iihapp-plugin .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.iihapp-plugin .legend-item,
.iihapp-plugin .exercise-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(49, 91, 69, 0.08);
  font-size: 0.9rem;
}

.iihapp-plugin .legend-filter {
  border: 1px solid transparent;
  cursor: pointer;
}

.iihapp-plugin .legend-filter.active {
  border-color: rgba(173, 139, 58, 0.68);
  box-shadow: inset 0 0 0 1px rgba(173, 139, 58, 0.3);
}

.iihapp-plugin .legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.iihapp-plugin .calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.iihapp-plugin .focus-day-card {
  margin-bottom: 14px;
}

.iihapp-plugin .focus-day-card-inner {
  display: grid;
  gap: 12px;
  border: 2px solid var(--gold);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 34px rgba(45, 62, 50, 0.08);
}

.iihapp-plugin .focus-day-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.iihapp-plugin .focus-day-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.iihapp-plugin .day-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
  box-shadow: 0 8px 18px rgba(45, 62, 50, 0.05);
}

.iihapp-plugin .day-card,
.iihapp-plugin .day-card * {
  color: #1f2721;
}

.iihapp-plugin .day-card.active {
  outline: 2px solid var(--gold);
  transform: translateY(-2px);
}

.iihapp-plugin .day-card .day-number {
  font-weight: 700;
  font-size: 1.05rem;
}

.iihapp-plugin .day-card .step-pill {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.72);
}

.iihapp-plugin .day-details,
.iihapp-plugin .search-results,
.iihapp-plugin .today-summary,
.iihapp-plugin .exercise-grid {
  display: grid;
  gap: 14px;
}

.iihapp-plugin .today-summary {
  gap: 10px;
}

.iihapp-plugin .today-summary-block {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 248, 232, 0.16);
}

.iihapp-plugin .today-check-row {
  font-size: 0.9rem;
}

.iihapp-plugin .today-check-row strong {
  color: inherit;
}

.iihapp-plugin .schedule-block,
.iihapp-plugin .exercise-card,
.iihapp-plugin .search-result {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 18px rgba(45, 62, 50, 0.05);
}

.iihapp-plugin .exercise-grid {
  gap: 10px;
}

.iihapp-plugin .exercise-card {
  display: grid;
  gap: 12px;
}

.iihapp-plugin .compact-field {
  gap: 6px;
}

.iihapp-plugin .compact-field textarea {
  min-height: 88px;
}

.iihapp-plugin .exercise-quality-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.iihapp-plugin .star-rating-group {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.iihapp-plugin .star-rating-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #aa9a61;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 48px;
  font-size: 1rem;
  font-family: "Segoe UI Symbol", "Segoe UI", "Helvetica Neue", sans-serif;
}

.iihapp-plugin .star-rating-btn.active {
  background: rgba(197, 170, 73, 0.16);
  border-color: rgba(197, 170, 73, 0.45);
  color: #7b6514;
}

.iihapp-plugin .star-rating-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.iihapp-plugin .star-rating-label {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
}

.iihapp-plugin .star-rating-btn.active .star-rating-icon {
  fill: currentColor;
}

.iihapp-plugin .exercise-card:hover {
  border-color: rgba(49, 91, 69, 0.3);
}

.iihapp-plugin .exercise-done-row {
  justify-content: space-between;
}

.iihapp-plugin .exercise-timer-btn,
.iihapp-plugin .search-result-btn {
  justify-self: start;
}

.iihapp-plugin .remove-task-btn {
  margin-left: auto;
}

.iihapp-plugin .extra-task-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.iihapp-plugin .custom-task-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 90px 110px 120px auto;
  gap: 10px;
  margin-bottom: 8px;
}

.iihapp-plugin .focus-card-task-row {
  margin-bottom: 0;
}

.iihapp-plugin .custom-task-input,
.iihapp-plugin .custom-task-minutes,
.iihapp-plugin .custom-task-time,
.iihapp-plugin .custom-task-recurrence {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

.iihapp-plugin .timer-display {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4rem);
  text-align: center;
  line-height: 1;
  padding: 6px 16px 18px;
  margin-bottom: 6px;
}

.iihapp-plugin .timer-panel .panel-header {
  align-items: center;
}

.iihapp-plugin .timer-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 12px;
}

.iihapp-plugin .timer-panel .ghost-btn,
.iihapp-plugin .timer-panel .primary-btn {
  min-width: 72px;
}

.iihapp-plugin .timer-panel #startTimerBtn::before {
  content: "\25B6";
  margin-right: 8px;
}

.iihapp-plugin .timer-panel #pauseTimerBtn::before {
  content: "\23F8";
  margin-right: 8px;
}

.iihapp-plugin .timer-panel #resetTimerBtn::before {
  content: "\21BB";
  margin-right: 8px;
}

.iihapp-plugin .search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 16px;
}

.iihapp-plugin .search-preview {
  margin-top: 16px;
}

.iihapp-plugin .search-result-expanded {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  line-height: 1.6;
}

.iihapp-plugin .search-preview-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 18px rgba(45, 62, 50, 0.05);
}

.iihapp-plugin .source-link {
  display: inline-flex;
  margin-top: 12px;
  color: #204f39;
  font-weight: 600;
  text-decoration: none;
}

.iihapp-plugin .source-link:hover {
  text-decoration: underline;
}

.iihapp-plugin .result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.iihapp-plugin .session-row {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(49, 91, 69, 0.06);
}

.iihapp-plugin .progress-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.iihapp-plugin .progress-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 6px;
}

.iihapp-plugin .progress-card strong {
  font-size: 1.35rem;
}

.iihapp-plugin .chart-wrapper {
  overflow-x: auto;
}

.iihapp-plugin .progress-chart {
  display: grid;
  grid-template-columns: repeat(14, minmax(54px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 180px;
}

.iihapp-plugin .chart-col {
  display: grid;
  gap: 8px;
  align-items: end;
}

.iihapp-plugin .chart-col-btn {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: inherit;
  cursor: pointer;
  border-radius: 18px;
}

.iihapp-plugin .chart-col-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.iihapp-plugin .chart-col-btn.active .chart-bar-wrap {
  box-shadow: inset 0 0 0 2px rgba(173, 139, 58, 0.45);
}

.iihapp-plugin .chart-col-btn:hover .chart-bar-wrap {
  border-color: rgba(49, 91, 69, 0.3);
}

.iihapp-plugin .chart-bar-wrap {
  height: 140px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(49, 91, 69, 0.06);
  display: flex;
  align-items: end;
  padding: 8px;
}

.iihapp-plugin .chart-bar {
  width: 100%;
  border-radius: 10px;
  min-height: 8px;
}

.iihapp-plugin .chart-label {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.iihapp-plugin .progress-panel .chart-wrapper {
  overflow-x: auto;
  padding-bottom: 4px;
}

.iihapp-plugin .page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 6px 4px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.iihapp-plugin .page-footer p {
  margin: 0;
}

.iihapp-plugin.calendar-collapsed .calendarLegend,
.iihapp-plugin.calendar-collapsed #calendarLegend,
.iihapp-plugin.calendar-collapsed .calendar-grid,
.iihapp-plugin.calendar-collapsed #calendarGrid {
  display: none;
}

.iihapp-plugin mark {
  background: rgba(173, 139, 58, 0.28);
  padding: 0 2px;
}

.iihapp-plugin.theme-dark .day-card,
.iihapp-plugin.theme-dark .schedule-block,
.iihapp-plugin.theme-dark .exercise-card,
.iihapp-plugin.theme-dark .search-result,
.iihapp-plugin.theme-dark .session-row,
.iihapp-plugin.theme-dark .progress-card,
.iihapp-plugin.theme-dark .focus-day-card-inner,
.iihapp-plugin.theme-dark .field input,
.iihapp-plugin.theme-dark .field select,
.iihapp-plugin.theme-dark .search-row input,
.iihapp-plugin.theme-dark .custom-task-input,
.iihapp-plugin.theme-dark .custom-task-minutes,
.iihapp-plugin.theme-dark textarea,
.iihapp-plugin.theme-dark .stat-card {
  color: var(--text);
  background: rgba(25, 34, 30, 0.92);
}

.iihapp-plugin.theme-dark .panel p,
.iihapp-plugin.theme-dark .panel label,
.iihapp-plugin.theme-dark .panel .small,
.iihapp-plugin.theme-dark .panel .result-meta,
.iihapp-plugin.theme-dark .panel .chart-label,
.iihapp-plugin.theme-dark .panel .stat-label,
.iihapp-plugin.theme-dark .panel-toggle-btn,
.iihapp-plugin.theme-dark .panel-toggle-btn span:first-child {
  color: var(--heading-soft);
}

.iihapp-plugin.theme-dark .sidebar h1,
.iihapp-plugin.theme-dark .sidebar h2,
.iihapp-plugin.theme-dark .sidebar h3,
.iihapp-plugin.theme-dark .sidebar .panel-toggle-btn,
.iihapp-plugin.theme-dark .sidebar .panel-toggle-btn span:first-child,
.iihapp-plugin.theme-dark .sidebar .settings-group h3,
.iihapp-plugin.theme-dark .sidebar .panel h2,
.iihapp-plugin.theme-dark .sidebar label,
.iihapp-plugin.theme-dark .sidebar .field span,
.iihapp-plugin.theme-dark .sidebar .check-row span,
.iihapp-plugin.theme-dark .sidebar .muted,
.iihapp-plugin.theme-dark .sidebar .theme-toggle {
  color: #f4f8f4 !important;
}

.iihapp-plugin.theme-dark .sidebar .field small,
.iihapp-plugin.theme-dark .sidebar #themeStatus,
.iihapp-plugin.theme-dark .sidebar #settingsStatus,
.iihapp-plugin.theme-dark .sidebar #notificationStatus,
.iihapp-plugin.theme-dark .sidebar #accountSyncStatus,
.iihapp-plugin.theme-dark .sidebar .panel-toggle-indicator {
  color: #e7efe8 !important;
}

.iihapp-plugin.theme-dark .main-content {
  background:
    radial-gradient(circle at top right, rgba(208, 175, 98, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(14, 20, 18, 0.98), rgba(18, 25, 22, 0.98));
}

.iihapp-plugin.theme-dark .timer-panel {
  background:
    radial-gradient(circle at top right, rgba(208, 175, 98, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(22, 30, 27, 0.98), rgba(18, 25, 22, 0.98));
}

.iihapp-plugin.theme-dark .day-card {
  color: var(--card-text-dark);
  border-color: rgba(238, 245, 238, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.iihapp-plugin.theme-dark .day-card *,
.iihapp-plugin.theme-dark .day-card .small,
.iihapp-plugin.theme-dark .day-card .day-number {
  color: var(--card-text-dark);
}

.iihapp-plugin.theme-dark .day-card .step-pill,
.iihapp-plugin.theme-dark .legend-item,
.iihapp-plugin.theme-dark .exercise-chip,
.iihapp-plugin.theme-dark .search-preview-card {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.iihapp-plugin.theme-dark .day-panel h2,
.iihapp-plugin.theme-dark #selectedDayHeading,
.iihapp-plugin.theme-dark .focus-day-card-inner h3,
.iihapp-plugin.theme-dark .focus-day-card-inner p,
.iihapp-plugin.theme-dark .focus-day-card-inner .result-meta,
.iihapp-plugin.theme-dark .focus-day-card-inner .step-pill {
  color: var(--text) !important;
}

.iihapp-plugin.theme-dark .panel.calendar-panel .panel-header h2::before,
.iihapp-plugin.theme-dark .panel.day-panel .panel-header h2::before,
.iihapp-plugin.theme-dark .panel.notes-panel .panel-header h2::before,
.iihapp-plugin.theme-dark .panel.timer-panel .panel-header h2::before,
.iihapp-plugin.theme-dark .panel.progress-panel .panel-header h2::before,
.iihapp-plugin.theme-dark .panel.search-panel .panel-header h2::before,
.iihapp-plugin.theme-dark .panel-accent h2::before,
.iihapp-plugin.theme-dark .panel-toggle-btn span:first-child::before {
  background: rgba(255, 255, 255, 0.1);
  color: #e7ede7;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.iihapp-plugin.theme-dark .compact-check,
.iihapp-plugin.theme-dark .legend-filter.active {
  border-color: rgba(208, 175, 98, 0.28);
}

.iihapp-plugin.theme-dark .source-link {
  color: #d8c27e;
}

.iihapp-plugin.theme-dark .timer-display {
  color: var(--text);
}

.iihapp-plugin.theme-dark .chart-bar-wrap {
  background: rgba(255, 255, 255, 0.04);
}

.iihapp-plugin.theme-dark .star-rating-btn {
  background: rgba(20, 27, 22, 0.92);
  border-color: rgba(213, 224, 195, 0.16);
  color: #c5af67;
}

.iihapp-plugin.theme-dark .star-rating-btn.active {
  background: rgba(197, 175, 103, 0.18);
  border-color: rgba(197, 175, 103, 0.45);
  color: #f3df9f;
}

.iihapp-plugin.theme-dark .panel-accent {
  background: rgba(208, 175, 98, 0.12) !important;
}

.iihapp-plugin.theme-dark .page-footer {
  color: var(--muted);
}

@media (max-width: 1080px) {
  .iihapp-plugin .app-shell {
    grid-template-columns: 1fr;
  }

  .iihapp-plugin .hero,
  .iihapp-plugin .content-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .iihapp-plugin .hero-stat-grid {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .iihapp-plugin .main-content,
  .iihapp-plugin .sidebar {
    padding: 18px;
  }

  .iihapp-plugin .hero h2,
  .iihapp-plugin .brand-block h1 {
    font-size: clamp(1.7rem, 8vw, 2.35rem);
  }

  .iihapp-plugin .panel-header,
  .iihapp-plugin .panel-header-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .iihapp-plugin .panel-header-actions {
    justify-content: stretch;
  }

  .iihapp-plugin .panel-header-actions .compact-btn,
  .iihapp-plugin .panel-header-actions .muted {
    width: 100%;
  }

  .iihapp-plugin .calendar-grid {
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  }

  .iihapp-plugin .search-row {
    grid-template-columns: 1fr;
  }

  .iihapp-plugin .custom-task-row {
    grid-template-columns: 1fr;
  }

  .iihapp-plugin .page-footer {
    flex-direction: column;
  }

  .iihapp-plugin .progress-stats {
    grid-template-columns: 1fr;
  }

  .iihapp-plugin .day-card {
    min-height: 104px;
    padding: 12px;
  }

  .iihapp-plugin .day-card .day-number {
    font-size: 0.95rem;
  }
}

/* 1.4.4 app-style refresh */
.iihapp-plugin {
  --bg: #f7f7fb;
  --bg-strong: #ece8f4;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --text: #1f2230;
  --muted: #62677b;
  --line: rgba(58, 35, 84, 0.12);
  --gold: #b48a2c;
  --purple: #4f116f;
  --purple-strong: #2f073f;
  --accent: #7b1fa2;
  --shadow: 0 18px 44px rgba(31, 34, 48, 0.09);
  --shadow-soft: 0 10px 26px rgba(31, 34, 48, 0.08);
  --radius: 8px;
  --font-display: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --heading: #171827;
  --heading-soft: #35384c;
}

.iihapp-plugin.theme-dark {
  --bg: #111018;
  --bg-strong: #181520;
  --panel: rgba(26, 24, 36, 0.94);
  --panel-strong: rgba(32, 29, 43, 0.98);
  --text: #f1edf5;
  --muted: #c7becf;
  --line: rgba(239, 229, 247, 0.13);
  --gold: #d7b25c;
  --purple: #c084fc;
  --purple-strong: #f3e8ff;
  --accent: #d946ef;
  --heading: #fffaff;
  --heading-soft: #ebe0f1;
}

.iihapp-plugin .app-shell {
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(79, 17, 111, 0.07), transparent 34%),
    linear-gradient(180deg, #fbfaff 0%, var(--bg) 100%);
  border: 1px solid rgba(58, 35, 84, 0.08);
}

.iihapp-plugin .sidebar {
  background:
    linear-gradient(180deg, rgba(47, 7, 63, 0.96), rgba(24, 18, 32, 0.98));
  gap: 16px;
  padding: 22px;
}

.iihapp-plugin .brand-block {
  display: grid;
  gap: 10px;
}

.iihapp-plugin .brand-logo {
  width: 100%;
  max-width: 300px;
  padding: 14px 16px;
  margin: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.iihapp-plugin .brand-block h1 {
  font-size: 1.72rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.iihapp-plugin .brand-block .muted {
  line-height: 1.55;
}

.iihapp-plugin .main-content {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 247, 251, 0.88));
}

.iihapp-plugin.theme-dark .main-content {
  background:
    linear-gradient(180deg, rgba(17, 16, 24, 0.98), rgba(24, 21, 32, 0.98));
}

.iihapp-plugin .hero {
  align-items: stretch;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 253, 0.92));
  box-shadow: var(--shadow-soft);
}

.iihapp-plugin.theme-dark .hero {
  background: linear-gradient(135deg, rgba(32, 29, 43, 0.98), rgba(24, 21, 32, 0.98));
}

.iihapp-plugin .hero h2 {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.iihapp-plugin .panel,
.iihapp-plugin .stat-card,
.iihapp-plugin .day-card,
.iihapp-plugin .schedule-block,
.iihapp-plugin .exercise-card,
.iihapp-plugin .search-result,
.iihapp-plugin .search-preview-card,
.iihapp-plugin .progress-card,
.iihapp-plugin .focus-day-card-inner,
.iihapp-plugin .step-related-card,
.iihapp-plugin .step-practice-detail {
  border-radius: 8px;
}

.iihapp-plugin .panel {
  padding: 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.iihapp-plugin .panel::before {
  background: linear-gradient(90deg, var(--purple), var(--gold), transparent 72%);
}

.iihapp-plugin .sidebar .panel {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.13);
}

.iihapp-plugin .today-practice-panel {
  border-color: rgba(123, 31, 162, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 246, 255, 0.96));
}

.iihapp-plugin.theme-dark .today-practice-panel {
  background:
    linear-gradient(135deg, rgba(36, 29, 48, 0.98), rgba(28, 24, 38, 0.98));
}

.iihapp-plugin .mastery-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.055)) !important;
}

.iihapp-plugin .panel-toggle-body[hidden] {
  display: none !important;
}

.iihapp-plugin .collapsible-panel {
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.iihapp-plugin .collapsible-panel.is-expanded {
  border-color: rgba(123, 31, 162, 0.22);
}

.iihapp-plugin .panel-toggle-btn {
  min-height: 36px;
}

.iihapp-plugin .panel-toggle-indicator,
.iihapp-plugin .section-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.iihapp-plugin .panel-toggle-indicator {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.iihapp-plugin .section-toggle-btn {
  min-width: 92px;
}

.iihapp-plugin .section-toggle-btn.is-open {
  background: rgba(123, 31, 162, 0.13);
  border-color: rgba(123, 31, 162, 0.22);
}

.iihapp-plugin .primary-btn,
.iihapp-plugin .ghost-btn,
.iihapp-plugin .field input,
.iihapp-plugin .field select,
.iihapp-plugin .search-row input,
.iihapp-plugin textarea,
.iihapp-plugin .custom-task-input,
.iihapp-plugin .custom-task-minutes,
.iihapp-plugin .custom-task-time,
.iihapp-plugin .custom-task-recurrence,
.iihapp-plugin .compact-check,
.iihapp-plugin .legend-item,
.iihapp-plugin .exercise-chip,
.iihapp-plugin .session-row,
.iihapp-plugin .star-rating-btn {
  border-radius: 8px;
}

.iihapp-plugin .primary-btn {
  background: linear-gradient(135deg, var(--purple), #7b1fa2);
  box-shadow: 0 10px 24px rgba(79, 17, 111, 0.22);
}

.iihapp-plugin .ghost-btn {
  background: rgba(79, 17, 111, 0.07);
  border-color: rgba(79, 17, 111, 0.13);
}

.iihapp-plugin .primary-btn:focus-visible,
.iihapp-plugin .ghost-btn:focus-visible,
.iihapp-plugin .panel-toggle-btn:focus-visible,
.iihapp-plugin input:focus-visible,
.iihapp-plugin select:focus-visible,
.iihapp-plugin textarea:focus-visible {
  outline: 3px solid rgba(180, 138, 44, 0.34);
  outline-offset: 2px;
}

.iihapp-plugin .panel.calendar-panel .panel-header h2::before,
.iihapp-plugin .panel.day-panel .panel-header h2::before,
.iihapp-plugin .panel.notes-panel .panel-header h2::before,
.iihapp-plugin .panel.timer-panel .panel-header h2::before,
.iihapp-plugin .panel.progress-panel .panel-header h2::before,
.iihapp-plugin .panel.search-panel .panel-header h2::before,
.iihapp-plugin .panel-accent h2::before,
.iihapp-plugin .panel-toggle-btn span:first-child::before {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 17, 111, 0.09);
  color: var(--purple);
  font-family: "Segoe UI Symbol", "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.iihapp-plugin .sidebar .panel-toggle-btn span:first-child::before,
.iihapp-plugin .sidebar .panel-accent h2::before {
  background: rgba(255, 255, 255, 0.11);
  color: #fff7ea;
}

.iihapp-plugin .panel-header {
  align-items: center;
}

.iihapp-plugin .hero-stat-grid {
  grid-template-columns: repeat(3, minmax(110px, 1fr));
}

.iihapp-plugin .stat-card strong,
.iihapp-plugin .progress-card strong {
  color: var(--purple-strong);
}

.iihapp-plugin.theme-dark .stat-card strong,
.iihapp-plugin.theme-dark .progress-card strong {
  color: var(--purple-strong);
}

.iihapp-plugin .calendar-grid {
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
}

.iihapp-plugin .day-card.active {
  outline-color: var(--accent);
}

.iihapp-plugin .page-footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

@media (max-width: 1080px) {
  .iihapp-plugin .app-shell {
    grid-template-columns: 1fr;
  }

  .iihapp-plugin .brand-logo {
    max-width: 360px;
  }
}

@media (max-width: 720px) {
  .iihapp-plugin .app-shell {
    border-radius: 0;
  }

  .iihapp-plugin .hero {
    padding: 16px;
  }

  .iihapp-plugin .hero-stat-grid {
    grid-template-columns: 1fr;
  }

  .iihapp-plugin .brand-logo {
    max-width: 100%;
  }
}
