/* ==================================================================
   Public portal — the pages people see after scanning the QR code.
   Mobile first; most visitors arrive on a phone.
   ================================================================== */

body.portal {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #F2F9FB 0%, #F8FBFC 340px, #FFFFFF 760px);
  overflow-x: hidden;
}

/* decorative background */
.p-bg { position: absolute; inset: 0 0 auto 0; height: 720px; pointer-events: none; overflow: hidden; z-index: 0; }
.blob { position: absolute; }
.blob-1 { width: 620px; height: 620px; right: -250px; top: -300px; background: radial-gradient(closest-side, rgba(170, 220, 235, .8), rgba(170, 220, 235, .35) 55%, rgba(170, 220, 235, 0)); }
.blob-2 { width: 460px; height: 460px; left: -250px; top: 120px; background: radial-gradient(closest-side, rgba(247, 188, 199, .45), rgba(247, 188, 199, 0)); }
.blob-3 { width: 420px; height: 420px; right: -200px; top: 400px; background: radial-gradient(closest-side, rgba(157, 209, 177, .35), rgba(157, 209, 177, 0)); }
.p-dots { position: absolute; right: 18px; top: 74px; fill: #95D3E6; opacity: .55; }
.is-form .p-dots, .is-track .p-dots { opacity: .3; }

.p-header, .p-main, .p-footer { position: relative; z-index: 1; }

/* header */
.p-header { width: 100%; max-width: 820px; margin: 0 auto; padding: 22px 20px 6px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; letter-spacing: -.03em; }
.brand-logo { height: 34px; width: auto; max-width: 180px; object-fit: contain; }
.brand-sep { width: 1.5px; height: 22px; background: var(--line); border-radius: 2px; }
.brand-app { font-size: .95rem; font-weight: 550; color: var(--muted); }

.p-main { width: 100%; max-width: 820px; margin: 0 auto; padding: 8px 20px 40px; flex: 1; }
.is-form .p-main, .is-track .p-main { max-width: 700px; }

/* ----------------------------- home ------------------------------- */
.hero { padding: 34px 0 26px; animation: rise .6s var(--ease) both; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; margin-bottom: 18px;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--line-soft); border-radius: 999px;
  font-size: .8rem; font-weight: 650; color: var(--navy-600); letter-spacing: .02em;
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(6px);
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #3FA46E; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #3FA46E; opacity: 0; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.5); opacity: .7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.hero-title { font-size: clamp(2.1rem, 7.4vw, 3.3rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.04; }
.hero-sub { margin-top: 14px; max-width: 560px; font-size: 1.07rem; color: var(--muted); }

.cat-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cat-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 16px 16px 16px 16px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  animation: rise .55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms + 120ms);
  -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
}
.cat-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 140% at 0% 0%, var(--t-soft) 0%, rgba(255, 255, 255, 0) 55%);
  opacity: 0; transition: opacity .25s var(--ease);
}
.cat-card:hover, .cat-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--t-bg); color: inherit; }
.cat-card:hover::before, .cat-card:focus-visible::before { opacity: 1; }
.cat-card:active { transform: translateY(-1px) scale(.99); }
.cat-card > * { position: relative; }
.cat-icon {
  display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 18px 0;
  background: var(--t-bg); color: var(--t-fg);
  box-shadow: inset 0 -3px 0 rgba(0, 38, 62, .06);
}
.cat-icon .icon { width: 27px; height: 27px; stroke-width: 1.7; }
.cat-icon-lg { width: 68px; height: 68px; border-radius: 22px 0; }
.cat-icon-lg .icon { width: 32px; height: 32px; }
.cat-body { display: flex; flex-direction: column; min-width: 0; }
.cat-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 680; color: var(--ink); letter-spacing: -.015em; }
.cat-desc { font-size: .9rem; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.cat-go {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg); color: var(--navy);
  transition: background .22s var(--ease), transform .22s var(--ease);
}
.cat-card:hover .cat-go { background: var(--t-bg); color: var(--t-fg); transform: translateX(3px); }

