:root {
  --ink: #132033;
  --muted: #657287;
  --line: #dfe7f1;
  --line-strong: #cad7e8;
  --soft: #f6f9fd;
  --blue: #1267d8;
  --teal: #1295ad;
  --green: #33a852;
  --purple: #7a4fd0;
  --orange: #f28c18;
  --pink: #df3d72;
  --shadow: 0 10px 28px rgba(20, 33, 54, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: 100%;
  margin: 0 auto;
  padding: 0 0 44px;
}

.hero {
  position: relative;
  min-height: auto;
  padding: 0 0 8px;
  overflow: hidden;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2.15rem, 4vw, 3.25rem);
  line-height: 1.05;
}

.hero p {
  margin: 0;
  color: #3d4a5d;
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 760px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
}

.hero-tagline {
  order: 1;
}

.hero-choices {
  order: 2;
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  min-width: 0;
  padding: 2px 2px 5px;
  scrollbar-width: none;
}

.choice-scroller {
  position: relative;
  min-width: 0;
}

.choice-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(18, 149, 173, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--teal);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(20, 33, 54, 0.12);
  transform: translateY(-50%);
}

.choice-arrow[hidden] {
  display: none !important;
}

.choice-arrow--left {
  left: 0;
}

.choice-arrow--right {
  right: 0;
}

.choice-arrow svg {
  width: 18px;
  height: 18px;
}

.choice-row::-webkit-scrollbar {
  display: none;
}

.choice-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid color-mix(in srgb, var(--choice-color, var(--teal)) 28%, #dfe7f1);
  border-radius: 999px;
  background: color-mix(in srgb, var(--choice-color, var(--teal)) 7%, #fff);
  color: var(--choice-color, var(--teal));
  font-weight: 850;
  white-space: nowrap;
}

.choice-pill svg {
  width: 19px;
  height: 19px;
}

.choice-pill.is-active {
  border-color: var(--choice-color, var(--teal));
  background: linear-gradient(135deg, var(--choice-color, var(--teal)), color-mix(in srgb, var(--choice-color, var(--teal)) 78%, #fff));
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--choice-color, var(--teal)) 24%, transparent);
}

.choice-row--levels .choice-pill {
  min-height: 34px;
  padding: 6px 12px;
  color: var(--ink);
}

.choice-row--levels .choice-pill.is-active {
  color: #fff;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 10px 0 24px;
}

.quick-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 102px;
  padding: 18px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 7px 20px rgba(22, 32, 51, 0.045);
}

