/* V28 Warm Connect — additive, privacy-first and dependency-free. */
.v28-skip-render {
  content-visibility: auto;
  contain-intrinsic-size: auto 780px;
}

.v28-consult-strip {
  position: relative;
  overflow: hidden;
  padding: clamp(3.4rem, 7vw, 6.5rem) 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(245, 163, 163, .25), transparent 28rem),
    radial-gradient(circle at 88% 78%, rgba(46, 111, 104, .13), transparent 28rem),
    linear-gradient(145deg, #fffaf4 0%, #fff3f0 52%, #f9f4ed 100%);
  border-block: 1px solid var(--line);
}

.v28-consult-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.v28-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: 1.2rem 0 1.6rem;
  padding: 0;
  list-style: none;
}

.v28-proof-row li {
  display: inline-flex;
  min-height: 2.5rem;
  padding: .45rem .8rem;
  align-items: center;
  gap: .42rem;
  color: var(--support-deep);
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(46, 111, 104, .22);
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 800;
}

.v28-proof-row li::before {
  content: "✓";
  display: grid;
  width: 1.3rem;
  height: 1.3rem;
  place-items: center;
  color: #fff;
  background: var(--support);
  border-radius: 50%;
  font-size: .72rem;
}

.v28-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.v28-path {
  min-height: 8.4rem;
  padding: 1rem 1.05rem;
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: 0 14px 34px rgba(91, 39, 48, .07);
}

.v28-path span {
  display: block;
  margin-bottom: .4rem;
  color: var(--wine);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.v28-path strong { display: block; margin-bottom: .22rem; font-size: 1rem; }
.v28-path p { margin: 0; color: var(--ink-soft); font-size: .86rem; line-height: 1.65; }

.v28-library {
  padding: clamp(3.75rem, 8vw, 7rem) 0;
  background: var(--paper);
}

.v28-library[data-mode="story"] { background: linear-gradient(180deg, var(--paper), var(--rose-2)); }
.v28-library[data-mode="video"] { background: linear-gradient(180deg, #fff9f1, #f7f1ea); }

.v28-library-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.7rem;
}

.v28-library-head p:last-child { margin: 0; color: var(--ink-soft); }

.v28-library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: 0 0 1.35rem;
}

.v28-filter {
  min-height: 3rem;
  padding: .65rem 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
}

.v28-filter:hover,
.v28-filter[aria-pressed="true"] {
  color: #fff;
  background: var(--wine);
  border-color: var(--wine);
}

.v28-library-status {
  min-height: 1.7rem;
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: .9rem;
}

.v28-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.v28-story-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 22rem;
  padding: 1.35rem;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 1.45rem;
  box-shadow: var(--shadow-soft);
}

.v28-story-card::before {
  content: "";
  width: 4.1rem;
  height: .32rem;
  margin-bottom: 1.1rem;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  border-radius: 999px;
}

.v28-story-card[data-kind="video"]::before { background: linear-gradient(90deg, var(--support), #70a9a2); }

.v28-story-card .v28-card-kicker {
  margin: 0 0 .55rem;
  color: var(--wine);
  font-size: .77rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v28-story-card[data-kind="video"] .v28-card-kicker { color: var(--support-deep); }
.v28-story-card h3 { margin-bottom: .6rem; font-size: clamp(1.3rem, 2vw, 1.65rem); }
.v28-story-card p { margin-bottom: .8rem; color: var(--ink-soft); line-height: 1.7; }

.v28-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .9rem;
}

.v28-card-meta span {
  padding: .25rem .55rem;
  color: var(--support-deep);
  background: rgba(46, 111, 104, .08);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
}

.v28-card-disclosure {
  padding-top: .75rem;
  border-top: 1px solid var(--line);
  font-size: .76rem !important;
}

.v28-card-action {
  width: 100%;
  min-height: 3.1rem;
  margin-top: auto;
  padding: .72rem 1rem;
  color: #fff;
  background: var(--wine);
  border: 0;
  border-radius: .8rem;
  cursor: pointer;
  font-weight: 900;
}

.v28-story-card[data-kind="video"] .v28-card-action { background: var(--support-deep); }
.v28-card-action:hover { filter: brightness(.92); transform: translateY(-1px); }

.v28-library-foot {
  display: flex;
  margin-top: 1.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.v28-library-foot p { margin: 0; color: var(--ink-soft); font-size: .86rem; }

.v28-dialog {
  width: min(760px, calc(100% - 1.25rem));
  max-height: min(88vh, 850px);
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid rgba(112, 54, 62, .22);
  border-radius: 1.5rem;
  box-shadow: 0 32px 100px rgba(39, 21, 25, .32);
}

.v28-dialog::backdrop { background: rgba(37, 24, 28, .62); backdrop-filter: blur(4px); }
.v28-dialog[open] { animation: v28-dialog-in .24s ease-out both; }

@keyframes v28-dialog-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.v28-dialog-shell {
  display: flex;
  max-height: min(88vh, 850px);
  flex-direction: column;
}

.v28-dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  padding: 1rem 1.2rem;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--wine-deep), var(--wine));
}

.v28-dialog-head small { display: block; color: rgba(255, 255, 255, .8); font-weight: 700; }
.v28-dialog-title { margin: 0; color: #fff; font-size: 1.28rem; }

.v28-dialog-close {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.35rem;
}

.v28-dialog-body { padding: clamp(1.15rem, 3vw, 2rem); overflow-y: auto; overscroll-behavior: contain; }

.v28-consult-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .35rem;
  margin-bottom: 1.35rem;
}

.v28-consult-progress span { height: .42rem; background: rgba(140, 47, 66, .15); border-radius: 999px; }
.v28-consult-progress span.is-active { background: var(--wine); }