.empty-card { text-align: center; padding: 42px 20px; background: var(--surface); border-radius: 22px; border: 1px dashed var(--line); }
.empty-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px 0; background: var(--sky-soft); color: var(--navy); margin-bottom: 12px; }
.empty-card h2 { font-size: 1.15rem; margin-bottom: 4px; }
.empty-card p { color: var(--muted); }

.how { margin-top: 34px; animation: fade .8s .5s var(--ease) both; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.step-n {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px 0;
  background: var(--navy); color: #fff; font-weight: 700; font-size: .85rem;
}
.steps strong { display: block; color: var(--ink); font-size: .95rem; }
.steps span { color: var(--muted); font-size: .88rem; }

@media (min-width: 640px) {
  .hero { padding: 54px 0 34px; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .cat-grid.is-odd > :last-child { grid-column: 1 / -1; }
  .cat-card { padding: 22px 20px; gap: 18px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .how { margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
}

/* ------------------------- already reported ----------------------- */
.reported { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line-soft); animation: fade .8s .6s var(--ease) both; }
.reported-head h2 { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.reported-head h2 .icon { color: var(--navy-400); }
.reported-head p { color: var(--muted); font-size: .92rem; margin: 4px 0 14px; max-width: 560px; }
.open-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; box-shadow: var(--shadow-xs); overflow: hidden; }
.open-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; }
.open-item + .open-item { border-top: 1px solid var(--line-soft); }
.open-tile { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px 0; background: var(--t-bg); color: var(--t-fg); }
.open-tile .icon { width: 17px; height: 17px; }
.open-main { display: flex; flex-direction: column; min-width: 0; }
.open-subject { font-weight: 600; color: var(--ink); font-size: .94rem; overflow-wrap: anywhere; }
.open-meta { font-size: .8rem; color: var(--muted); }
.open-empty { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--mint-soft); color: var(--success); font-size: .92rem; font-weight: 500; }
.already { margin-top: 12px; border-radius: 16px; background: var(--sun-soft); border: 1px solid rgba(107, 78, 11, .12); animation: rise .5s .05s var(--ease) both; }
.already summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; font-size: .9rem; color: var(--warning); }
.already summary::-webkit-details-marker { display: none; }
.already summary strong { color: var(--ink); }
.already summary .summary-caret { margin-left: auto; }
.already[open] .summary-caret { transform: rotate(180deg); }
.already-count { flex: none; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 9px 0; background: var(--sun); color: var(--navy); font-weight: 750; font-size: .84rem; }
.already .open-list { margin: 0 10px 10px; box-shadow: none; }
@media (max-width: 480px) {
  .open-item { grid-template-columns: auto minmax(0, 1fr); row-gap: 6px; }
  .open-item .badge { grid-column: 2; justify-self: start; }
  .already .open-item { grid-template-columns: minmax(0, 1fr); }
  .already .open-item .badge { grid-column: 1; }
}

/* ------------------------------ form ------------------------------ */
.back-link {
  display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 14px;
  color: var(--muted); font-size: .92rem; font-weight: 550; text-decoration: none;
  padding: 6px 10px 6px 6px; border-radius: 999px; transition: background .15s, color .15s;
}
.back-link:hover { color: var(--navy); background: rgba(255, 255, 255, .8); }

.form-head {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px; border-radius: 24px;
  background: linear-gradient(135deg, var(--t-soft) 0%, rgba(255, 255, 255, .85) 100%);
  border: 1px solid rgba(0, 38, 62, .05);
  animation: rise .5s var(--ease) both;
}
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--t-text, var(--muted)); }
.form-head h1 { font-size: clamp(1.7rem, 6vw, 2.2rem); letter-spacing: -.03em; font-weight: 740; margin-top: 2px; }
.form-intro { margin-top: 6px; color: var(--text); font-size: .98rem; max-width: 520px; }

