:root {
  color-scheme: dark;

  --bg: #07101d;
  --bg-deep: #040a13;

  --glass:
    rgba(19, 38, 69, 0.63);

  --glass-strong:
    rgba(20, 47, 88, 0.76);

  --glass-soft:
    rgba(22, 45, 77, 0.48);

  --border:
    rgba(142, 196, 255, 0.14);

  --border-bright:
    rgba(131, 202, 255, 0.28);

  --text: #f5f9ff;
  --muted: #91a5bd;
  --muted-2: #71869f;

  --blue: #238dff;
  --blue-soft: #4eaeff;

  --red: #ff455d;
  --amber: #f0ad32;
  --green: #3edb89;

  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  background: var(--bg-deep);
}

body {
  min-height: 100vh;

  overflow-x: hidden;

  background:
    radial-gradient(
      circle at 78% 2%,
      rgba(77, 83, 255, 0.19),
      transparent 29%
    ),
    radial-gradient(
      circle at 10% 26%,
      rgba(28, 116, 255, 0.18),
      transparent 33%
    ),
    linear-gradient(
      180deg,
      #081322 0%,
      #07101d 48%,
      #050b14 100%
    );

  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.ambient {
  position: fixed;
  z-index: -1;

  pointer-events: none;

  border-radius: 50%;

  filter: blur(52px);
}

.ambient--one {
  width: 230px;
  height: 230px;

  top: 70px;
  right: -100px;

  background:
    rgba(68, 76, 255, 0.18);
}

.ambient--two {
  width: 190px;
  height: 190px;

  top: 390px;
  left: -105px;

  background:
    rgba(0, 153, 255, 0.13);
}

.app-shell {
  width: min(100%, 640px);

  margin: 0 auto;

  padding:
    max(23px, env(safe-area-inset-top))
    16px
    0;
}

.app-header {
  padding:
    5px
    3px
    23px;

  text-align: left;
}

.app-header h1 {
  margin: 0;

  font-size: 34px;
  font-weight: 780;
  line-height: 1.05;

  letter-spacing: -1.15px;
}

.app-header p {
  margin: 8px 0 0;

  color: #a5b6ca;

  font-size: 14px;
  line-height: 1.35;
}

.summary-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 11px;
}

.summary-card {
  position: relative;

  min-width: 0;
  min-height: 120px;

  display: flex;
  align-items: center;

  gap: 12px;

  padding: 16px;

  overflow: hidden;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-xl);

  background:
    linear-gradient(
      145deg,
      rgba(39, 74, 127, 0.58),
      rgba(12, 27, 52, 0.68)
    );

  color: var(--text);

  text-align: left;

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.07),
    inset 0 -1px 0
      rgba(0, 0, 0, 0.25),
    0 13px 32px
      rgba(0, 0, 0, 0.23);

  backdrop-filter:
    blur(22px)
    saturate(150%);

  -webkit-backdrop-filter:
    blur(22px)
    saturate(150%);

  transition:
    transform 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.summary-card::before {
  content: "";

  position: absolute;

  inset:
    0
    14px
    auto
    14px;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(218, 237, 255, 0.34),
      transparent
    );
}

.summary-card:active {
  transform: scale(0.985);
}

.summary-card.is-selected {
  border-color:
    rgba(72, 165, 255, 0.48);

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.09),
    0 0 0 1px
      rgba(35, 141, 255, 0.08),
    0 0 28px
      rgba(35, 141, 255, 0.14);
}

.summary-mark {
  width: 55px;
  height: 55px;

  flex: 0 0 55px;

  display: grid;
  place-items: center;

  position: relative;

  color: white;

  font-weight: 800;
}

.summary-mark--attention {
  height: 50px;

  margin-top: -2px;

  clip-path:
    polygon(
      50% 0%,
      100% 100%,
      0% 100%
    );

  background:
    linear-gradient(
      180deg,
      #ff687b,
      #e92540
    );

  filter:
    drop-shadow(
      0 0 11px
      rgba(255, 49, 79, 0.74)
    );
}

.summary-mark--attention span {
  transform: translateY(5px);

  font-size: 27px;
  line-height: 1;
}

.summary-mark--work {
  border-radius: 50%;

  background:
    radial-gradient(
      circle at 38% 30%,
      #ffd777,
      #e79812 68%,
      #a96300 100%
    );

  font-size: 31px;

  box-shadow:
    0 0 19px
      rgba(240, 173, 50, 0.45);
}

.summary-copy {
  min-width: 0;
}

.summary-label {
  display: block;

  color: #c0cede;

  font-size: 13px;
  line-height: 1.18;
}

.summary-copy strong {
  display: block;

  margin-top: 4px;

  font-size: 34px;
  line-height: 1;

  letter-spacing: -0.5px;
}

.summary-card--attention strong {
  color: #ff6f80;

  text-shadow:
    0 0 16px
      rgba(255, 69, 93, 0.32);
}

.summary-card--work strong {
  color: #ffc45a;

  text-shadow:
    0 0 16px
      rgba(240, 173, 50, 0.25);
}


/* ---------------------------------------------------------
   Horizontal filter carousel
   --------------------------------------------------------- */

.filters-wrap {
  position: relative;

  margin-top: 14px;
}

.filters-wrap::before,
.filters-wrap::after {
  content: "";

  position: absolute;
  z-index: 3;

  top: 0;
  bottom: 0;

  width: 26px;

  pointer-events: none;

  opacity: 0;

  transition:
    opacity 140ms ease;
}

.filters-wrap::before {
  left: 0;

  background:
    linear-gradient(
      90deg,
      var(--bg),
      transparent
    );
}

.filters-wrap::after {
  right: 0;

  background:
    linear-gradient(
      270deg,
      var(--bg),
      transparent
    );
}

.filters-wrap.has-left::before,
.filters-wrap.has-right::after {
  opacity: 1;
}

.filters {
  display: flex;

  gap: 8px;

  overflow-x: auto;
  overflow-y: hidden;

  padding:
    1px
    5px
    5px
    1px;

  scroll-snap-type:
    x proximity;

  overscroll-behavior-x:
    contain;

  scrollbar-width:
    none;

  -webkit-overflow-scrolling:
    touch;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-button {
  flex:
    0
    0
    auto;

  scroll-snap-align:
    start;

  min-height: 48px;

  padding:
    0
    15px;

  border:
    1px solid
    var(--border);

  border-radius: 15px;

  background:
    linear-gradient(
      145deg,
      rgba(31, 62, 102, 0.63),
      rgba(15, 31, 55, 0.66)
    );

  color: #c7d4e3;

  font-size: 13px;
  font-weight: 600;

  white-space: nowrap;

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.06);

  backdrop-filter:
    blur(18px)
    saturate(145%);

  -webkit-backdrop-filter:
    blur(18px)
    saturate(145%);
}

.filter-button.is-active {
  border-color:
    rgba(91, 184, 255, 0.66);

  background:
    linear-gradient(
      135deg,
      #258fff,
      #126bd5
    );

  color: white;

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.24),
    0 0 21px
      rgba(35, 141, 255, 0.30);
}

.filter-icon {
  margin-right: 5px;

  opacity: 0.95;
}


/* ---------------------------------------------------------
   Problem cards
   --------------------------------------------------------- */

.case-list {
  display: grid;

  gap: 10px;

  margin-top: 9px;
}

.case-card {
  position: relative;

  width: 100%;

  min-height: 118px;

  display: grid;

  grid-template-columns:
    76px
    minmax(0, 1fr)
    12px;

  gap: 12px;

  align-items: center;

  padding:
    12px
    12px
    12px
    11px;

  overflow: hidden;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-lg);

  background:
    linear-gradient(
      145deg,
      rgba(25, 52, 91, 0.67),
      rgba(11, 24, 45, 0.75)
    );

  color: var(--text);

  text-align: left;

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.055),
    0 10px 28px
      rgba(0, 0, 0, 0.20);

  backdrop-filter:
    blur(21px)
    saturate(145%);

  -webkit-backdrop-filter:
    blur(21px)
    saturate(145%);

  transition:
    transform 110ms ease,
    border-color 110ms ease;
}

.case-card::before {
  content: "";

  position: absolute;

  top: 0;
  left: 16px;
  right: 16px;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(211, 234, 255, 0.22),
      transparent
    );
}

.case-card:active {
  transform:
    scale(0.992);

  border-color:
    rgba(111, 185, 255, 0.26);
}

.case-media {
  position: relative;

  width: 76px;
  height: 86px;

  overflow: hidden;

  border:
    1px solid
    rgba(154, 201, 255, 0.16);

  border-radius: 14px;

  background:
    linear-gradient(
      145deg,
      rgba(43, 75, 116, 0.72),
      rgba(16, 33, 57, 0.92)
    );

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.07);
}

.case-photo {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  opacity: 0;

  transition:
    opacity 180ms ease;
}

.case-photo.is-loaded {
  opacity: 1;
}

.case-photo-placeholder {
  position: absolute;

  inset: 0;

  display: grid;
  place-items: center;

  color:
    rgba(191, 216, 240, 0.60);

  font-size: 25px;
}

.case-media.has-photo
.case-photo-placeholder {
  opacity: 0.15;
}

.case-media.no-photo
.case-photo-placeholder {
  opacity: 0;
}


/* Preview-only visual stand-ins.
   Real Mini App photos come from authenticated API. */