.quick-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.quick-card--blue { background: linear-gradient(135deg, rgba(18, 103, 216, 0.08), #fff); }
.quick-card--green { background: linear-gradient(135deg, rgba(51, 168, 82, 0.08), #fff); }
.quick-card--purple { background: linear-gradient(135deg, rgba(122, 79, 208, 0.08), #fff); }
.quick-card--red { background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), #fff); }

.quick-card__icon,
.section-kicker,
.mini-panel__title span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: rgba(18, 149, 173, 0.1);
  color: var(--teal);
}

.quick-card--blue .quick-card__icon { background: rgba(18, 103, 216, 0.1); color: var(--blue); }
.quick-card--green .quick-card__icon { background: rgba(51, 168, 82, 0.1); color: var(--green); }
.quick-card--purple .quick-card__icon { background: rgba(122, 79, 208, 0.1); color: var(--purple); }
.quick-card--red .quick-card__icon { background: rgba(239, 68, 68, 0.1); color: #d11d3f; }

.quick-card strong {
  display: block;
  font-size: 1.02rem;
  line-height: 1.2;
}

.quick-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.quick-card svg,
.section-kicker svg,
.mini-panel__title svg,
.program-card svg,
.ghost-button svg {
  width: 22px;
  height: 22px;
}

.panel,
.mini-panel {
  border: 1px solid #e5ebf3;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel__head > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel h2 {
  margin: 0;
  font-size: clamp(1.22rem, 2.2vw, 1.65rem);
  line-height: 1.15;
}

.panel-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.toolbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: #f1f5fa;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #526174;
  font-weight: 800;
}

.tab svg {
  width: 17px;
  height: 17px;
}

.tab.is-active {
  background: #fff;
  color: var(--purple);
  box-shadow: 0 3px 12px rgba(20, 33, 54, 0.08);
}

@media (max-width: 768px) {
  .toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    gap: 3px;
  }

  .tabs .tab {
    min-width: 0;
    max-width: 100%;
    padding: 5px 2px;
    font-size: clamp(0.41rem, 1.35vw, 0.56rem);
    gap: 3px;
    overflow: hidden;
  }

  .tabs .tab .tab__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tabs .tab.is-active {
    min-width: 0;
  }

  .tabs .tab.is-active .tab__label {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: 10px;
}

.filters label,
.editor-settings label {
  display: grid;
  gap: 6px;
  color: #526174;
  font-size: 0.78rem;
  font-weight: 800;
}

.filters input,
.filters select,
.editor-settings input,
.editor-settings select,
.editor-settings textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  outline: 0;
}

.picker-field {
  display: grid;
  gap: 6px;
  color: #526174;
  font-size: 0.78rem;
  font-weight: 800;
}

.icon-picker,
.mini-icon-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.icon-choice {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #dfe7f1;
  border-radius: 13px;
  background: #fff;
  color: #526174;
}

.icon-choice svg {
  width: 21px;
  height: 21px;
}

.icon-choice.is-active {
  border-color: var(--teal);
  background: rgba(18, 149, 173, 0.1);
  color: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 149, 173, 0.1);
}

.mini-icon-picker {
  gap: 4px;
}

.mini-icon-picker .icon-choice {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.mini-icon-picker .icon-choice svg {
  width: 17px;
  height: 17px;
}

.color-control {
  position: relative;
  display: grid;
  grid-template-columns: auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #dfe7f1;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.color-control input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  cursor: pointer;
}

.color-dot {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 10px;
  background: var(--picked-color, var(--teal));
  box-shadow: none;
}

.color-control--small {
  justify-self: start;
  grid-template-columns: auto;
  min-height: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

.icon-picker:not(.is-open) .icon-choice:not(.is-active),
.mini-icon-picker:not(.is-open) .icon-choice:not(.is-active) {
  display: none;
}

.icon-picker.is-open,
.mini-icon-picker.is-open {
  padding: 6px;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 33, 54, 0.08);
}

.color-control--small .color-dot {
  width: 22px;
  height: 22px;
}

.filters input:focus,
.filters select:focus,
.editor-settings input:focus,
.editor-settings select:focus,
.editor-settings textarea:focus,
.builder-table input:focus,
.builder-table textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 149, 173, 0.12);
}

.cards-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.load-more-button {
  min-width: min(100%, 260px);
  justify-content: center;
}

.program-card {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--card-color, var(--teal)) 22%, #dfe7f1);
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--card-color, var(--teal)) 8%, #fff), #fff 68%);
  box-shadow: 0 6px 16px rgba(20, 33, 54, 0.045);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.program-card:hover,
.program-card:focus-visible {
  border-color: color-mix(in srgb, var(--card-color, var(--teal)) 42%, #dfe7f1);
  box-shadow: 0 12px 28px rgba(20, 33, 54, 0.09);
  transform: translateY(-1px);
  outline: 0;
}

.program-card__delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #fecaca;
  border-radius: 50%;
  background: #fff7f7;
  color: #e11d48;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.program-card__delete svg {
  width: 14px;
  height: 14px;
  color: #e11d48;
  stroke: #e11d48;
  stroke-width: 2.4;
}

.program-card__delete:hover {
  border-color: #fb7185;
  background: #e11d48;
  color: #fff;
  box-shadow: 0 7px 16px rgba(225, 29, 72, 0.22);
  transform: translateY(-1px);
}

.program-card__delete:hover svg {
  color: #fff;
  stroke: #fff;
}

.program-card__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
}