.p-form { margin-top: 14px; display: grid; gap: 14px; animation: rise .55s .08s var(--ease) both; }
.form-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 22px; padding: 20px 18px 22px; box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 20px 16px; }
.field { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 560px) {
  .form-card { padding: 26px 26px 28px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field.is-half { grid-column: span 1; }
}
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.f-heading { grid-column: 1 / -1; padding-top: 6px; }
.f-heading h2 { font-size: 1.12rem; font-weight: 680; }
.f-heading p { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.f-heading:not(:first-child) { border-top: 1px solid var(--line-soft); padding-top: 20px; }

.f-info {
  grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 16px 0;
  background: var(--sky-soft); color: #0B4A66;
}
.f-info .icon { width: 22px; height: 22px; margin-top: 1px; }
.f-info strong { display: block; color: inherit; }
.f-info p { font-size: .92rem; }
.f-info.tone-warning { background: var(--rose-soft); color: #7A2F3E; }
.f-info.tone-success { background: var(--mint-soft); color: var(--success); }

/* option cards */
.choices { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice, .consent {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 50px; padding: 12px 14px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.choice:hover, .consent:hover { border-color: #C3D0D5; }
.choice input, .consent input, .yesno-opt input, .urg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choice-mark {
  flex: none; display: grid; place-items: center; width: 22px; height: 22px;
  border: 1.8px solid #B7C3C8; border-radius: 7px; background: #fff; color: #fff;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .2s var(--ease-spring);
}
.choice-mark .icon { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: opacity .15s, transform .25s var(--ease-spring); }
.choice:has(input[type="radio"]) .choice-mark { border-radius: 50%; }
.choice-text { font-size: .96rem; color: var(--ink); line-height: 1.35; }
.choice:has(input:checked), .consent:has(input:checked) { border-color: var(--navy-400); background: #F2F9FC; box-shadow: 0 0 0 3px rgba(170, 220, 235, .35); }
.choice:has(input:checked) .choice-mark, .consent:has(input:checked) .choice-mark { background: var(--navy); border-color: var(--navy); }
.choice:has(input:checked) .choice-mark .icon, .consent:has(input:checked) .choice-mark .icon { opacity: 1; transform: none; }
.choice:has(input:focus-visible), .consent:has(input:focus-visible), .yesno-opt:has(input:focus-visible) span, .urg:has(input:focus-visible) .urg-body { box-shadow: var(--focus-ring); }
.consent { align-items: flex-start; }
.consent > span:last-child { font-size: .95rem; color: var(--ink); }
.consent small { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.has-error .choice, .has-error .consent, .has-error .yesno-opt span { border-color: #E6A3B0; }

.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 360px; }
.yesno-opt span {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  font-weight: 600; color: var(--ink); cursor: pointer; transition: all .15s var(--ease);
}
.yesno-opt span:hover { border-color: #C3D0D5; }
.yesno-opt .icon { width: 17px; height: 17px; stroke-width: 2.4; color: var(--subtle); }
.yesno-opt input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 6px 14px -8px rgba(0, 38, 62, .7); }
.yesno-opt input:checked + span .icon { color: var(--sky); }

/* uploads */
.dropzone { position: relative; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dz-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px;
  padding: 24px 16px; border: 2px dashed #B9DDE9; border-radius: 16px;
  background: linear-gradient(180deg, #F6FBFD, #EEF7FA); cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.dz-empty:hover, .dropzone.is-dragging .dz-empty { border-color: var(--navy-400); background: #EAF5F9; }
.dz-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px 0; background: var(--navy); color: #fff; margin-bottom: 6px; box-shadow: 0 8px 16px -10px rgba(0, 38, 62, .8); }
.dz-icon .icon { width: 22px; height: 22px; }
.dz-title { font-weight: 650; color: var(--ink); }
.dz-sub { font-size: .83rem; color: var(--muted); }
.dz-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.dz-item { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg); border: 1px solid var(--line-soft); animation: pop .35s var(--ease-spring) both; }
.dz-item img { width: 100%; height: 100%; object-fit: cover; }
.dz-file { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 8px; gap: 4px; text-align: center; color: var(--muted); font-size: .72rem; word-break: break-all; }
.dz-file .icon { width: 26px; height: 26px; color: var(--navy-400); }
.dz-remove {
  position: absolute; top: 6px; right: 6px; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(0, 38, 62, .78); color: #fff; backdrop-filter: blur(4px);
}
.dz-remove .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.dz-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  aspect-ratio: 1; border-radius: 14px; border: 2px dashed #B9DDE9; background: #F6FBFD;
  color: var(--navy-600); font-size: .78rem; font-weight: 600; cursor: pointer;
}
.dz-add .icon { width: 22px; height: 22px; }
.dz-add:hover { border-color: var(--navy-400); }

/* urgency */
.urgency { border: 0; margin: 0; padding: 0; min-width: 0; }
.urgency legend { padding: 0; margin-bottom: 10px; }
.urgency-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 560px) { .urgency-opts { grid-template-columns: repeat(4, 1fr); } }
.urg { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.urg-body {
  display: flex; flex-direction: column; gap: 3px; height: 100%;
  padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  transition: all .15s var(--ease);
}
.urg-body strong { font-size: .95rem; color: var(--ink); margin-top: 4px; }
.urg-body small { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.urg:hover .urg-body { border-color: #C3D0D5; }
.urg-low input:checked + .urg-body { border-color: #9AA5AB; background: #F4F6F7; }
.urg-normal input:checked + .urg-body { border-color: #4FA9C7; background: var(--sky-soft); }
.urg-high input:checked + .urg-body { border-color: #D9A21E; background: var(--sun-soft); }
.urg-urgent input:checked + .urg-body { border-color: #D84F6A; background: var(--rose-soft); }
.urg input:checked + .urg-body { box-shadow: 0 8px 18px -12px rgba(0, 38, 62, .35); }
.urg-low .prio-meter i.on { background: #9AA5AB; }
.urg-normal .prio-meter i.on { background: #4FA9C7; }
.urg-high .prio-meter i.on { background: #D9A21E; }
.urg-urgent .prio-meter i.on { background: #D84F6A; }

.submit-bar { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.btn-submit { width: 100%; font-size: 1.05rem; }
.btn-submit .icon { width: 19px; height: 19px; }
.submit-note { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: .85rem; }
.submit-note .icon { color: #3FA46E; }
@media (min-width: 560px) {
  .submit-bar { flex-direction: row; align-items: center; justify-content: space-between; }
  .btn-submit { width: auto; min-width: 230px; }
}

.preview-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 -20px 6px; padding: 9px 16px; background: var(--sun-soft); color: var(--warning); font-size: .86rem; font-weight: 600;
  border-bottom: 1px solid rgba(107, 78, 11, .12);
}

/* ----------------------------- track ------------------------------ */
.page-title { font-size: 1.9rem; letter-spacing: -.03em; margin-bottom: 14px; }
.success { text-align: center; padding: 26px 8px 22px; animation: rise .5s var(--ease) both; }
.success-mark { display: inline-grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--mint-soft); margin-bottom: 16px; animation: pop .6s var(--ease-spring) both; }
.success-mark svg { width: 60px; height: 60px; }
.success-mark .ring { fill: #9DD1B1; stroke: none; }
.success-mark .tick { fill: none; stroke: #0F3D25; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h1 { font-size: clamp(1.7rem, 6vw, 2.2rem); letter-spacing: -.03em; font-weight: 750; }
.success-text { margin: 8px auto 0; max-width: 460px; color: var(--muted); font-size: 1.02rem; }
.success-mail { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line-soft); font-size: .88rem; color: var(--text); box-shadow: var(--shadow-xs); }
.success-mail .icon { color: var(--navy-400); }

.track-card {
  position: relative; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 22px;
  padding: 22px 20px 20px; box-shadow: var(--shadow); overflow: hidden;
  animation: rise .5s .12s var(--ease) both;
}
.track-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--t-bg); }
.track-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 12px; flex-wrap: wrap-reverse; }
.ref-row { display: flex; align-items: center; gap: 8px 10px; margin-top: 2px; flex-wrap: wrap; }
.ref { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; color: var(--navy); letter-spacing: .02em; white-space: nowrap; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--navy-600); font-size: .78rem; font-weight: 600;
  transition: all .15s var(--ease);
}
.copy-btn .icon { width: 14px; height: 14px; }
.copy-btn:hover { border-color: var(--navy-400); }
.copy-btn.is-copied { background: var(--mint-soft); border-color: var(--mint); color: var(--success); }
.track-subject { font-size: 1.22rem; margin-top: 16px; font-weight: 650; }
.track-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; color: var(--muted); font-size: .88rem; }
.track-meta > span:not(.chip) { display: inline-flex; align-items: center; gap: 6px; }
.track-meta .icon { width: 15px; height: 15px; }

.progress { list-style: none; margin: 22px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.progress li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.progress li::before { content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px; background: var(--line-soft); z-index: 0; }
.progress li:first-child::before { display: none; }
.progress li.is-done::before, .progress li.is-current::before { background: var(--mint); }
.progress-dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line); color: transparent;
}
.progress-dot .icon { width: 15px; height: 15px; stroke-width: 3; }
.progress li.is-done .progress-dot { background: var(--mint); border-color: var(--mint); color: #0F3D25; }
.progress li.is-current .progress-dot { border-color: var(--navy); background: #fff; }
.progress li.is-current .progress-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); position: absolute; }
.progress li.is-current .progress-dot::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--sky-600); animation: ping 2.2s var(--ease) infinite; }
.progress-label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.progress li.is-done .progress-label, .progress li.is-current .progress-label { color: var(--ink); }

.bookmark-hint { display: flex; gap: 8px; align-items: center; margin-top: 16px; padding: 10px 12px; border-radius: 12px; background: var(--bg-tint); color: var(--muted); font-size: .84rem; }
.bookmark-hint .icon { color: var(--navy-400); }

.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 22px; padding: 20px; box-shadow: var(--shadow-sm); }
.conv-card, .summary-card { margin-top: 14px; animation: rise .5s .2s var(--ease) both; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 12px; }
.card-title .icon { color: var(--navy-400); }
.conv-empty { color: var(--muted); font-size: .93rem; padding: 14px; border-radius: 14px; background: var(--bg-tint); }
.conv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 88%; padding: 12px 14px; border-radius: 16px; background: var(--bg); }
.bubble.is-team { border-top-left-radius: 4px; background: var(--sky-soft); }
.bubble.is-mine { align-self: flex-end; border-top-right-radius: 4px; background: var(--bg); }
.bubble-head { display: flex; gap: 10px; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.bubble-head strong { color: var(--ink); }
.bubble-body { font-size: .95rem; color: var(--text); overflow-wrap: anywhere; }
.reply-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.reply-form textarea { min-height: 96px; }
.reply-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.conv-closed { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: .9rem; }

.summary-card { padding: 0; }
.summary-card summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; cursor: pointer; list-style: none; font-weight: 650; color: var(--ink); }
.summary-card summary::-webkit-details-marker { display: none; }
.summary-card summary > span { display: inline-flex; align-items: center; gap: 8px; }
.summary-card summary .icon { color: var(--navy-400); }
.summary-caret { transition: transform .2s var(--ease); }
.summary-card[open] .summary-caret { transform: rotate(180deg); }
.summary-list { margin: 0; padding: 0 20px 18px; display: grid; gap: 0; }
.summary-list > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.summary-list dt { font-size: .8rem; color: var(--muted); font-weight: 600; }
.summary-list dd { margin: 0; color: var(--ink); font-size: .94rem; overflow-wrap: anywhere; }
@media (min-width: 560px) { .summary-list > div { grid-template-columns: 200px 1fr; gap: 16px; } }

.track-actions { display: flex; justify-content: center; margin-top: 22px; }

/* ----------------------------- error ------------------------------ */
.error-page { text-align: center; padding: 60px 10px 40px; animation: rise .5s var(--ease) both; }
.error-illu { display: inline-grid; place-items: center; width: 120px; height: 120px; border-radius: 40px 0; background: linear-gradient(135deg, var(--sky), #CFEBF3); margin-bottom: 20px; box-shadow: var(--shadow); }
.error-code { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; color: var(--navy); letter-spacing: -.04em; }
.error-page h1 { font-size: 1.7rem; letter-spacing: -.02em; }
.error-page p { margin: 8px auto 22px; max-width: 420px; color: var(--muted); }

/* ----------------------------- footer ----------------------------- */
.p-footer { width: 100%; max-width: 820px; margin: 0 auto; padding: 22px 20px 32px; text-align: center; color: var(--muted); font-size: .82rem; }
.p-footer p { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; }
.p-footer .icon { width: 14px; height: 14px; color: #3FA46E; }
.p-copy { margin-top: 4px; color: var(--subtle); }

.p-main > .alert { margin-bottom: 12px; }