.case-media.preview-art::before,
.case-media.preview-art::after {
  content: "";

  position: absolute;

  inset: 0;
}

.case-media.preview-art--leak::before {
  background:
    linear-gradient(
      116deg,
      rgba(99, 125, 151, 0.45),
      transparent 42%
    ),
    radial-gradient(
      circle at 67% 30%,
      rgba(196, 214, 224, 0.56),
      transparent 20%
    ),
    linear-gradient(
      180deg,
      #495c6c,
      #1a2832
    );
}

.case-media.preview-art--leak::after {
  inset:
    18px
    11px
    10px
    43px;

  border-left:
    3px solid
    rgba(210, 229, 237, 0.55);

  transform:
    rotate(13deg);
}

.case-media.preview-art--document::before {
  inset:
    10px
    12px;

  border-radius: 4px;

  background:
    repeating-linear-gradient(
      180deg,
      #c9d0d6 0 4px,
      #eef2f4 4px 9px
    );

  opacity: 0.84;
}

.case-media.preview-art--night::before {
  background:
    radial-gradient(
      circle at 25% 34%,
      rgba(255, 206, 108, 0.9) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 67% 51%,
      rgba(255, 206, 108, 0.75) 0 2px,
      transparent 3px
    ),
    linear-gradient(
      180deg,
      #182952,
      #050b15
    );
}

.case-media.preview-art--night::after {
  inset:
    34px
    10px
    8px;

  border-radius:
    3px
    3px
    0
    0;

  background:
    repeating-linear-gradient(
      90deg,
      #111a27 0 10px,
      #293349 10px 13px
    );
}

.case-media.preview-art--light::before {
  background:
    radial-gradient(
      circle at 54% 24%,
      rgba(255, 227, 157, 0.95),
      transparent 10%
    ),
    radial-gradient(
      circle at 54% 24%,
      rgba(255, 202, 105, 0.30),
      transparent 30%
    ),
    linear-gradient(
      180deg,
      #19304d,
      #07111d
    );
}

.case-media.preview-art--light::after {
  inset:
    24px
    32px
    0
    auto;

  width: 3px;

  background:
    rgba(177, 190, 204, 0.70);
}

.media-count {
  position: absolute;
  z-index: 4;

  top: 5px;
  right: 5px;

  min-width: 27px;

  padding:
    4px
    7px;

  border:
    1px solid
    rgba(255, 255, 255, 0.15);

  border-radius: 999px;

  background:
    rgba(3, 10, 19, 0.78);

  color: white;

  font-size: 10px;
  font-weight: 750;

  text-align: center;

  backdrop-filter:
    blur(10px);

  -webkit-backdrop-filter:
    blur(10px);
}

.case-mark {
  position: absolute;
  z-index: 5;

  left: 5px;
  bottom: 5px;

  width: 29px;
  height: 29px;

  display: grid;
  place-items: center;

  color: white;

  font-size: 17px;
  font-weight: 850;

  box-shadow:
    0 0 13px
      rgba(0, 0, 0, 0.30);
}

.case-mark.action {
  height: 27px;

  clip-path:
    polygon(
      50% 0%,
      100% 100%,
      0% 100%
    );

  background:
    linear-gradient(
      180deg,
      #ff6578,
      #e51e3b
    );

  filter:
    drop-shadow(
      0 0 7px
      rgba(255, 49, 79, 0.75)
    );
}

.case-mark.action span {
  transform:
    translateY(3px);
}

.case-mark.waiting {
  border-radius: 50%;

  background:
    linear-gradient(
      145deg,
      #ffd36c,
      #d98b08
    );

  box-shadow:
    0 0 12px
      rgba(240, 173, 50, 0.45);
}

.case-mark.verification {
  border-radius: 50%;

  background:
    linear-gradient(
      145deg,
      #5beca4,
      #18a865
    );

  box-shadow:
    0 0 12px
      rgba(62, 219, 137, 0.40);
}

.case-mark.active {
  border-radius: 50%;

  background:
    linear-gradient(
      145deg,
      #56baff,
      #1977de
    );

  box-shadow:
    0 0 12px
      rgba(35, 141, 255, 0.38);
}

.case-mark.closed {
  border-radius: 50%;

  background:
    #63778d;
}

.case-media.no-photo {
  height: 76px;
}

.case-media.no-photo
.case-mark {
  position: absolute;

  left: 50%;
  bottom: 50%;

  width: 42px;
  height: 42px;

  transform:
    translate(
      -50%,
      50%
    );
}

.case-media.no-photo
.case-mark.action {
  height: 38px;
}

.case-media.no-photo
.case-mark.action span {
  transform:
    translateY(4px);
}

.case-content {
  min-width: 0;

  display: block;
}

.case-heading {
  min-width: 0;

  display: flex;
  align-items: flex-start;

  gap: 7px;
}

.case-title {
  min-width: 0;

  flex: 1 1 auto;

  overflow: hidden;

  display: -webkit-box;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  color: var(--text);

  font-size: 15px;
  font-weight: 720;
  line-height: 1.24;

  white-space: normal;
}

.case-badge {
  flex:
    0
    0
    auto;

  max-width: 104px;

  padding:
    5px
    7px;

  border-radius: 999px;

  font-size: 9px;
  font-weight: 700;
  line-height: 1.12;

  text-align: center;

  white-space: nowrap;
}

.case-badge.action {
  background:
    rgba(255, 69, 93, 0.17);

  color: #ff7889;

  box-shadow:
    inset 0 0 0 1px
      rgba(255, 88, 108, 0.13);
}

.case-badge.waiting {
  background:
    rgba(240, 173, 50, 0.15);

  color: #f7c55e;
}

.case-badge.verification {
  background:
    rgba(62, 219, 137, 0.14);

  color: #69e9a7;
}

.case-badge.active {
  background:
    rgba(35, 141, 255, 0.15);

  color: #70bdff;
}

.case-badge.closed {
  background:
    rgba(137, 159, 181, 0.15);

  color: #b0c0d0;
}

.case-details {
  min-width: 0;

  display: grid;

  gap: 3px;

  margin-top: 6px;
}

.case-detail {
  min-width: 0;

  overflow: hidden;

  color: var(--muted);

  font-size: 11px;
  line-height: 1.28;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-detail strong {
  color: #b6c8da;

  font-weight: 620;
}

.case-detail--appeal {
  display: -webkit-box;

  overflow: hidden;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  white-space: normal;
}

.case-detail--deadline {
  color: #d7b76f;
}

.case-detail--response {
  color: #8dddb5;
}

.case-chevron {
  align-self: center;

  color: #70849b;

  font-size: 27px;
  font-weight: 280;
  line-height: 1;
}

.loading,
.empty-state {
  padding:
    34px
    18px;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-lg);

  background:
    var(--glass-soft);

  color: var(--muted);

  text-align: center;

  font-size: 14px;

  backdrop-filter:
    blur(18px);

  -webkit-backdrop-filter:
    blur(18px);
}

.error-box {
  margin-top: 12px;

  padding: 14px;

  border:
    1px solid
    rgba(255, 81, 89, 0.26);

  border-radius:
    var(--radius-md);

  background:
    rgba(103, 23, 41, 0.30);

  color: #ff9ba8;

  font-size: 13px;
  line-height: 1.4;

  backdrop-filter:
    blur(16px);

  -webkit-backdrop-filter:
    blur(16px);
}

.bottom-space {
  height:
    calc(
      138px
      + env(safe-area-inset-bottom)
    );
}

.bottom-action {
  position: fixed;
  z-index: 20;

  left: 0;
  right: 0;
  bottom: 0;

  padding:
    12px
    16px
    calc(
      13px
      + env(safe-area-inset-bottom)
    );

  background:
    linear-gradient(
      to top,
      #050b14 60%,
      rgba(5, 11, 20, 0)
    );

  pointer-events: none;
}

.bottom-action button {
  width:
    min(
      calc(100vw - 32px),
      608px
    );

  min-height: 59px;

  display: block;

  margin: 0 auto;

  border:
    1px solid
    rgba(120, 202, 255, 0.46);

  border-radius: 17px;

  background:
    linear-gradient(
      135deg,
      #2396ff,
      #096ddf
    );

  color: white;

  font-size: 16px;
  font-weight: 740;

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.27),
    0 0 27px
      rgba(29, 132, 255, 0.34),
    0 9px 27px
      rgba(0, 61, 142, 0.26);

  pointer-events: auto;
}

.bottom-action button:active {
  transform:
    scale(0.989);
}

.plus {
  margin-right: 7px;

  font-size: 24px;
  font-weight: 300;

  vertical-align: -1px;
}


@media (max-width: 520px) {
  .app-shell {
    padding-left: 13px;
    padding-right: 13px;
  }

  .app-header {
    padding-bottom: 20px;
  }

  .summary-card {
    min-height: 111px;

    gap: 9px;

    padding:
      13px
      10px;
  }

  .summary-mark {
    width: 46px;
    height: 46px;

    flex-basis: 46px;
  }

  .summary-mark--attention {
    height: 42px;
  }

  .summary-mark--attention span {
    font-size: 23px;

    transform:
      translateY(4px);
  }

  .summary-mark--work {
    font-size: 25px;
  }

  .summary-label {
    font-size: 11px;

    white-space: normal;
  }

  .summary-copy strong {
    font-size: 30px;
  }

  .filter-button {
    min-height: 46px;

    padding:
      0
      13px;

    font-size: 12px;
  }

  .case-card {
    min-height: 112px;

    grid-template-columns:
      68px
      minmax(0, 1fr)
      10px;

    gap: 10px;

    padding:
      10px
      10px
      10px
      9px;
  }

  .case-media {
    width: 68px;
    height: 80px;
  }

  .case-media.no-photo {
    height: 68px;
  }

  .case-title {
    font-size: 14px;
  }

  .case-badge {
    max-width: 91px;

    padding:
      5px
      6px;

    font-size: 8.5px;
  }

  .case-detail {
    font-size: 10px;
  }

  .case-chevron {
    font-size: 24px;
  }
}