.program-card__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: var(--card-color, var(--teal));
  color: #fff;
}

.program-card__meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-color, var(--teal)) 12%, #fff);
  color: var(--card-color, var(--teal));
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.program-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.program-card__author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding-top: 2px;
  color: #526174;
  font-size: 0.86rem;
}

.program-card__author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #edf2f7;
}

.program-card__description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  color: #526174;
  font-size: 0.84rem;
  line-height: 1.42;
}

.program-card__stats {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  color: #526174;
  font-size: 0.82rem;
}

.metric-chip,
.program-card .rating-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid #e5ebf3;
  border-radius: 999px;
  background: #fff;
  color: #526174;
  font-size: 0.78rem;
  font-weight: 850;
}

.metric-chip svg,
.program-card .rating-chip svg {
  width: 14px;
  height: 14px;
}

.program-card .rating-chip__star,
.rating-chip__star {
  color: #f0a91f;
}

.metric-chip--detail {
  min-height: 30px;
  padding: 5px 12px;
  border-color: color-mix(in srgb, var(--card-color, var(--teal)) 16%, #e5ebf3);
  background: color-mix(in srgb, var(--card-color, var(--teal)) 7%, #fff);
  color: #526174;
}

.favorite-chip {
  border-color: color-mix(in srgb, #e5e7eb 72%, #dbe3ee);
}

.favorite-chip.is-active {
  border-color: color-mix(in srgb, #ef4444 25%, #f3b6b6);
  background: color-mix(in srgb, #ef4444 11%, #fff);
  color: #d11d3f;
}

.favorite-chip svg {
  width: 14px;
  height: 14px;
}

.favorite-chip.is-active svg {
  color: #d11d3f;
  fill: currentColor;
}

.program-card--compact {
  min-height: 0;
  padding: 14px;
}

.program-card--compact .program-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
}

.program-card__badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef8f2;
  color: #238049;
  font-size: 0.74rem;
  font-weight: 800;
}

.primary-button,
.success-button,
.soft-button,
.danger-button,
.ghost-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 13px;
  font-weight: 850;
  text-decoration: none;
}

.primary-button {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}

.success-button {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}

.soft-button,
.outline-button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.danger-button {
  gap: 7px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.ai-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #f9a8d4;
  border-radius: 13px;
  background: #fce7f3;
  color: #9d174d;
  font-weight: 850;
}

.ai-button__emoji {
  font-size: 1.08rem;
  line-height: 1;
}

.ai-button:hover,
.ai-button:focus-visible {
  border-color: #f472b6;
  background: #fbcfe8;
  color: #831843;
}

.ai-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.danger-button svg {
  width: 18px;
  height: 18px;
}

.ghost-button {
  border: 1px solid rgba(122, 79, 208, 0.34);
  background: rgba(122, 79, 208, 0.06);
  color: var(--purple);
}

.soft-button--full {
  width: 100%;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.mini-panel {
  padding: 16px;
}

.mini-panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mini-panel [data-list] {
  display: grid;
  gap: 12px;
}

.mini-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid #edf2f7;
}

.mini-row:first-child {
  border-top: 0;
}

.rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(242, 140, 24, 0.16);
  color: var(--orange);
  font-weight: 900;
}

.mini-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.mini-row small {
  color: var(--muted);
}

.editor-panel,
.mine-panel {
  margin-top: 16px;
}

body.editor-open {
  overflow: hidden;
}

body.editor-open .editor-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: #f7fafc;
  box-shadow: none;
  overflow: hidden;
}

.detail-page {
  margin-top: 16px;
}

.community-view {
  overflow: hidden;
  border: 1px solid #e8edf4;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 32, 51, 0.08);
}

.community-view__head {
  display: grid;
  gap: 18px;
  padding: 28px 32px 22px;
}

