:root {
      --bg: #f6f3ee;
      --card: #ffffff;
      --ink: #2b211d;
      --muted: #756b65;
      --line: #e6dfd7;
      --brand: #3a2a24;
      --accent: #e67a2e;
      --soft-accent: #fff0e4;
      --green: #2f8f62;
      --red: #c84c3f;
      --yellow: #d99022;
      --shadow: 0 20px 50px rgba(58, 42, 36, 0.12);
      --radius: 24px;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background:
        radial-gradient(circle at top left, rgba(230, 122, 46, 0.15), transparent 32%),
        radial-gradient(circle at bottom right, rgba(58, 42, 36, 0.10), transparent 36%),
        var(--bg);
      color: var(--ink);
      min-height: 100vh;
    }

    .topbar {
      position: sticky;
      top: 0;
      z-index: 10;
      backdrop-filter: blur(18px);
      background: rgba(246, 243, 238, 0.78);
      border-bottom: 1px solid rgba(230, 223, 215, 0.7);
      padding: 16px 22px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 850;
      letter-spacing: -0.04em;
      font-size: 21px;
    }

    .brand-mark {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: var(--brand);
      position: relative;
      box-shadow: inset 0 -5px 0 rgba(255,255,255,0.08);
    }

    .brand-mark:before, .brand-mark:after {
      content: "";
      position: absolute;
      top: 11px;
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: #fff;
      opacity: 0.9;
    }

    .brand-mark:before { left: 10px; }
    .brand-mark:after { right: 10px; }

    .brand-dots {
      position: absolute;
      left: 9px;
      right: 9px;
      bottom: 9px;
      display: flex;
      justify-content: space-between;
    }

    .brand-dots span {
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: var(--accent);
    }

    .switcher {
      display: flex;
      background: #fff;
      padding: 5px;
      border-radius: 999px;
      box-shadow: 0 8px 25px rgba(58, 42, 36, 0.08);
      border: 1px solid var(--line);
    }

    .switcher button {
      border: 0;
      background: transparent;
      padding: 10px 14px;
      border-radius: 999px;
      font-weight: 750;
      color: var(--muted);
      cursor: pointer;
    }

    .switcher button.active,
    .period-tab.active {
      background: var(--brand);
      color: white;
    }

    .screen { display: none; }
    .screen.active { display: block; }

    .page {
      width: min(1120px, calc(100% - 32px));
      margin: 34px auto 70px;
    }

    .feedback-wrap {
      max-width: 540px;
      margin: 0 auto;
    }

    .company-card {
      text-align: center;
      margin-bottom: 18px;
    }

    .company-logo {
      width: 70px;
      height: 70px;
      border-radius: 22px;
      background: linear-gradient(145deg, var(--brand), #5b4036);
      color: white;
      display: grid;
      place-items: center;
      font-size: 28px;
      font-weight: 900;
      margin: 0 auto 14px;
      box-shadow: var(--shadow);
    }

    h1, h2, h3, p { margin-top: 0; }

    h1 {
      font-size: clamp(32px, 5vw, 54px);
      line-height: 0.95;
      letter-spacing: -0.065em;
      margin-bottom: 12px;
    }

    .subtitle {
      color: var(--muted);
      font-size: 17px;
      line-height: 1.5;
    }

    .card {
      background: rgba(255,255,255,0.9);
      border: 1px solid rgba(230, 223, 215, 0.9);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 24px;
    }

    label {
      display: block;
      font-size: 13px;
      font-weight: 850;
      color: var(--brand);
      margin-bottom: 9px;
      text-transform: uppercase;
      letter-spacing: 0.055em;
    }

    textarea, input {
      width: 100%;
      border: 1px solid var(--line);
      background: #fff;
      border-radius: 18px;
      padding: 15px 16px;
      font: inherit;
      outline: none;
    }

    textarea {
      min-height: 150px;
      resize: vertical;
      line-height: 1.5;
    }

    textarea:focus, input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 4px rgba(230, 122, 46, 0.12);
    }

    .field { margin-bottom: 20px; }

    .rating-row {
      display: grid;
      grid-template-columns: repeat(10, 1fr);
      gap: 7px;
    }

    .rating-row button {
      aspect-ratio: 1;
      border-radius: 13px;
      border: 1px solid var(--line);
      background: #fff;
      font-weight: 850;
      color: var(--muted);
      cursor: pointer;
    }

    .rating-row button.selected {
      background: var(--accent);
      color: white;
      border-color: var(--accent);
      transform: translateY(-1px);
      box-shadow: 0 8px 20px rgba(230, 122, 46, 0.28);
    }

    .upload-box {
      border: 1.5px dashed #d9cbbf;
      background: #fffaf6;
      border-radius: 20px;
      padding: 22px;
      text-align: center;
      color: var(--muted);
    }

    .privacy-note {
      background: #f7f1ed;
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 14px 15px;
      font-size: 14px;
      color: var(--muted);
      line-height: 1.45;
      margin-bottom: 18px;
    }

    .primary-btn {
      width: 100%;
      border: 0;
      border-radius: 18px;
      background: var(--brand);
      color: white;
      font-weight: 850;
      font-size: 16px;
      padding: 16px 18px;
      cursor: pointer;
      box-shadow: 0 14px 35px rgba(58, 42, 36, 0.22);
    }

    .secondary-link {
      display: block;
      text-align: center;
      margin-top: 15px;
      color: var(--muted);
      font-size: 14px;
      text-decoration: none;
    }

    .dashboard-grid {
      display: grid;
      grid-template-columns: 1.1fr 0.9fr;
      gap: 20px;
      align-items: start;
    }

    .dash-header {
      display: flex;
      justify-content: space-between;
      gap: 18px;
      align-items: end;
      margin-bottom: 22px;
    }

    .icon-title {
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .icon-title svg,
    .mini-icon svg {
      width: 18px;
      height: 18px;
      stroke-width: 2.4;
    }

    .mini-icon {
      width: 34px;
      height: 34px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      background: var(--soft-accent);
      color: var(--accent);
      flex: 0 0 auto;
    }

    .mini-icon.good {
      background: #eefaf3;
      color: var(--green);
    }

    .mini-icon.bad {
      background: #fff0ee;
      color: var(--red);
    }

    .mini-icon.warn {
      background: #fff7e7;
      color: var(--yellow);
    }

    .mini-icon.neutral {
      background: #f1eee9;
      color: var(--brand);
    }

    .metric-top {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: flex-start;
    }

    .section-kicker {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      text-transform: uppercase;
      letter-spacing: 0.055em;
      margin-bottom: 8px;
    }

    .pill {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      border: 1px solid var(--line);
      background: white;
      color: var(--muted);
      border-radius: 999px;
      padding: 9px 12px;
      font-weight: 750;
      font-size: 13px;
    }

    .period-tabs {
      display: inline-flex;
      gap: 6px;
      background: white;
      border: 1px solid var(--line);
      padding: 6px;
      border-radius: 999px;
      margin-bottom: 18px;
      box-shadow: 0 10px 28px rgba(58, 42, 36, 0.06);
    }

    .period-tab {
      border: 0;
      border-radius: 999px;
      background: transparent;
      padding: 10px 18px;
      color: var(--muted);
      font-weight: 850;
      cursor: pointer;
    }

    .trend-strip {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
      margin-bottom: 20px;
    }

    .trend-card {
      background: white;
      border: 1px solid var(--line);
      border-radius: 20px;
      padding: 17px;
      box-shadow: 0 10px 28px rgba(58, 42, 36, 0.06);
    }

    .trend-card span {
      display: block;
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      margin-bottom: 8px;
    }

    .trend-card strong {
      display: block;
      font-size: 22px;
      letter-spacing: -0.04em;
      margin-bottom: 4px;
    }

    .trend-card small {
      color: var(--muted);
      line-height: 1.4;
    }

    .trend-card.good { border-color: rgba(47, 143, 98, 0.25); background: #f5fff9; }
    .trend-card.warn { border-color: rgba(217, 144, 34, 0.25); background: #fffaf0; }

    .metrics {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      margin-bottom: 20px;
    }

    .metric {
      background: white;
      border: 1px solid var(--line);
      border-radius: 20px;
      padding: 17px;
      box-shadow: 0 10px 28px rgba(58, 42, 36, 0.06);
    }

    .metric .num {
      font-size: 30px;
      font-weight: 900;
      letter-spacing: -0.05em;
      margin-bottom: 4px;
    }

    .metric .label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .summary-card h2 {
      font-size: 28px;
      letter-spacing: -0.045em;
      margin-bottom: 10px;
    }

    .takeaway {
      display: flex;
      gap: 12px;
      padding: 14px 0;
      border-bottom: 1px solid var(--line);
    }

    .takeaway:last-child { border-bottom: 0; }

    .dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--accent);
      flex: 0 0 auto;
      margin-top: 6px;
    }

    .theme {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      padding: 15px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: white;
      margin-bottom: 12px;
    }

    .theme strong { display: block; margin-bottom: 4px; }
    .theme span { color: var(--muted); font-size: 14px; }

    .count-badge {
      background: var(--soft-accent);
      color: var(--accent);
      border-radius: 999px;
      padding: 7px 10px;
      font-weight: 900;
      white-space: nowrap;
    }

    .actions-list {
      display: grid;
      gap: 12px;
    }

    .action-item {
      background: #fffaf6;
      border: 1px solid #f0d7c4;
      border-radius: 18px;
      padding: 15px;
      line-height: 1.45;
    }

    .trend-chart {
      margin-top: 18px;
      background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(246,243,238,0.9));
      border: 1px solid var(--line);
      border-radius: 22px;
      padding: 18px;
      overflow: hidden;
    }

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

    .chart-header h3 {
      margin: 0;
      font-size: 20px;
      letter-spacing: -0.03em;
    }

    .chart-sub {
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .chart-svg {
      width: 100%;
      height: 240px;
    }

    .chart-labels {
      display: flex;
      justify-content: space-between;
      margin-top: 8px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .chart-legend {
      display: flex;
      gap: 18px;
      margin-top: 14px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      flex-wrap: wrap;
    }

    .chart-legend span {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .legend-line {
      width: 18px;
      height: 4px;
      border-radius: 999px;
    }

    .line-pos { background: var(--green); }
    .line-neu { background: var(--yellow); }
    .line-neg { background: var(--red); }
    .line-rating { background: var(--brand); }

    .privacy-chart-placeholder {
      margin-top: 18px;
      background: #f8f5f1;
      border: 1px dashed #d8cfc6;
      border-radius: 22px;
      padding: 18px;
      color: var(--muted);
      line-height: 1.45;
    }

    .privacy-chart-placeholder strong {
      display: block;
      color: var(--brand);
      margin-bottom: 6px;
    }

    .privacy-chart-placeholder p {
      margin: 0;
    }

    .sentiment-bar {
      display: flex;
      overflow: hidden;
      height: 16px;
      border-radius: 999px;
      background: var(--line);
      margin: 16px 0 12px;
    }

    .positive { background: var(--green); width: 34%; }
    .neutral { background: var(--yellow); width: 38%; }
    .negative { background: var(--red); width: 28%; }

    .legend {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .legend span:before {
      content: "";
      display: inline-block;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      margin-right: 6px;
    }

    .legend .l-pos:before { background: var(--green); }
    .legend .l-neu:before { background: var(--yellow); }
    .legend .l-neg:before { background: var(--red); }

    .notice {
      background: #f1eee9;
      color: var(--muted);
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 14px;
      font-size: 14px;
      line-height: 1.45;
      margin-top: 12px;
    }

    .response-preview {
      margin-top: 24px;
      padding-top: 20px;
      border-top: 1px solid var(--line);
    }

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

    .section-title-row h2 { margin: 0; }

    .masked-review {
      background: white;
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 15px;
      margin-bottom: 12px;
    }

    .masked-review strong {
      display: block;
      margin-bottom: 7px;
      color: var(--brand);
    }

    .masked-review p {
      margin: 0;
      color: var(--muted);
      line-height: 1.45;
    }

    .muted-response {
      background: #f8f5f1;
      border-style: dashed;
    }

    @media (max-width: 840px) {
      .dashboard-grid, .metrics, .trend-strip { grid-template-columns: 1fr; }
      .dash-header { align-items: start; flex-direction: column; }
      .topbar { align-items: flex-start; flex-direction: column; }
      .switcher { width: 100%; }
      .switcher button { flex: 1; }
    }