@media (max-width: 350px) {
  .summary-grid {
    gap: 8px;
  }

  .summary-card {
    padding:
      11px
      8px;

    gap: 7px;
  }

  .summary-mark {
    width: 41px;
    height: 41px;

    flex-basis: 41px;
  }

  .summary-mark--attention {
    height: 38px;
  }

  .summary-label {
    font-size: 10px;
  }

  .summary-copy strong {
    font-size: 27px;
  }

  .case-card {
    grid-template-columns:
      61px
      minmax(0, 1fr)
      9px;

    gap: 8px;
  }

  .case-media {
    width: 61px;
    height: 74px;
  }

  .case-title {
    font-size: 13px;
  }
}


/* =========================================================
   PATCH 1E3D — viewport / footer / multiline geometry
   ========================================================= */

html,
body {
  height: 100%;
}

body {
  height: 100vh;
  height: 100dvh;

  min-height: 0;

  display: grid;

  grid-template-rows:
    minmax(0, 1fr)
    auto;

  overflow: hidden;
}

.app-shell {
  min-height: 0;
  height: auto;

  overflow-x: hidden;
  overflow-y: auto;

  overscroll-behavior-y: contain;

  padding-bottom: 12px;

  scrollbar-width: none;

  -webkit-overflow-scrolling: touch;
}

.app-shell::-webkit-scrollbar {
  display: none;
}


/* Footer now occupies its own layout row.
   Cards can no longer slide under the CTA. */

.bottom-action {
  position: relative;

  left: auto;
  right: auto;
  bottom: auto;

  width: 100%;

  flex: none;

  padding-top: 9px;
}

.bottom-space {
  height: 16px;
}


/* Robust two-line title + status badge geometry. */

.case-heading {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto;

  align-items: start;

  gap: 7px;
}

.case-title {
  min-width: 0;

  text-overflow: clip;

  overflow-wrap: break-word;
}


/* Actual recipient / response data may use two lines. */

.case-detail--appeal {
  display: -webkit-box;

  overflow: hidden;

  max-height: 2.65em;

  white-space: normal;

  text-overflow: clip;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  overflow-wrap: break-word;
}


/* =========================================================
   PATCH 1E3E — robust viewport + readable appeal details
   ========================================================= */

body {
  display: flex;
  flex-direction: column;

  height: 100vh;
  height: 100dvh;

  min-height: 0;

  overflow: hidden;
}

.app-shell {
  flex: 1 1 auto;

  min-height: 0;

  overflow-x: hidden;
  overflow-y: auto;
}

.bottom-action {
  position: relative;

  flex: 0 0 auto;

  left: auto;
  right: auto;
  bottom: auto;

  width: 100%;

  padding-top: 8px;
}


/* Full readable recipient / response information.
   Do not depend on WebKit line-clamp in Firefox. */

.case-detail--appeal {
  display: block;

  max-height: none;

  overflow: visible;

  white-space: normal;

  text-overflow: clip;

  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;

  overflow-wrap: anywhere;
}



/* =========================================================
   PATCH 1E3F — stable initial viewport
   ========================================================= */

.app-shell {
  overflow-anchor: none;
}



/* =========================================================
   PATCH 1E3G — final structural viewport
   Header is physically outside scroll container.
   ========================================================= */

.app-header {
  flex: 0 0 auto;

  width: min(100%, 640px);

  margin: 0 auto;

  padding:
    max(20px, env(safe-area-inset-top))
    16px
    18px;

  text-align: left;

  background:
    linear-gradient(
      180deg,
      rgba(7, 16, 29, 0.98),
      rgba(7, 16, 29, 0.92)
    );
}

.app-shell {
  flex: 1 1 auto;

  width: min(100%, 640px);

  min-height: 0;

  margin: 0 auto;

  padding:
    0
    16px
    12px;

  overflow-x: hidden;
  overflow-y: auto;

  overscroll-behavior-y: contain;

  overflow-anchor: none;

  scrollbar-width: none;

  -webkit-overflow-scrolling: touch;
}

@media (max-width: 520px) {
  .app-header {
    padding-left: 13px;
    padding-right: 13px;
    padding-bottom: 17px;
  }

  .app-shell {
    padding-left: 13px;
    padding-right: 13px;
  }
}



/* =========================================================
   PATCH 1E3H — volumetric neon text
   Variant 3: pronounced depth on key UI only.
   ========================================================= */


/* FactControl — glossy blue-white dimensional title */

.app-header h1 {
  color: #eef8ff;

  font-weight: 800;

  letter-spacing: -1.15px;

  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.34),
    0 2px 1px rgba(0, 54, 117, 0.46),
    0 4px 8px rgba(0, 87, 201, 0.34),
    0 0 16px rgba(46, 157, 255, 0.24);
}

@supports (
  (-webkit-background-clip: text)
  or
  (background-clip: text)
) {
  .app-header h1 {
    background:
      linear-gradient(
        180deg,
        #ffffff 0%,
        #e9f7ff 27%,
        #72c9ff 62%,
        #188dff 100%
      );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;

    -webkit-text-fill-color: transparent;
  }
}


/* Large summary numbers — stronger depth and glow */

.summary-card--attention
.summary-copy strong {
  text-shadow:
    0 1px 0 rgba(255, 210, 216, 0.60),
    0 2px 1px rgba(123, 7, 29, 0.52),
    0 4px 10px rgba(255, 49, 79, 0.42),
    0 0 18px rgba(255, 69, 93, 0.34);
}

.summary-card--work
.summary-copy strong {
  text-shadow:
    0 1px 0 rgba(255, 244, 198, 0.72),
    0 2px 1px rgba(113, 66, 0, 0.54),
    0 4px 10px rgba(240, 173, 50, 0.38),
    0 0 18px rgba(255, 193, 69, 0.30);
}


/* Active filter — glossy raised text */

.filter-button.is-active {
  position: relative;

  overflow: hidden;

  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.30),
    0 2px 3px rgba(0, 54, 126, 0.46),
    0 0 9px rgba(177, 224, 255, 0.20);
}

.filter-button.is-active::before {
  content: "";

  position: absolute;

  left: 12px;
  right: 12px;
  top: 1px;

  height: 1px;

  border-radius: 999px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.52),
      transparent
    );

  pointer-events: none;
}


/* Key status pills — controlled dimensional glow */

.case-badge.action {
  text-shadow:
    0 1px 0 rgba(255, 220, 224, 0.18),
    0 0 8px rgba(255, 69, 93, 0.28);
}

.case-badge.waiting {
  text-shadow:
    0 1px 0 rgba(255, 244, 207, 0.18),
    0 0 8px rgba(240, 173, 50, 0.25);
}

.case-badge.verification {
  text-shadow:
    0 1px 0 rgba(220, 255, 239, 0.16),
    0 0 8px rgba(62, 219, 137, 0.24);
}

.case-badge.active {
  text-shadow:
    0 1px 0 rgba(221, 242, 255, 0.17),
    0 0 8px rgba(35, 141, 255, 0.24);
}


/* CTA text gets only a light depth layer */

.bottom-action button {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28),
    0 2px 3px rgba(0, 54, 126, 0.38),
    0 0 8px rgba(179, 226, 255, 0.16);
}


/* =========================================================
   PATCH 1E3H.1 — stronger volumetric text
   Closer to approved visual variant 3.
   ========================================================= */


/* ---------------------------------------------------------
   FactControl — glass / bevel / cyan depth
   --------------------------------------------------------- */

.app-header h1 {
  position: relative;

  display: inline-block;

  isolation: isolate;

  margin: 0;

  font-size:
    clamp(
      34px,
      9vw,
      40px
    );

  font-weight: 850;

  line-height: 1;

  letter-spacing: -1.3px;

  color: #eaf7ff;

  -webkit-text-stroke:
    0.55px
    rgba(202, 235, 255, 0.72);

  text-shadow:
    0 1px 0
      rgba(255, 255, 255, 0.72),

    0 2px 0
      rgba(88, 178, 255, 0.58),

    0 3px 1px
      rgba(5, 77, 157, 0.78),

    0 5px 4px
      rgba(0, 37, 94, 0.62),

    0 8px 12px
      rgba(0, 30, 78, 0.48),

    0 0 9px
      rgba(72, 177, 255, 0.60),

    0 0 22px
      rgba(20, 126, 255, 0.38);

  filter:
    drop-shadow(
      0 3px 5px
      rgba(0, 61, 144, 0.28)
    );
}


@supports (
  (-webkit-background-clip: text)
  or
  (background-clip: text)
) {
  .app-header h1 {
    background:
      linear-gradient(
        180deg,

        #ffffff 0%,

        #f7fcff 15%,

        #bce9ff 33%,

        #55baff 52%,

        #187ee9 70%,

        #80d7ff 84%,

        #eefaff 100%
      );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;

    -webkit-text-fill-color:
      transparent;
  }
}