.community-view__title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.community-view__title h2 {
  margin: 0;
  color: #0d2038;
  font-size: clamp(2rem, 4vw, 3.05rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0;
}

.program-ref {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 16px;
  border: 1px solid rgba(18, 149, 173, 0.35);
  border-radius: 999px;
  background: #fff;
  color: #0f7890;
  font-size: 0.95rem;
  font-weight: 850;
}

.community-view__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.community-view__description {
  margin: 0;
  max-width: 900px;
  color: #607089;
  font-size: 1.04rem;
  line-height: 1.52;
}

.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #33445c;
  font-weight: 850;
}

.detail-rating-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #607089;
}

.rating-chip__star {
  color: #f0a91f;
}

.detail-rating-separator,
.detail-rate-label {
  color: #607089;
  font-weight: 700;
}

.annotation-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid rgba(18, 149, 173, 0.38);
  border-radius: 999px;
  background: #fff;
  color: var(--teal);
  font-size: 0.84rem;
  font-weight: 850;
  cursor: pointer;
}

.annotation-chip svg {
  width: 16px;
  height: 16px;
}

.annotation-chip:hover {
  border-color: var(--teal);
  background: #e7f8fd;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  margin: 10px 28px 26px;
  border: 1px solid #e1e6ee;
  border-radius: 14px;
  background: #f8fafc;
  box-shadow: 0 1px 6px rgba(22, 32, 51, 0.035);
}

.action-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  gap: 4px;
  min-height: 42px;
  padding: 22px 10px 6px;
  border: 0;
  background: transparent;
  color: #111827;
  font-weight: 800;
  font-size: 0.9rem;
}

.action-button + .action-button {
  border-left: 1px solid #e7ebf1;
}

.action-button:hover {
  color: var(--teal);
}

.action-button svg {
  position: absolute;
  top: -17px;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 1px solid #e1e6ee;
  border-radius: 50%;
  background: #fff;
  color: #111827;
  box-shadow: 0 2px 6px rgba(22, 32, 51, 0.05);
}

.period-tabs {
  display: grid;
  grid-template-columns: repeat(var(--period-count, 5), minmax(0, 1fr));
  width: calc(100% - 56px);
  margin: 0 28px 26px;
  border-radius: 999px;
  background: #f8fafc;
  overflow: hidden;
}

.period-tab {
  position: relative;
  min-width: 0;
  min-height: 50px;
  padding: 0;
  border: 0;
  background: color-mix(in srgb, var(--period-color, var(--teal)) 10%, #fff);
  color: var(--period-color, var(--teal));
  font-weight: 850;
  white-space: nowrap;
}

.period-tab span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 50px;
  padding: 10px 8px;
}

.period-tab.is-active {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--period-prev) 10%, #fff) 0 50%,
    color-mix(in srgb, var(--period-next) 10%, #fff) 50% 100%
  );
  color: #fff;
}

.period-tab.is-active span {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--period-color, var(--teal)), color-mix(in srgb, var(--period-color, var(--teal)) 76%, #fff));
}

.screen-row {
  display: block;
  margin: 0 28px 16px;
  border: 1px solid color-mix(in srgb, var(--row-color, var(--teal)) 22%, #e6ebf2);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 7px 18px rgba(22, 32, 51, 0.045);
}

.screen-row:last-child {
  margin-bottom: 28px;
}

.screen-row__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  color: var(--row-color, var(--teal));
  background: color-mix(in srgb, var(--row-color, var(--teal)) 14%, #fff);
  border-bottom: 1px solid color-mix(in srgb, var(--row-color, var(--teal)) 20%, #e6ebf2);
  text-align: left;
}

.screen-row__body {
  min-height: 104px;
  padding: 24px 28px;
  font-size: 1.08rem;
  background: color-mix(in srgb, var(--row-color, var(--teal)) 5%, #fff);
}

.screen-row__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 28px;
  padding: 6px 12px;
  background: color-mix(in srgb, var(--row-color, var(--teal)) 14%, #fff);
  border-top: 1px solid color-mix(in srgb, var(--row-color, var(--teal)) 15%, #e6ebf2);
}

.screen-row__footer a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  color: color-mix(in srgb, var(--row-color, var(--teal)) 86%, #102033);
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
}

.screen-row__footer svg {
  width: 15px;
  height: 15px;
}

.row-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--row-color, var(--teal)) 13%, #fff);
}

.row-icon svg {
  width: 20px;
  height: 20px;
}

.row-label {
  font-weight: 900;
}

.row-toggle {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--row-color, var(--teal));
}

.row-toggle svg {
  width: 18px;
  height: 18px;
}

.screen-row.is-collapsed .screen-row__body,
.screen-row.is-collapsed .screen-row__footer {
  display: none;
}

.screen-row.is-collapsed .row-toggle svg {
  transform: rotate(180deg);
}

.screen-cell {
  display: none;
}

.screen-cell.is-active {
  display: block;
}

.screen-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.screen-list__item,
.single {
  position: relative;
  padding-left: 17px;
  line-height: 1.45;
  white-space: pre-line;
}

.screen-list__item::before,
.single::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--row-color, var(--teal));
  font-weight: 900;
}