.v28-dialog-note {
  margin-bottom: 1.15rem;
  padding: .85rem 1rem;
  color: var(--support-deep);
  background: rgba(46, 111, 104, .08);
  border-left: 4px solid var(--support);
  border-radius: .7rem;
  font-size: .86rem;
}

.v28-consult-question { margin-bottom: 1rem; font-size: clamp(1.45rem, 4vw, 2rem); }
.v28-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }

.v28-choice {
  min-height: 4.9rem;
  padding: .9rem 1rem;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  cursor: pointer;
  font-weight: 850;
  line-height: 1.45;
}

.v28-choice:hover,
.v28-choice:focus-visible { border-color: var(--wine); box-shadow: 0 10px 30px rgba(140, 47, 66, .1); }
.v28-choice small { display: block; margin-top: .25rem; color: var(--ink-soft); font-weight: 600; }

.v28-result {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
}

.v28-result.is-urgent { border: 2px solid #a91d32; background: #fff6f7; }
.v28-result h3 { font-size: 1.55rem; }
.v28-result-list { margin: .9rem 0 1.2rem; padding-left: 1.3rem; }
.v28-result-list li { margin: .55rem 0; }
.v28-result-actions { display: flex; flex-wrap: wrap; gap: .65rem; }

.v28-action-link,
.v28-action-button {
  display: inline-flex;
  min-height: 3rem;
  padding: .62rem .95rem;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--wine);
  border: 1px solid var(--wine);
  border-radius: .75rem;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
}

.v28-action-link.secondary,
.v28-action-button.secondary { color: var(--wine); background: transparent; }
.v28-action-link.urgent { background: #9d1429; border-color: #9d1429; }

.v28-story-dialog .v28-dialog-head { background: linear-gradient(135deg, var(--support-deep), var(--support)); }
.v28-story-dialog article { max-width: 64ch; margin-inline: auto; }
.v28-story-dialog .v28-reader-kicker { margin-bottom: .45rem; color: var(--wine); font-size: .8rem; font-weight: 900; letter-spacing: .09em; }
.v28-story-dialog h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.v28-story-dialog .v28-reader-summary { color: var(--ink-soft); font-size: 1.03rem; font-weight: 700; }
.v28-story-dialog .v28-reader-body p { margin-bottom: 1.15rem; }

.v28-player {
  overflow: hidden;
  background: #2c2326;
  border-radius: 1.15rem;
  box-shadow: 0 18px 40px rgba(37, 24, 28, .18);
}

.v28-player-screen {
  display: grid;
  min-height: 18rem;
  padding: clamp(1.4rem, 5vw, 3rem);
  place-items: center;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 18% 20%, rgba(227, 111, 106, .34), transparent 38%),
    radial-gradient(circle at 86% 78%, rgba(46, 111, 104, .46), transparent 40%),
    #2c2326;
}

.v28-player-time { display: block; margin-bottom: 1rem; color: #ffd9b1; font-size: .8rem; font-weight: 900; letter-spacing: .12em; }
.v28-player-caption { max-width: 27ch; margin: 0; font: 800 clamp(1.35rem, 4vw, 2.25rem)/1.55 "Noto Serif TC", serif; }

.v28-player-controls {
  display: flex;
  padding: .85rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  background: #fff;
}

.v28-player-controls button {
  min-width: 3rem;
  min-height: 3rem;
  padding: .55rem .8rem;
  color: var(--support-deep);
  background: #fff;
  border: 1px solid rgba(46, 111, 104, .3);
  border-radius: .7rem;
  cursor: pointer;
  font-weight: 900;
}

.v28-player-controls button[data-play] { color: #fff; background: var(--support-deep); }
.v28-player-count { min-width: 4rem; color: var(--ink-soft); text-align: center; font-size: .82rem; font-weight: 800; }
.v28-reader-disclosure { margin: 1rem 0; padding: .75rem .9rem; background: var(--rose-2); border-radius: .7rem; font-size: .82rem; }

.v28-inline-consult {
  display: inline-flex;
  min-height: 3rem;
  padding: .65rem .95rem;
  align-items: center;
  color: #fff;
  background: var(--support-deep);
  border: 0;
  border-radius: .8rem;
  cursor: pointer;
  font-weight: 900;
}

.v28-nav-consult { color: var(--support-deep) !important; font-weight: 900 !important; }

body.v28-dialog-open { overflow: hidden; }

@media (max-width: 900px) {
  .v28-consult-layout,
  .v28-library-head { grid-template-columns: 1fr; }
  .v28-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .v28-consult-strip,
  .v28-library { padding-block: 3.5rem; }
  .v28-paths,
  .v28-choice-grid,
  .v28-library-grid { grid-template-columns: 1fr; }
  .v28-story-card { min-height: 0; }
  .v28-library-foot { align-items: flex-start; flex-direction: column; }
  .v28-dialog { width: calc(100% - .7rem); max-height: 94dvh; border-radius: 1.1rem; }
  .v28-dialog-shell { max-height: 94dvh; }
  .v28-dialog-body { padding: 1rem; }
  .v28-player-screen { min-height: 15rem; }
  .v28-result-actions > * { width: 100%; }
  .v28-proof-row li { width: 100%; border-radius: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .v28-dialog[open] { animation: none; }
  .v28-card-action:hover { transform: none; }
}

body.high-contrast .v28-consult-strip,
body.high-contrast .v28-library { background: #fff; }
body.high-contrast .v28-story-card,
body.high-contrast .v28-choice,
body.high-contrast .v28-result { border-width: 2px; box-shadow: none; }

@media print {
  .v28-dialog,
  .v28-filter,
  .v28-card-action,
  .v28-inline-consult { display: none !important; }
  .v28-skip-render { content-visibility: visible; }
}