/* soft illuminated body behind the letters */

.app-header h1::before {
  content: attr(data-text);

  position: absolute;

  inset: 0;

  z-index: -1;

  color: transparent;

  -webkit-text-stroke:
    2.2px
    rgba(24, 139, 255, 0.38);

  text-shadow:
    0 0 8px
      rgba(39, 162, 255, 0.58),

    0 0 18px
      rgba(18, 108, 255, 0.38);

  filter:
    blur(1.4px);

  transform:
    translateY(1.5px);

  pointer-events: none;
}


/* thin glossy highlight along upper part of letters */

.app-header h1::after {
  content: attr(data-text);

  position: absolute;

  inset: 0;

  z-index: 2;

  color: transparent;

  -webkit-text-stroke:
    0.7px
    rgba(255, 255, 255, 0.62);

  clip-path:
    inset(
      0
      0
      52%
      0
    );

  opacity: 0.85;

  transform:
    translateY(-0.5px);

  pointer-events: none;
}


/* ---------------------------------------------------------
   Summary numbers — glass depth instead of simple glow
   --------------------------------------------------------- */

.summary-copy strong {
  font-size: 38px;

  font-weight: 850;

  letter-spacing: -0.7px;

  -webkit-text-stroke:
    0.45px
    rgba(255, 255, 255, 0.28);
}


.summary-card--attention
.summary-copy strong {
  color: #ff6175;

  text-shadow:
    0 1px 0
      rgba(255, 236, 239, 0.82),

    0 2px 0
      rgba(226, 43, 69, 0.65),

    0 4px 2px
      rgba(108, 4, 24, 0.58),

    0 7px 10px
      rgba(83, 0, 17, 0.38),

    0 0 10px
      rgba(255, 54, 82, 0.58),

    0 0 22px
      rgba(255, 54, 82, 0.32);
}


.summary-card--work
.summary-copy strong {
  color: #ffc34e;

  text-shadow:
    0 1px 0
      rgba(255, 250, 217, 0.90),

    0 2px 0
      rgba(230, 155, 23, 0.72),

    0 4px 2px
      rgba(102, 57, 0, 0.58),

    0 7px 10px
      rgba(77, 42, 0, 0.34),

    0 0 10px
      rgba(255, 190, 49, 0.58),

    0 0 22px
      rgba(255, 174, 30, 0.30);
}


/* ---------------------------------------------------------
   Active filter — stronger raised/glass look
   --------------------------------------------------------- */

.filter-button.is-active {
  border-color:
    rgba(126, 214, 255, 0.78);

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.48),

    inset 0 -2px 0
      rgba(0, 68, 160, 0.38),

    0 2px 3px
      rgba(0, 45, 111, 0.42),

    0 0 12px
      rgba(37, 157, 255, 0.46),

    0 0 24px
      rgba(27, 132, 255, 0.22);

  text-shadow:
    0 1px 0
      rgba(255, 255, 255, 0.48),

    0 2px 2px
      rgba(0, 53, 127, 0.62),

    0 0 9px
      rgba(198, 235, 255, 0.34);
}


/* ---------------------------------------------------------
   Status pills — slightly more raised
   --------------------------------------------------------- */

.case-badge {
  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.10),

    0 2px 5px
      rgba(0, 0, 0, 0.18);
}


/* ---------------------------------------------------------
   CTA — glossy but not overdone
   --------------------------------------------------------- */

.bottom-action button {
  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.42),

    inset 0 -2px 0
      rgba(0, 60, 150, 0.30),

    0 3px 7px
      rgba(0, 39, 103, 0.34),

    0 0 18px
      rgba(25, 146, 255, 0.28);

  text-shadow:
    0 1px 0
      rgba(255, 255, 255, 0.44),

    0 2px 3px
      rgba(0, 52, 127, 0.50);
}


@media (max-width: 390px) {
  .app-header h1 {
    font-size: 35px;
  }

  .summary-copy strong {
    font-size: 36px;
  }
}
/* =========================================================
   PATCH 1G2 — Mini App case detail screen
   ========================================================= */

body.case-detail-open {
  overflow: hidden;
}

body.case-detail-open
.bottom-action {
  opacity: 0;
  pointer-events: none;
}

.case-detail-screen {
  position: fixed;
  z-index: 60;

  inset: 0;

  overflow-y: auto;
  overscroll-behavior: contain;

  background:
    radial-gradient(
      circle at 82% 0%,
      rgba(78, 87, 255, 0.20),
      transparent 31%
    ),
    linear-gradient(
      180deg,
      #081322 0%,
      #07101d 55%,
      #050b14 100%
    );

  color: var(--text);
}

.case-detail-shell {
  width: min(100%, 640px);

  min-height: 100%;

  margin: 0 auto;

  padding:
    max(14px, env(safe-area-inset-top))
    16px
    calc(
      28px
      + env(safe-area-inset-bottom)
    );
}

.case-detail-toolbar {
  position: sticky;
  z-index: 2;

  top: 0;

  display: flex;
  align-items: center;

  gap: 12px;

  padding:
    5px
    0
    13px;

  background:
    linear-gradient(
      180deg,
      rgba(7, 16, 29, 0.98) 65%,
      rgba(7, 16, 29, 0)
    );
}

.case-detail-back {
  min-height: 42px;

  padding:
    0
    14px;

  border:
    1px solid
    var(--border-bright);

  border-radius: 14px;

  background:
    var(--glass-soft);

  color: #d8e8f8;

  font-size: 13px;
  font-weight: 680;
}

.case-detail-number {
  color: var(--muted);

  font-size: 13px;
  font-weight: 650;
}

.case-detail-panel {
  overflow: hidden;

  padding: 18px;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-xl);

  background:
    linear-gradient(
      145deg,
      rgba(28, 58, 101, 0.72),
      rgba(10, 23, 43, 0.84)
    );

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.07),
    0 16px 38px
      rgba(0, 0, 0, 0.28);

  backdrop-filter:
    blur(22px)
    saturate(150%);

  -webkit-backdrop-filter:
    blur(22px)
    saturate(150%);
}

.case-detail-head {
  display: flex;
  align-items: flex-start;

  gap: 10px;
}

.case-detail-head h2 {
  min-width: 0;

  flex: 1 1 auto;

  margin: 0;

  color: var(--text);

  font-size: 22px;
  font-weight: 760;
  line-height: 1.22;

  letter-spacing: -0.35px;
}

.case-detail-fields {
  display: grid;

  gap: 9px;

  margin:
    18px
    0
    0;
}

.case-detail-field {
  display: grid;

  grid-template-columns:
    minmax(86px, 0.34fr)
    minmax(0, 1fr);

  gap: 10px;

  padding:
    10px
    12px;

  border:
    1px solid
    rgba(143, 197, 255, 0.10);

  border-radius: 13px;

  background:
    rgba(7, 17, 32, 0.30);
}

.case-detail-field dt,
.case-detail-field dd {
  margin: 0;

  font-size: 12px;
  line-height: 1.35;
}

.case-detail-field dt {
  color: #8fa5bc;

  font-weight: 620;
}

.case-detail-field dd {
  min-width: 0;

  color: #dce8f4;

  overflow-wrap: anywhere;
}

.case-detail-field--deadline dd {
  color: #f0c56c;
}

.case-detail-field--appeal dd {
  color: #9ed6ff;
}

.case-detail-section-title {
  margin:
    20px
    0
    10px;

  color: #c9d9e9;

  font-size: 14px;
  font-weight: 700;
}

.case-detail-gallery {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 9px;
}

.case-detail-photo {
  position: relative;

  overflow: hidden;

  min-height: 118px;

  aspect-ratio: 4 / 3;

  border:
    1px solid
    rgba(154, 201, 255, 0.15);

  border-radius: 14px;

  background:
    linear-gradient(
      145deg,
      rgba(45, 78, 120, 0.72),
      rgba(13, 29, 51, 0.92)
    );

  color: #8fa7bf;

  display: grid;
  place-items: center;

  font-size: 12px;
}

.case-detail-photo img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  opacity: 0;

  transition:
    opacity 180ms ease;
}

.case-detail-photo img.is-loaded {
  opacity: 1;
}

.case-detail-photo.is-preview {
  background:
    radial-gradient(
      circle at 70% 24%,
      rgba(91, 171, 255, 0.22),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      rgba(42, 75, 116, 0.76),
      rgba(13, 29, 51, 0.94)
    );
}

.case-detail-media-empty {
  grid-column: 1 / -1;

  padding:
    24px
    15px;

  border:
    1px dashed
    rgba(143, 197, 255, 0.15);

  border-radius: 14px;

  color: var(--muted);

  text-align: center;

  font-size: 12px;
}

@media (max-width: 420px) {
  .case-detail-shell {
    padding-left: 13px;
    padding-right: 13px;
  }

  .case-detail-panel {
    padding: 15px;
  }

  .case-detail-head h2 {
    font-size: 20px;
  }

  .case-detail-field {
    grid-template-columns:
      82px
      minmax(0, 1fr);
  }

  .case-detail-photo {
    min-height: 102px;
  }
}


/* =========================================================
   MINI APP PROBLEMS V1 — approved "Выявленные проблемы" design
   ========================================================= */

.problems-header {
  padding-bottom: 16px;
}

.problems-header h1 {
  max-width: 100%;
  font-size: clamp(32px, 8.2vw, 44px);
  line-height: 1.02;
  letter-spacing: -1.45px;
}