.comments-panel {
  margin: 4px 28px 28px;
  padding: 18px;
  border: 1px solid #e3e8f0;
  border-radius: 22px;
  background: #fbfdff;
}

.comments-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.comments-panel__head h3 {
  margin: 0;
  font-size: 1.08rem;
}

.comments-panel__head span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.comment-form textarea {
  width: 100%;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  resize: vertical;
  outline: 0;
}

.comment-list {
  display: grid;
  gap: 10px;
}

.comment-card {
  padding: 12px;
  border: 1px solid #e8eef6;
  border-radius: 16px;
  background: #fff;
}

.comment-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.comment-delete {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #f1c8c8;
  border-radius: 999px;
  background: #fff7f7;
  color: #b42318;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.comment-delete svg {
  width: 14px;
  height: 14px;
}

.comment-delete:hover {
  background: #feecec;
  border-color: #e58b8b;
}

.comment-card p {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.5;
}

.community-back {
  justify-self: start;
}

.panel__head--editor {
  align-items: flex-start;
}

body.editor-open .panel__head--editor {
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #e5ebf3;
  border-radius: 14px;
  background: #fff;
}

body.editor-open .panel__head--editor h2 {
  font-size: 1.18rem;
}

.editor-close {
  margin-left: auto;
  width: 40px;
  height: 40px;
  padding: 0;
}

.editor-close:hover,
.editor-close:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 149, 173, 0.12);
}

.editor-close svg {
  width: 18px;
  height: 18px;
}

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

.save-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid rgba(51, 168, 82, 0.24);
  border-radius: 999px;
  background: rgba(51, 168, 82, 0.1);
  color: #15803d;
  font-size: 0.86rem;
  font-weight: 850;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
}