.problems-header p {
  margin-top: 6px;
  color: #8fb8ef;
  font-size: 15px;
}

.problems-summary-grid {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.problems-summary-grid
.summary-card {
  min-height: 102px;
  gap: 8px;
  padding: 11px 9px;
  border-radius: 17px;
}

.problems-summary-grid
.summary-mark {
  width: 43px;
  height: 43px;
  flex-basis: 43px;
}

.problems-summary-grid
.summary-mark--attention {
  height: 40px;
}

.problems-summary-grid
.summary-mark--attention span {
  font-size: 22px;
  transform: translateY(4px);
}

.summary-mark--waiting {
  border-radius: 14px;
  border: 1px solid rgba(255, 203, 42, 0.42);
  background:
    radial-gradient(
      circle at 38% 30%,
      rgba(255, 231, 115, 0.34),
      rgba(70, 56, 5, 0.55) 70%
    );
  color: #ffd94d;
  font-size: 27px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 15px rgba(255, 197, 32, 0.18);
}

.summary-mark--verification {
  border-radius: 14px;
  border: 1px solid rgba(34, 233, 190, 0.42);
  background:
    radial-gradient(
      circle at 38% 30%,
      rgba(76, 255, 217, 0.24),
      rgba(0, 65, 59, 0.56) 72%
    );
  color: #6af1d8;
  font-size: 25px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 15px rgba(24, 220, 183, 0.18);
}

.summary-mark--closed {
  border-radius: 14px;
  border: 1px solid rgba(137, 169, 203, 0.38);
  background:
    radial-gradient(
      circle at 38% 30%,
      rgba(167, 194, 224, 0.22),
      rgba(31, 55, 82, 0.62) 72%
    );
  color: #a9c2df;
  font-size: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 14px rgba(109, 151, 198, 0.14);
}

.problems-summary-grid
.summary-copy {
  min-width: 0;
}

.problems-summary-grid
.summary-label {
  color: #edf6ff;
  font-size: 11px;
  font-weight: 680;
  line-height: 1.18;
  white-space: normal;
}

.problems-summary-grid
.summary-copy strong {
  margin-top: 5px;
  font-size: 27px;
}

.summary-card--waiting strong {
  color: #ffd456;
  text-shadow:
    0 0 14px rgba(255, 204, 48, 0.28);
}

.summary-card--verification strong {
  color: #66efd5;
  text-shadow:
    0 0 14px rgba(34, 231, 190, 0.25);
}

.summary-card--closed strong {
  color: #b3c8df;
  text-shadow:
    0 0 14px rgba(124, 164, 207, 0.20);
}

.summary-card--waiting.is-selected {
  border-color: rgba(255, 207, 62, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 0 22px rgba(255, 194, 31, 0.16);
}

.summary-card--verification.is-selected {
  border-color: rgba(55, 235, 199, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 0 22px rgba(32, 221, 184, 0.16);
}

.summary-card--closed.is-selected {
  border-color: rgba(143, 183, 224, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 0 22px rgba(102, 153, 207, 0.16);
}

.filters-wrap {
  margin-top: 13px;
}

.filters {
  gap: 7px;
}

.filter-button {
  min-height: 42px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12px;
}

.problem-search {
  min-height: 55px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 0 16px;
  border: 1px solid rgba(54, 171, 255, 0.72);
  border-radius: 16px;
  background:
    linear-gradient(
      145deg,
      rgba(22, 58, 105, 0.78),
      rgba(10, 31, 60, 0.84)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 18px rgba(15, 130, 255, 0.12);
}

.problem-search:focus-within {
  border-color: rgba(75, 190, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 21px rgba(20, 144, 255, 0.24);
}

.problem-search__icon {
  flex: 0 0 auto;
  color: #88bdfc;
  font-size: 28px;
  line-height: 1;
  transform: translateY(-1px);
}

.problem-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eef7ff;
  font: inherit;
  font-size: 14px;
}

.problem-search input::placeholder {
  color: #8db2df;
  opacity: 1;
}

.problem-search input::-webkit-search-cancel-button {
  filter: invert(1);
  opacity: 0.65;
}

.case-list {
  gap: 9px;
  margin-top: 10px;
}

.case-card {
  min-height: 88px;
  grid-template-columns:
    60px
    minmax(0, 1fr)
    14px;
  gap: 11px;
  padding: 10px 12px 10px 10px;
  border-color: rgba(67, 169, 255, 0.48);
  border-radius: 17px;
  background:
    linear-gradient(
      145deg,
      rgba(19, 55, 99, 0.78),
      rgba(8, 28, 54, 0.88)
    );
}

.case-media {
  width: 58px;
  height: 64px;
  border-radius: 14px;
  border-color: rgba(86, 180, 255, 0.44);
}

.case-heading {
  gap: 8px;
  align-items: center;
}

.case-title {
  color: #f6fbff;
  font-size: 16px;
  font-weight: 770;
  line-height: 1.18;
  letter-spacing: -0.2px;
}

.case-badge {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 680;
  white-space: nowrap;
}

.case-details {
  gap: 3px;
  margin-top: 4px;
}

.case-detail {
  font-size: 12px;
  line-height: 1.25;
}

.case-detail--location {
  color: #8fbaf0;
}

.case-detail--state {
  position: relative;
  padding-left: 14px;
}

.case-detail--state::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.46em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.case-detail--state-action {
  color: #ff5e74;
}

.case-detail--state-waiting {
  color: #ffd250;
}

.case-detail--state-verification {
  color: #60e8ce;
}

.case-detail--state-active {
  color: #7bbfff;
}

.case-detail--state-closed {
  color: #91a5bd;
}

.case-chevron {
  color: #91c5ff;
  font-size: 32px;
  font-weight: 300;
}

.media-count {
  display: none;
}

.bottom-space {
  height: 8px;
}

.bottom-action {
  flex: 0 0 auto;
  padding:
    8px
    14px
    7px;
  background:
    linear-gradient(
      to top,
      rgba(5, 11, 20, 0.98),
      rgba(5, 11, 20, 0.72)
    );
}

.bottom-action button {
  width: min(calc(100vw - 28px), 612px);
  min-height: 54px;
  border-radius: 16px;
  font-size: 16px;
}

.bottom-nav {
  flex: 0 0 auto;
  width: min(calc(100% - 24px), 616px);
  min-height: 68px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin:
    0
    auto
    calc(8px + env(safe-area-inset-bottom));
  padding: 4px;
  border: 1px solid rgba(65, 153, 245, 0.35);
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(15, 47, 89, 0.96),
      rgba(6, 24, 48, 0.98)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.28);
}

.bottom-nav__item {
  min-width: 0;
  min-height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #9bc1f2;
  font-size: 11px;
  line-height: 1.1;
}

.bottom-nav__item.is-active {
  border: 1px solid rgba(73, 184, 255, 0.82);
  background:
    linear-gradient(
      145deg,
      rgba(25, 139, 255, 0.88),
      rgba(10, 88, 205, 0.88)
    );
  color: #75f2ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 0 18px rgba(29, 151, 255, 0.26);
}

.bottom-nav__item[aria-disabled="true"] {
  cursor: default;
}

.bottom-nav__icon {
  display: block;
  font-size: 23px;
  line-height: 1;
}

@media (max-width: 420px) {
  .problems-header h1 {
    font-size: 31px;
  }

  .problems-summary-grid {
    gap: 6px;
  }

  .problems-summary-grid
  .summary-card {
    min-height: 96px;
    padding: 9px 7px;
  }

  .problems-summary-grid
  .summary-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .problems-summary-grid
  .summary-label {
    font-size: 10px;
  }

  .problems-summary-grid
  .summary-copy strong {
    font-size: 24px;
  }

  .case-card {
    grid-template-columns:
      54px
      minmax(0, 1fr)
      12px;
    gap: 9px;
  }

  .case-media {
    width: 52px;
    height: 58px;
  }

  .case-title {
    font-size: 15px;
  }

  .case-badge {
    padding: 6px 8px;
    font-size: 10px;
  }

  .bottom-nav {
    width: calc(100% - 20px);
  }
}


/* =========================================================
   MINI APP PROBLEMS V2 — visual alignment to approved mockup
   Four-state adaptation: 2x2 summary grid.
   ========================================================= */

body {
  background:
    radial-gradient(
      circle at 102% 13%,
      rgba(26, 74, 255, 0.42),
      transparent 31%
    ),
    radial-gradient(
      circle at -6% 22%,
      rgba(0, 113, 255, 0.34),
      transparent 30%
    ),
    radial-gradient(
      circle at 48% 76%,
      rgba(0, 89, 211, 0.20),
      transparent 44%
    ),
    linear-gradient(
      180deg,
      #031326 0%,
      #041b35 48%,
      #031226 100%
    );
}

.ambient--one {
  width: 320px;
  height: 320px;
  top: 80px;
  right: -150px;
  background: rgba(35, 67, 255, 0.27);
  filter: blur(66px);
}

.ambient--two {
  width: 280px;
  height: 280px;
  top: 430px;
  left: -145px;
  background: rgba(0, 133, 255, 0.22);
  filter: blur(62px);
}

.problems-header {
  width: min(100%, 720px);
  margin: 0 auto;
  padding:
    max(18px, env(safe-area-inset-top))
    24px
    18px;
}

.problems-header h1 {
  display: block;
  max-width: none;
  margin: 0;
  background: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  -webkit-text-stroke: 0;
  filter: none;
  font-size: clamp(38px, 7.8vw, 52px);
  font-weight: 860;
  line-height: 0.98;
  letter-spacing: -2px;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.12),
    0 5px 16px rgba(0, 76, 181, 0.34);
}

.problems-header h1::before,
.problems-header h1::after {
  content: none;
  display: none;
}

.problems-header p {
  margin: 9px 0 0;
  color: #85b7fb;
  font-size: 19px;
  font-weight: 440;
  line-height: 1.25;
}

.app-shell {
  width: min(100%, 720px);
  padding:
    4px
    24px
    0;
}

.problems-summary-grid {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.problems-summary-grid
.summary-card {
  min-height: 112px;
  display: grid;
  grid-template-columns:
    62px
    minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border:
    1px solid
    rgba(83, 160, 255, 0.48);
  border-radius: 19px;
  background:
    linear-gradient(
      135deg,
      rgba(16, 59, 109, 0.84),
      rgba(11, 40, 78, 0.86)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.24),
    0 13px 29px rgba(0, 8, 29, 0.28);
}

.problems-summary-grid
.summary-card::before {
  left: 18px;
  right: 18px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(222, 243, 255, 0.42),
      transparent
    );
}

.problems-summary-grid
.summary-mark {
  width: 62px;
  height: 62px;
  flex-basis: 62px;
  border-radius: 16px;
}

.problems-summary-grid
.summary-mark--attention {
  width: 62px;
  height: 58px;
  border-radius: 0;
  filter:
    drop-shadow(
      0 0 13px
      rgba(255, 61, 91, 0.72)
    );
}

.problems-summary-grid
.summary-mark--attention span {
  font-size: 31px;
  transform: translateY(6px);
}

.summary-mark--waiting {
  border-color: rgba(255, 208, 56, 0.60);
  background:
    radial-gradient(
      circle at 34% 26%,
      rgba(255, 238, 114, 0.35),
      rgba(76, 59, 2, 0.66) 72%
    );
  color: #ffe052;
  font-size: 37px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 0 20px rgba(255, 197, 25, 0.31);
}

.summary-mark--verification {
  border-color: rgba(24, 237, 207, 0.62);
  background:
    radial-gradient(
      circle at 34% 26%,
      rgba(78, 255, 225, 0.29),
      rgba(0, 67, 65, 0.70) 72%
    );
  color: #7bf8df;
  font-size: 34px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 0 20px rgba(26, 224, 192, 0.28);
}

.summary-mark--closed {
  border-color: rgba(118, 176, 236, 0.54);
  background:
    radial-gradient(
      circle at 34% 26%,
      rgba(160, 210, 255, 0.26),
      rgba(24, 58, 94, 0.72) 72%
    );
  color: #b9d9fb;
  font-size: 33px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 0 18px rgba(74, 153, 235, 0.21);
}

.problems-summary-grid
.summary-copy {
  min-width: 0;
}

.problems-summary-grid
.summary-label {
  color: #f5f9ff;
  font-size: 14px;
  font-weight: 730;
  line-height: 1.22;
  letter-spacing: -0.1px;
}

.problems-summary-grid
.summary-copy strong {
  margin-top: 5px;
  font-size: 30px;
  font-weight: 810;
  line-height: 0.95;
}

.summary-card--attention
.summary-copy strong {
  color: #ff6680;
}

.summary-card--waiting
.summary-copy strong {
  color: #ffd84d;
}

.summary-card--verification
.summary-copy strong {
  color: #62efd5;
}

.summary-card--closed
.summary-copy strong {
  color: #bad6f2;
}

.problem-search {
  min-height: 58px;
  margin-top: 17px;
  padding: 0 18px;
  gap: 13px;
  border:
    1.5px solid
    rgba(35, 172, 255, 0.96);
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      rgba(17, 64, 118, 0.88),
      rgba(12, 45, 87, 0.90)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 18px rgba(0, 137, 255, 0.16);
}

.problem-search__icon {
  color: #80b9ff;
  font-size: 32px;
}

.problem-search input {
  color: #f0f7ff;
  font-size: 17px;
  font-weight: 450;
}

.problem-search input::placeholder {
  color: #88b4ee;
}

.case-list {
  gap: 12px;
  margin-top: 17px;
}

.case-card {
  min-height: 108px;
  grid-template-columns:
    78px
    minmax(0, 1fr)
    20px;
  gap: 14px;
  padding:
    13px
    16px
    13px
    14px;
  border:
    1.5px solid
    rgba(27, 155, 255, 0.80);
  border-radius: 19px;
  background:
    linear-gradient(
      135deg,
      rgba(12, 59, 108, 0.91),
      rgba(7, 39, 78, 0.94)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 8px 24px rgba(0, 7, 25, 0.22);
}

.case-card::before {
  left: 22px;
  right: 22px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(185, 226, 255, 0.25),
      transparent
    );
}

.case-media,
.case-media.no-photo {
  width: 78px;
  height: 78px;
  border:
    1px solid
    rgba(64, 176, 255, 0.72);
  border-radius: 17px;
  background:
    radial-gradient(
      circle at 50% 42%,
      rgba(51, 142, 232, 0.22),
      rgba(11, 44, 82, 0.92) 70%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 16px rgba(0, 117, 255, 0.15);
}

.case-media .case-mark {
  display: none;
}

.case-photo-placeholder {
  color: #6cb5ff;
  font-size: 31px;
  opacity: 0.80;
}

.case-media.preview-art::before,
.case-media.preview-art::after {
  box-sizing: border-box;
}

/* Preview icon: leak / droplet */
.case-media.preview-art--leak::before {
  inset: 17px 22px 20px;
  border:
    3px solid
    #ff6684;
  border-radius:
    52%
    52%
    58%
    42%;
  background:
    radial-gradient(
      circle at 38% 30%,
      rgba(255, 217, 226, 0.95),
      rgba(255, 70, 111, 0.96) 48%,
      rgba(199, 22, 74, 0.96) 100%
    );
  transform: rotate(45deg);
  filter:
    drop-shadow(
      0 0 10px
      rgba(255, 48, 96, 0.70)
    );
}

.case-media.preview-art--leak::after {
  display: none;
}

/* Preview icon: document */
.case-media.preview-art--document::before {
  inset: 15px 21px;
  border:
    2px solid
    rgba(255, 220, 92, 0.88);
  border-radius: 5px;
  background:
    repeating-linear-gradient(
      180deg,
      #ffdc58 0 6px,
      #ffdc58 6px 7px,
      transparent 7px 13px
    ),
    linear-gradient(
      145deg,
      #ffdf67,
      #d99f17
    );
  filter:
    drop-shadow(
      0 0 9px
      rgba(255, 190, 38, 0.48)
    );
}

.case-media.preview-art--document::after {
  display: none;
}

/* Preview icon: sound */
.case-media.preview-art--night::before {
  inset: 23px 38px 23px 20px;
  clip-path:
    polygon(
      0 34%,
      35% 34%,
      100% 0,
      100% 100%,
      35% 66%,
      0 66%
    );
  background: #55f0c8;
  filter:
    drop-shadow(
      0 0 9px
      rgba(50, 235, 190, 0.58)
    );
}

.case-media.preview-art--night::after {
  inset: 23px 12px 23px auto;
  width: 20px;
  border:
    3px solid
    #55f0c8;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  background: transparent;
  filter:
    drop-shadow(
      0 0 7px
      rgba(50, 235, 190, 0.50)
    );
}

/* Preview icon: light bulb */
.case-media.preview-art--light::before {
  inset: 15px 22px 29px;
  border:
    2px solid
    #76c8ff;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 42% 35%,
      #e8f9ff 0 8%,
      #79ceff 22%,
      #248fff 64%,
      #0b4fad 100%
    );
  filter:
    drop-shadow(
      0 0 11px
      rgba(62, 164, 255, 0.70)
    );
}

.case-media.preview-art--light::after {
  inset: auto 29px 13px;
  height: 16px;
  border-radius: 3px 3px 7px 7px;
  background:
    linear-gradient(
      180deg,
      #8bd4ff,
      #2b7ed0
    );
}

.case-media.preview-art
.case-photo-placeholder {
  display: none;
}

.case-heading {
  align-items: center;
  gap: 10px;
}

.case-title {
  color: #ffffff;
  font-size: 19px;
  font-weight: 790;
  line-height: 1.14;
  letter-spacing: -0.3px;
}

.case-badge {
  max-width: none;
  padding: 8px 13px;
  border:
    1px solid
    currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 690;
  line-height: 1;
}

.case-badge.action {
  background: rgba(141, 20, 55, 0.34);
  color: #ff7187;
  box-shadow:
    0 0 15px rgba(255, 49, 83, 0.14);
}

.case-badge.waiting {
  background: rgba(112, 79, 0, 0.34);
  color: #ffd43c;
  box-shadow:
    0 0 15px rgba(255, 191, 31, 0.12);
}

.case-badge.verification {
  background: rgba(0, 94, 77, 0.36);
  color: #5cecc9;
  box-shadow:
    0 0 15px rgba(38, 225, 185, 0.12);
}

.case-badge.active {
  background: rgba(0, 91, 170, 0.36);
  color: #69c3ff;
  box-shadow:
    0 0 15px rgba(41, 151, 255, 0.12);
}

.case-badge.closed {
  background: rgba(75, 102, 132, 0.31);
  color: #b7cce2;
}

.case-details {
  gap: 4px;
  margin-top: 5px;
}

.case-detail {
  color: #8bb9f4;
  font-size: 15px;
  line-height: 1.25;
}

.case-detail--state {
  padding-left: 19px;
  font-weight: 520;
}

.case-detail--state::before {
  left: 1px;
  top: 0.40em;
  width: 10px;
  height: 10px;
}

.case-detail--state-action {
  color: #ff5f79;
}

.case-detail--state-waiting {
  color: #ffd14a;
}

.case-detail--state-verification {
  color: #56e8c5;
}

.case-detail--state-active {
  color: #84baff;
}

.case-detail--state-closed {
  color: #a8bfd8;
}

.case-chevron {
  color: #8fc4ff;
  font-size: 39px;
  font-weight: 260;
}

.bottom-space {
  height: 10px;
}

.bottom-action {
  padding:
    11px
    24px
    9px;
  background:
    linear-gradient(
      to top,
      rgba(2, 15, 31, 1),
      rgba(2, 15, 31, 0.76)
    );
}

.bottom-action button {
  width: min(calc(100vw - 48px), 672px);
  min-height: 62px;
  border:
    1.5px solid
    rgba(77, 224, 255, 0.96);
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      #168bff,
      #056fe7
    );
  font-size: 19px;
  font-weight: 770;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 0 19px rgba(0, 181, 255, 0.48),
    0 10px 28px rgba(0, 66, 160, 0.31);
}

.plus {
  margin-right: 10px;
  font-size: 31px;
}

.bottom-nav {
  width: min(calc(100% - 48px), 672px);
  min-height: 82px;
  gap: 6px;
  margin:
    0
    auto
    calc(9px + env(safe-area-inset-bottom));
  padding: 5px;
  border:
    1px solid
    rgba(46, 135, 234, 0.60);
  border-radius: 24px;
  background:
    linear-gradient(
      145deg,
      rgba(12, 57, 108, 0.98),
      rgba(7, 34, 70, 0.99)
    );
}

.bottom-nav__item {
  min-height: 70px;
  gap: 5px;
  border-radius: 19px;
  color: #8ebef8;
  font-size: 13px;
}

.bottom-nav__item.is-active {
  border:
    1px solid
    rgba(93, 219, 255, 0.92);
  background:
    linear-gradient(
      145deg,
      rgba(21, 145, 255, 0.95),
      rgba(8, 97, 218, 0.95)
    );
  color: #75f4ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 0 19px rgba(20, 151, 255, 0.34);
}

.bottom-nav__icon {
  font-size: 29px;
  line-height: 1;
}

@media (max-width: 520px) {
  .problems-header {
    padding:
      max(14px, env(safe-area-inset-top))
      16px
      14px;
  }

  .problems-header h1 {
    font-size: clamp(31px, 9.2vw, 40px);
    letter-spacing: -1.45px;
  }

  .problems-header p {
    font-size: 15px;
  }

  .app-shell {
    padding:
      3px
      16px
      0;
  }

  .problems-summary-grid {
    gap: 9px;
  }

  .problems-summary-grid
  .summary-card {
    min-height: 104px;
    grid-template-columns:
      53px
      minmax(0, 1fr);
    gap: 10px;
    padding: 12px 11px;
  }

  .problems-summary-grid
  .summary-mark {
    width: 53px;
    height: 53px;
    flex-basis: 53px;
  }

  .problems-summary-grid
  .summary-mark--attention {
    width: 53px;
    height: 49px;
  }

  .problems-summary-grid
  .summary-label {
    font-size: 12px;
  }

  .problems-summary-grid
  .summary-copy strong {
    font-size: 27px;
  }

  .problem-search {
    min-height: 56px;
    margin-top: 13px;
    padding: 0 15px;
  }

  .problem-search input {
    font-size: 15px;
  }

  .case-list {
    gap: 9px;
    margin-top: 11px;
  }

  .case-card {
    min-height: 96px;
    grid-template-columns:
      64px
      minmax(0, 1fr)
      15px;
    gap: 11px;
    padding:
      10px
      12px
      10px
      10px;
  }

  .case-media,
  .case-media.no-photo {
    width: 64px;
    height: 64px;
  }

  .case-title {
    font-size: 16px;
  }

  .case-badge {
    padding: 7px 9px;
    font-size: 10px;
  }

  .case-detail {
    font-size: 12px;
  }

  .bottom-action {
    padding:
      8px
      16px
      7px;
  }

  .bottom-action button {
    width: min(calc(100vw - 32px), 672px);
    min-height: 57px;
    font-size: 17px;
  }

  .bottom-nav {
    width: calc(100% - 32px);
    min-height: 72px;
  }

  .bottom-nav__item {
    min-height: 61px;
    font-size: 11px;
  }

  .bottom-nav__icon {
    font-size: 24px;
  }
}


/* =========================================================
   MINI APP PROBLEMS V3 — reference fidelity / short viewport
   ========================================================= */

.app-shell {
  padding:
    max(14px, env(safe-area-inset-top))
    24px
    0;
}

.problems-header {
  width: 100%;
  margin: 0;
  padding:
    0
    0
    18px;
}

.problems-header h1 {
  font-size: clamp(40px, 7.2vw, 50px);
  letter-spacing: -1.8px;
}

.problems-header p {
  margin-top: 8px;
  font-size: 18px;
}

.summary-card--attention {
  border-color:
    rgba(114, 147, 255, 0.62);
}

.summary-card--waiting {
  border-color:
    rgba(187, 160, 67, 0.58);
}

.summary-card--verification {
  border-color:
    rgba(40, 221, 207, 0.66);
}

.summary-card--closed {
  border-color:
    rgba(102, 160, 219, 0.55);
}

.problems-summary-grid
.summary-label {
  font-size: 15px;
}

.problems-summary-grid
.summary-copy strong {
  font-size: 31px;
}

.case-media.preview-art--leak::before {
  inset:
    13px
    20px
    15px;
  border: 0;
  border-radius: 0;
  clip-path:
    polygon(
      50% 0%,
      67% 23%,
      84% 46%,
      94% 64%,
      91% 79%,
      79% 92%,
      63% 100%,
      50% 100%,
      37% 100%,
      21% 92%,
      9% 79%,
      6% 64%,
      16% 46%,
      33% 23%
    );
  background:
    radial-gradient(
      circle at 38% 30%,
      #fff4f8 0 7%,
      #ff8ca6 18%,
      #ff5278 48%,
      #d21855 78%,
      #8b0c38 100%
    );
  transform: none;
  box-shadow:
    inset 0 0 0 2px
      rgba(255, 184, 205, 0.55);
  filter:
    drop-shadow(
      0 0 10px
      rgba(255, 45, 92, 0.78)
    );
}

.case-media.preview-art--leak::after {
  display: block;
  inset:
    24px
    31px
    31px
    25px;
  border:
    2px solid
    rgba(255, 235, 242, 0.72);
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  background: transparent;
  transform:
    rotate(30deg);
}

.case-badge {
  padding:
    9px
    14px;
  font-size: 13px;
}

.bottom-nav__item {
  font-weight: 520;
}

@media (max-width: 520px) {
  .app-shell {
    padding:
      max(12px, env(safe-area-inset-top))
      16px
      0;
  }

  .problems-header {
    padding-bottom: 14px;
  }

  .problems-header h1 {
    font-size: clamp(34px, 9vw, 42px);
  }

  .problems-header p {
    font-size: 15px;
  }

  .problems-summary-grid
  .summary-label {
    font-size: 13px;
  }

  .problems-summary-grid
  .summary-copy strong {
    font-size: 28px;
  }

  .case-badge {
    padding:
      7px
      10px;
    font-size: 10px;
  }
}

@media (max-height: 780px) {
  .problems-header {
    padding-bottom: 10px;
  }

  .problems-header h1 {
    font-size: clamp(34px, 7vw, 44px);
  }

  .problems-header p {
    margin-top: 5px;
    font-size: 14px;
  }

  .problems-summary-grid {
    gap: 8px;
  }

  .problems-summary-grid
  .summary-card {
    min-height: 91px;
    grid-template-columns:
      48px
      minmax(0, 1fr);
    gap: 9px;
    padding:
      10px
      11px;
  }

  .problems-summary-grid
  .summary-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .problems-summary-grid
  .summary-mark--attention {
    width: 48px;
    height: 45px;
  }

  .problems-summary-grid
  .summary-label {
    font-size: 12px;
  }

  .problems-summary-grid
  .summary-copy strong {
    font-size: 26px;
  }

  .problem-search {
    min-height: 50px;
    margin-top: 10px;
  }

  .case-list {
    margin-top: 10px;
  }

  .bottom-action {
    padding:
      6px
      16px
      5px;
  }

  .bottom-action button {
    min-height: 52px;
    font-size: 16px;
  }

  .plus {
    font-size: 27px;
  }

  .bottom-nav {
    min-height: 64px;
    margin-bottom:
      calc(
        5px
        + env(safe-area-inset-bottom)
      );
  }

  .bottom-nav__item {
    min-height: 54px;
    font-size: 10px;
  }

  .bottom-nav__icon {
    font-size: 22px;
  }
}


/* =========================================================
   MINI APP PROBLEMS V4 — reference-scale geometry + icons
   ========================================================= */

.problems-header {
  padding-top: 12px;
  padding-bottom: 20px;
}

.problems-header h1 {
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  font-size: clamp(42px, 7.3vw, 54px);
  font-weight: 870;
  line-height: 0.96;
  letter-spacing: -2.15px;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.10),
    0 6px 18px rgba(0, 66, 167, 0.30);
}

.problems-header p {
  margin-top: 10px;
  color: #86b9fb;
  font-size: 19px;
  line-height: 1.22;
}

.problems-summary-grid {
  gap: 13px;
}

.problems-summary-grid
.summary-card {
  min-height: 122px;
  grid-template-columns:
    68px
    minmax(0, 1fr);
  gap: 15px;
  padding:
    16px
    18px;
  border-width: 1.5px;
  border-radius: 21px;
  background:
    linear-gradient(
      135deg,
      rgba(17, 61, 113, 0.91),
      rgba(10, 42, 82, 0.92)
    );
}

.problems-summary-grid
.summary-mark,
.problems-summary-grid
.summary-mark--attention {
  width: 68px;
  height: 68px;
  flex-basis: 68px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  clip-path: none;
  filter: none;
}

.summary-mark--attention {
  border:
    1px solid
    rgba(255, 91, 133, 0.65);
  background:
    radial-gradient(
      circle at 35% 28%,
      rgba(255, 129, 164, 0.34),
      rgba(74, 13, 44, 0.74) 72%
    );
  color: #ff627f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 0 21px rgba(255, 45, 91, 0.29);
}

.summary-mark--waiting {
  border-color:
    rgba(255, 211, 57, 0.68);
  color: #ffe052;
}

.summary-mark--verification {
  border-color:
    rgba(38, 242, 214, 0.72);
  color: #67f0d5;
}

.summary-mark--closed {
  border-color:
    rgba(128, 187, 246, 0.58);
  color: #a9d2fb;
}

.summary-svg {
  width: 46px;
  height: 46px;
  overflow: visible;
}

.summary-svg path,
.summary-svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-mark--attention
.summary-svg path:first-child {
  fill: #ff526f;
  stroke: #ff7088;
  stroke-width: 1.6;
}

.summary-mark--attention
.summary-svg path:nth-child(2),
.summary-mark--attention
.summary-svg circle {
  stroke: #ffffff;
  fill: #ffffff;
}

.problems-summary-grid
.summary-label {
  font-size: 15px;
  font-weight: 760;
  line-height: 1.18;
}

.problems-summary-grid
.summary-copy strong {
  margin-top: 7px;
  font-size: 32px;
  font-weight: 830;
}

.problem-search {
  min-height: 64px;
  margin-top: 20px;
  padding:
    0
    20px;
  gap: 15px;
  border-width: 1.5px;
  border-radius: 19px;
}

.problem-search__icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: #82baff;
  transform: none;
}

.problem-search__icon svg {
  width: 29px;
  height: 29px;
}

.problem-search__icon circle,
.problem-search__icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.problem-search input {
  font-size: 18px;
}

.case-list {
  gap: 13px;
  margin-top: 20px;
}

.case-card {
  min-height: 120px;
  grid-template-columns:
    84px
    minmax(0, 1fr)
    22px;
  gap: 16px;
  padding:
    15px
    17px
    15px
    15px;
  border-width: 1.5px;
  border-radius: 21px;
}

.case-media,
.case-media.no-photo {
  width: 84px;
  height: 84px;
  border-radius: 18px;
}

.case-title {
  font-size: 21px;
  line-height: 1.14;
  font-weight: 800;
}

.case-detail {
  font-size: 16px;
}

.case-badge {
  padding:
    10px
    16px;
  font-size: 13px;
  font-weight: 720;
}

.case-chevron {
  font-size: 42px;
}

.bottom-action {
  padding:
    12px
    24px
    10px;
}

.bottom-action button {
  min-height: 68px;
  border-radius: 20px;
  font-size: 20px;
}

.plus {
  font-size: 34px;
}

.bottom-nav {
  min-height: 90px;
  padding: 6px;
  border-radius: 26px;
}

.bottom-nav__item {
  min-height: 76px;
  gap: 5px;
  border-radius: 21px;
  font-size: 14px;
}