body.editor-open .editor-layout {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.editor-settings {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) minmax(240px, 1.35fr) minmax(190px, 0.9fr) minmax(105px, 0.45fr) minmax(170px, 0.75fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e7edf5;
  border-radius: 18px;
  background: #fbfdff;
}

body.editor-open .editor-settings {
  max-height: 28vh;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  overflow: auto;
}

body.editor-open .editor-settings textarea {
  min-height: 40px;
  max-height: 68px;
  resize: vertical;
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.level-checks {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 7px;
}

.level-checks legend {
  padding: 0;
  color: #526174;
  font-size: 0.78rem;
  font-weight: 700;
}

.level-checks__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.level-check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.level-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.level-check:has(input:checked) {
  border-color: var(--teal);
  background: rgba(18, 149, 173, 0.1);
  color: var(--teal-dark);
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.table-builder {
  min-width: 0;
}

body.editor-open .table-builder {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.builder-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.builder-scroll {
  overflow: auto;
  border: 1px solid #e7edf5;
  border-radius: 18px;
  background: #fff;
}

body.editor-open .builder-scroll {
  min-height: 0;
  border-radius: 14px;
  height: 100%;
}

.builder-table {
  width: 100%;
  min-width: 880px;
  border-collapse: separate;
  border-spacing: 10px;
}

.builder-table th,
.builder-table td {
  vertical-align: top;
}

.builder-table th {
  min-width: 190px;
}

.builder-table th:first-child {
  width: 150px;
  min-width: 150px;
}

.builder-card {
  display: grid;
  gap: 7px;
  min-height: 96px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--cell-color, var(--teal)) 24%, #dfe7f1);
  border-radius: 15px;
  background: color-mix(in srgb, var(--cell-color, var(--teal)) 7%, #fff);
}

.builder-card input:not([type="color"]),
.builder-card select,
.builder-card textarea {
  width: 100%;
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  outline: 0;
}

.builder-card textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.45;
}

.builder-mini-row {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 6px;
  align-items: center;
}

.builder-title-row {
  margin-top: 8px;
}

.builder-title-row input[type="text"] {
  min-width: 0;
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  font-size: 0.86rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  background: #fff;
  color: #526174;
}

.empty-state {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 160px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.empty-state--create {
  width: 100%;
  padding: 22px;
  background: color-mix(in srgb, var(--teal) 5%, #fff);
  cursor: pointer;
}

.empty-state--create:hover,
.empty-state--create:focus-visible {
  border-color: var(--teal);
  color: var(--ink);
  outline: 0;
  box-shadow: 0 10px 24px rgba(20, 33, 54, 0.08);
}

.empty-state__plus {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}

.detail-dialog {
  width: min(960px, calc(100% - 34px));
  max-height: calc(100vh - 52px);
  border: 1px solid #dfe7f1;
  border-radius: 22px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(20, 33, 54, 0.25);
}

.detail-dialog::backdrop {
  background: rgba(18, 32, 51, 0.38);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid #dfe7f1;
  border-radius: 50%;
  background: #fff;
}

.dialog-close::before,
.dialog-close::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 16px;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.dialog-close::before { transform: rotate(45deg); }
.dialog-close::after { transform: rotate(-45deg); }

.detail-content {
  padding: 24px;
}

.detail-content h2 {
  margin: 0 44px 8px 0;
  font-size: 1.6rem;
}

.detail-author {
  margin: 0;
  gap: 12px;
  color: #607089;
  font-size: 1.02rem;
  font-weight: 650;
}

.detail-author img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.community-view__meta .pill {
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--card-color, var(--teal)) 22%, #f4d9ec);
  background: color-mix(in srgb, var(--card-color, var(--teal)) 10%, #fff);
  color: color-mix(in srgb, var(--card-color, var(--teal)) 82%, #7b1b5e);
  font-size: 0.82rem;
  font-weight: 900;
}

.detail-table {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.detail-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
}

.detail-period,
.detail-cell {
  border: 1px solid color-mix(in srgb, var(--detail-color, var(--teal)) 22%, #dfe7f1);
  border-radius: 16px;
  background: color-mix(in srgb, var(--detail-color, var(--teal)) 6%, #fff);
  padding: 12px;
}

.detail-cell ul {
  margin: 0;
  padding-left: 18px;
}

.rating-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 760px;
  padding: 12px 14px;
  border: 1px solid #f7dc8d;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8e7, #fffdf4);
}

.rating-box__copy {
  display: grid;
  gap: 3px;
}

.rating-box__copy strong {
  font-size: 0.95rem;
}

.rating-box__copy span {
  color: #7c5b13;
  font-size: 0.84rem;
  line-height: 1.35;
}

.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.star-button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #607089;
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 900;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.star-button:hover,
.star-button.is-preview,
.star-button.is-active {
  background: transparent;
  color: #f0a91f;
  transform: translateY(-1px);
}

.rating-status:empty {
  display: none;
}

.rating-status {
  color: #607089;
  font-size: 0.9rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  transform: translateX(-50%);
  max-width: min(520px, calc(100% - 28px));
  padding: 12px 16px;
  border-radius: 999px;
  background: #102033;
  color: #fff;
  box-shadow: 0 14px 34px rgba(20, 33, 54, 0.25);
}

.share-modal[hidden] {
  display: none;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: block;
  padding: 20px;
  overflow: hidden;
}

.share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 32, 51, 0.42);
}

.share-modal__panel {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 1;
  width: min(620px, calc(100% - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--teal) 22%, #dbe3ee);
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(22, 32, 51, 0.24);
}

.share-modal__panel--error {
  width: min(480px, calc(100% - 40px));
  left: 50%;
  transform: translateX(-50%);
}

.share-modal--html .share-modal__panel--error {
  width: min(620px, calc(100% - 40px));
}

.editor-panel .share-modal {
  z-index: 30;
}

.share-modal__panel--error .share-modal__close {
  display: none;
}

.share-modal__panel--error .share-options {
  grid-template-columns: 1fr;
  justify-content: center;
}

.share-modal__panel--error .share-options:has([data-error-action]:not([hidden])) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.share-modal__panel--error .share-modal__hero {
  grid-template-columns: 1fr;
}

.share-modal__panel--error .share-modal__hero-icon {
  display: none;
}

.share-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
}

.share-modal__close svg {
  width: 15px;
  height: 15px;
}

.share-modal__hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px 46px 12px 16px;
  background: linear-gradient(135deg, rgba(18, 149, 173, 0.16), rgba(82, 168, 70, 0.1));
  border-bottom: 1px solid color-mix(in srgb, var(--teal) 18%, #e6ebf2);
}

.share-modal__hero-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #fff;
  color: var(--teal);
}

.share-modal__hero-icon svg {
  width: 22px;
  height: 22px;
}

.share-modal__hero h2 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.15;
}

.share-modal__body {
  padding: 12px 16px 10px;
}

.share-section-title {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.share-link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin: 0 0 10px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--teal) 20%, #dbe3ee);
  border-radius: 12px;
  background: color-mix(in srgb, var(--teal) 5%, #fff);
}

.share-link-box input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0;
}

.share-copy-button,
.share-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--share-color, var(--teal)) 22%, #dbe3ee);
  border-radius: 11px;
  background: #fff;
  color: color-mix(in srgb, var(--share-color, var(--teal)) 82%, #102033);
  font-weight: 850;
  text-decoration: none;
}

.share-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.share-option--mail { --share-color: #1196ad; }
.share-option--facebook { --share-color: #1877f2; }
.share-option--twitter { --share-color: #111827; }
.share-option--whatsapp { --share-color: #25d366; }

.share-feedback {
  min-height: 14px;
  margin: -5px 0 8px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: pre-line;
}

.share-feedback:empty {
  display: none;
}

.share-feedback--html {
  display: block;
  margin: 0 0 12px;
  color: #33445c;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
}

.share-feedback--html h3 {
  margin: 14px 0 7px;
  color: #0d2038;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 900;
}

.share-feedback--html h3:first-child {
  margin-top: 0;
}

.share-feedback--html p {
  margin: 0 0 10px;
}

.share-feedback--html ul {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.share-feedback--html li {
  padding: 9px 11px;
  border: 1px solid #e7edf5;
  border-radius: 12px;
  background: #fbfdff;
}

.ai-improve-report {
  display: grid;
  gap: 18px;
}

.ai-report-section {
  display: grid;
  gap: 9px;
}

.ai-report-section h3 {
  margin: 0;
}

.ai-summary-list {
  display: grid;
  gap: 7px;
}

.ai-summary-list li {
  position: relative;
  padding: 9px 11px 9px 30px;
}

.ai-summary-list li::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ec4899;
}

.ai-example-list {
  display: grid;
  gap: 10px;
}

.ai-example {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #f4d5e5;
  border-radius: 14px;
  background: #fff7fb;
}

.ai-example__label {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fce7f3;
  color: #9d174d;
  font-size: 0.78rem;
  font-weight: 900;
}

.ai-example p {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}

.ai-example strong {
  color: #9d174d;
  font-weight: 900;
}

.ai-example span:not(.ai-example__label) {
  color: #33445c;
}

.ai-diff {
  padding: 1px 4px;
  border-radius: 6px;
  font-weight: 900;
}

.ai-diff--removed {
  background: #fee2e2;
  color: #991b1b;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.ai-diff--added {
  background: #dcfce7;
  color: #166534;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .quick-actions,
  .cards-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar,
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .period-tabs {
    width: calc(100% - 32px);
    margin: 0 16px 18px;
  }

  .screen-row {
    margin: 0 16px 14px;
  }

  .screen-row:last-child {
    margin-bottom: 18px;
  }

  body.editor-open .editor-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.editor-open .editor-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.editor-open .editor-settings .level-checks,
  body.editor-open .editor-settings .soft-button--full,
  body.editor-open .editor-settings .hint {
    grid-column: 1 / -1;
  }

  body.editor-open .editor-close {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: 100%;
    padding-top: 0;
  }

  .quick-actions,
  .insight-grid,
  .cards-rail,
  .filters,
  .two-cols {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 8px 0 16px;
  }

  .level-checks__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-items: stretch;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 7px 10px;
    border-radius: 12px;
    text-align: left;
  }

  .quick-card__icon,
  .quick-card__arrow {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .quick-card small {
    display: none;
  }

  .quick-card strong {
    display: block;
    overflow: hidden;
    font-size: 0.86rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .choice-scroller {
    display: block;
  }

  .choice-arrow {
    display: none;
  }

  .choice-scroller .choice-row {
    padding: 2px 2px 5px;
  }

  .panel,
  .mini-panel {
    padding: 14px;
    border-radius: 18px;
  }

  .panel__head {
    align-items: flex-start;
    flex-direction: column;
  }

  body.editor-open .editor-panel {
    padding: 8px;
  }

  body.editor-open .panel__head--editor {
    align-items: flex-start;
    padding: 9px;
  }

  body.editor-open .editor-settings {
    grid-template-columns: 1fr;
    max-height: 40vh;
  }

  .tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
  }

  .tab {
    justify-content: center;
    min-width: 0;
    padding: 5px 2px;
    font-size: 0.56rem;
    overflow: hidden;
  }

  .tab.is-active {
    min-width: 0;
  }

  .tab.is-active .tab__label {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  .tab .tab__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tab svg {
    width: 12px;
    height: 12px;
  }

  .detail-row {
    grid-template-columns: 1fr;
  }

  .community-view__head {
    padding: 18px 16px 14px;
  }

  .action-buttons {
    margin: 16px 16px 22px;
  }

  .period-tab {
    min-height: 42px;
    padding: 0;
    font-size: clamp(0.62rem, 2.55vw, 0.78rem);
  }

  .period-tab span {
    min-height: 42px;
    padding: 8px 1px;
  }

  .period-tabs {
    width: calc(100% - 16px);
    margin: 0 8px 16px;
    border-radius: 14px;
  }

  .period-tab,
  .period-tab.is-active span {
    border-radius: 0;
  }

  .screen-row {
    border-radius: 18px;
  }

  .screen-row__head {
    min-height: 34px;
    padding: 5px 9px;
    gap: 8px;
  }

  .screen-row__body {
    min-height: 0;
    padding: 14px 12px;
    font-size: 0.92rem;
  }

  .comments-panel {
    margin: 4px 16px 18px;
    padding: 14px;
  }

  .comments-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .comments-panel__head h3 {
    margin: 0;
  }

  .annotation-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f2fbff;
    color: var(--teal);
    font-size: 0.8rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
  }

  .comments-panel__count {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
  }

  .comment-form {
    grid-template-columns: 1fr;
  }

  .rating-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .screen-row__footer {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 7px;
  }

  .screen-row__footer a {
    font-size: 0.72rem;
  }

  .share-modal {
    padding: 12px;
  }

  .share-modal__panel {
    width: calc(100% - 24px);
    border-radius: 18px;
  }

  .share-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