.bottom-nav__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}

.bottom-nav__icon svg {
  width: 30px;
  height: 30px;
  overflow: visible;
}

.bottom-nav__icon path,
.bottom-nav__icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav__item:last-child
.bottom-nav__icon circle {
  fill: currentColor;
  stroke: none;
}

/* The previous short-height block compressed the mockup too aggressively.
   Keep footer usable, but preserve reference-scale content. */
@media (max-height: 780px) {
  .problems-header {
    padding-top: 10px;
    padding-bottom: 16px;
  }

  .problems-header h1 {
    font-size: clamp(40px, 7vw, 50px);
  }

  .problems-header p {
    margin-top: 8px;
    font-size: 17px;
  }

  .problems-summary-grid {
    gap: 11px;
  }

  .problems-summary-grid
  .summary-card {
    min-height: 112px;
    grid-template-columns:
      62px
      minmax(0, 1fr);
    gap: 13px;
    padding:
      14px
      16px;
  }

  .problems-summary-grid
  .summary-mark,
  .problems-summary-grid
  .summary-mark--attention {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
  }

  .summary-svg {
    width: 42px;
    height: 42px;
  }

  .problems-summary-grid
  .summary-label {
    font-size: 14px;
  }

  .problems-summary-grid
  .summary-copy strong {
    font-size: 30px;
  }

  .problem-search {
    min-height: 60px;
    margin-top: 16px;
  }

  .case-list {
    margin-top: 16px;
  }

  .bottom-action {
    padding:
      8px
      20px
      7px;
  }

  .bottom-action button {
    min-height: 60px;
    font-size: 18px;
  }

  .bottom-nav {
    min-height: 78px;
    margin-bottom:
      calc(
        6px
        + env(safe-area-inset-bottom)
      );
  }

  .bottom-nav__item {
    min-height: 66px;
    font-size: 12px;
  }

  .bottom-nav__icon {
    width: 28px;
    height: 28px;
  }

  .bottom-nav__icon svg {
    width: 27px;
    height: 27px;
  }
}

@media (max-width: 520px) {
  .problems-header {
    padding-top: 8px;
    padding-bottom: 15px;
  }

  .problems-header h1 {
    font-size: clamp(34px, 9.4vw, 43px);
  }

  .problems-header p {
    font-size: 15px;
  }

  .problems-summary-grid
  .summary-card {
    min-height: 104px;
    grid-template-columns:
      54px
      minmax(0, 1fr);
    gap: 10px;
    padding:
      12px
      11px;
  }

  .problems-summary-grid
  .summary-mark,
  .problems-summary-grid
  .summary-mark--attention {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 14px;
  }

  .summary-svg {
    width: 37px;
    height: 37px;
  }

  .problems-summary-grid
  .summary-label {
    font-size: 12px;
  }

  .problems-summary-grid
  .summary-copy strong {
    font-size: 27px;
  }

  .problem-search {
    min-height: 56px;
    margin-top: 13px;
    padding:
      0
      15px;
  }

  .problem-search input {
    font-size: 15px;
  }

  .case-card {
    min-height: 100px;
    grid-template-columns:
      66px
      minmax(0, 1fr)
      16px;
    gap: 11px;
    padding:
      11px
      12px
      11px
      11px;
  }

  .case-media,
  .case-media.no-photo {
    width: 66px;
    height: 66px;
  }

  .case-title {
    font-size: 17px;
  }

  .case-detail {
    font-size: 13px;
  }

  .case-badge {
    padding:
      7px
      10px;
    font-size: 10px;
  }

  .bottom-action {
    padding:
      8px
      16px
      7px;
  }

  .bottom-action button {
    min-height: 58px;
    font-size: 17px;
  }

  .bottom-nav {
    width: calc(100% - 32px);
    min-height: 74px;
  }

  .bottom-nav__item {
    min-height: 62px;
    font-size: 11px;
  }
}


/* =========================================================
   MINI APP PROBLEMS V5 — 430px mobile fidelity pass
   ========================================================= */

@media (max-width: 520px) {
  .problems-header h1 {
    font-size: 34px;
    line-height: 1;
    letter-spacing: -1.35px;
    white-space: nowrap;
  }

  .problems-header p {
    margin-top: 7px;
    font-size: 14px;
  }

  .problems-summary-grid
  .summary-card {
    min-height: 100px;
  }

  .problems-summary-grid
  .summary-label {
    font-size: 11.5px;
  }

  .problems-summary-grid
  .summary-copy strong {
    font-size: 26px;
  }

  .case-card {
    min-height: 92px;
    grid-template-columns:
      58px
      minmax(0, 1fr)
      13px;
    gap: 10px;
    padding:
      10px
      11px
      10px
      10px;
  }

  .case-media,
  .case-media.no-photo {
    width: 58px;
    height: 58px;
    border-radius: 15px;
  }

  .case-heading {
    display: grid;
    grid-template-columns:
      minmax(0, 1fr)
      auto;
    align-items: center;
    gap: 8px;
  }

  .case-title {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
    text-overflow: ellipsis;
    -webkit-line-clamp: unset;
  }

  .case-badge {
    max-width: 118px;
    padding:
      6px
      8px;
    font-size: 9.5px;
    white-space: nowrap;
  }

  .case-details {
    margin-top: 4px;
  }

  .case-detail {
    font-size: 12px;
  }

  .case-chevron {
    font-size: 33px;
  }
}
