.phga {
  --phga-purple: #6d3fe0;
  --phga-purple-dark: #44229b;
  --phga-purple-soft: #f1ebff;
  --phga-pink: #f65ca9;
  --phga-yellow: #ffc84a;
  --phga-cyan: #35c7d4;
  --phga-green: #3dc690;
  --phga-ink: #26243a;
  --phga-muted: #716d86;
  --phga-line: #e5e0f1;
  --phga-bg: #f7f4ff;
  color: var(--phga-ink);
  font-family: Inter, ui-rounded, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  margin: 24px auto;
  max-width: 1180px;
  position: relative;
}

.phga *, .phga *::before, .phga *::after { box-sizing: border-box; }
.phga button, .phga input, .phga textarea { font: inherit; }
.phga button { color: inherit; }
.phga [hidden] { display: none !important; }

.phga__shell {
  background: #fff;
  border: 1px solid #e6dff8;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(69, 38, 135, .14);
  overflow: hidden;
}

.phga__hero {
  align-items: center;
  background:
    radial-gradient(circle at 82% 15%, rgba(255,255,255,.18) 0 7%, transparent 7.4%),
    radial-gradient(circle at 88% 80%, rgba(255,255,255,.12) 0 12%, transparent 12.4%),
    linear-gradient(118deg, #41208f 0%, #6d3fe0 58%, #9257ed 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 192px;
  overflow: hidden;
  padding: 34px 54px;
  position: relative;
}

.phga__hero::before,
.phga__hero::after {
  border: 2px solid rgba(255,255,255,.16);
  border-radius: 50%;
  content: "";
  height: 170px;
  position: absolute;
  right: -48px;
  top: -82px;
  width: 170px;
}
.phga__hero::after { height: 100px; right: 250px; top: 130px; width: 100px; }
.phga__hero-copy { max-width: 640px; position: relative; z-index: 1; }
.phga__eyebrow { color: #dfd3ff; font-size: 12px; font-weight: 900; letter-spacing: .18em; }
.phga__hero h2 { color: #fff; font-size: clamp(32px, 5vw, 52px); font-weight: 900; letter-spacing: -.04em; line-height: 1; margin: 12px 0 15px; }
.phga__hero p { color: #f4efff; font-size: 17px; margin: 0; max-width: 590px; }

.phga__hero-art {
  align-items: end;
  display: flex;
  gap: 9px;
  height: 116px;
  margin-left: 28px;
  min-width: 260px;
  position: relative;
  z-index: 1;
}
.phga__mini-bar { animation: phgaHeroBars 2.7s ease-in-out infinite alternate; background: var(--phga-yellow); border: 3px solid rgba(255,255,255,.85); border-radius: 9px 9px 2px 2px; box-shadow: 0 8px 18px rgba(23,8,68,.2); display: block; width: 25px; }
.phga__mini-bar--1 { height: 48%; }
.phga__mini-bar--2 { animation-delay: -.7s; background: var(--phga-pink); height: 78%; }
.phga__mini-bar--3 { animation-delay: -1.2s; background: var(--phga-cyan); height: 62%; }
.phga__hero-art svg { height: 86px; margin: 0 0 18px 9px; overflow: visible; width: 126px; }
.phga__hero-art path { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 5; }
.phga__hero-art circle { fill: var(--phga-yellow); stroke: #fff; stroke-width: 2; }
@keyframes phgaHeroBars { to { transform: translateY(-8px); } }

.phga__steps { background: #fff; border-bottom: 1px solid var(--phga-line); display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 44px; }
.phga__step { align-items: center; background: transparent; border: 0; border-bottom: 4px solid transparent; cursor: pointer; display: flex; gap: 11px; justify-content: center; min-height: 78px; padding: 14px; }
.phga__step span { align-items: center; background: #eeeaf6; border-radius: 50%; color: #858096; display: inline-flex; font-weight: 900; height: 31px; justify-content: center; width: 31px; }
.phga__step strong { color: #7a758d; font-size: 15px; }
.phga__step.is-active { border-bottom-color: var(--phga-purple); }
.phga__step.is-active span { background: var(--phga-purple); box-shadow: 0 7px 17px rgba(109,63,224,.3); color: #fff; }
.phga__step.is-active strong { color: var(--phga-purple-dark); }

.phga__main { background: linear-gradient(180deg, #fff 0%, #fdfcff 100%); min-height: 600px; padding: 42px 54px 52px; }
.phga__panel { animation: phgaPanelIn .3s ease both; }
@keyframes phgaPanelIn { from { opacity: 0; transform: translateY(9px); } }

.phga__section-heading { align-items: center; display: flex; gap: 18px; justify-content: space-between; margin-bottom: 24px; }
.phga__kicker { color: var(--phga-purple); display: block; font-size: 11px; font-weight: 900; letter-spacing: .14em; margin-bottom: 5px; }
.phga__section-heading h3 { color: var(--phga-ink); font-size: 25px; font-weight: 900; letter-spacing: -.02em; line-height: 1.2; margin: 0; }
.phga__help-button { align-items: center; background: #fff; border: 1px solid var(--phga-line); border-radius: 12px; color: var(--phga-purple-dark); cursor: pointer; display: flex; font-size: 13px; font-weight: 800; gap: 7px; padding: 8px 12px; }
.phga__help-button span { align-items: center; border: 2px solid var(--phga-purple); border-radius: 50%; display: inline-flex; font-family: Georgia, serif; font-weight: 900; height: 21px; justify-content: center; width: 21px; }
.phga__help-button:hover { background: var(--phga-purple-soft); border-color: #c9b6f8; }
.phga__help { background: #fff9df; border: 1px solid #ffe192; border-radius: 14px; color: #5b4a1d; font-size: 14px; margin: -10px 0 20px; padding: 14px 17px; }

.phga__type-grid { display: grid; gap: 12px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.phga__type { align-items: center; background: #fff; border: 2px solid var(--phga-line); border-radius: 16px; cursor: pointer; display: flex; flex-direction: column; min-height: 132px; overflow: hidden; padding: 14px 7px 11px; position: relative; transition: .2s ease; }
.phga__type:hover { border-color: #bdabef; box-shadow: 0 9px 24px rgba(75,42,154,.11); transform: translateY(-2px); }
.phga__type.is-active { background: linear-gradient(180deg, #f7f3ff, #fff); border-color: var(--phga-purple); box-shadow: 0 9px 24px rgba(75,42,154,.14); }
.phga__type.is-active::after { align-items: center; background: var(--phga-purple); border-radius: 0 0 0 11px; color: #fff; content: "✓"; display: flex; font-size: 11px; font-weight: 900; height: 23px; justify-content: center; position: absolute; right: 0; top: 0; width: 25px; }
.phga__type strong { color: #332b51; font-size: 13px; margin-top: 8px; }
.phga__type small { color: var(--phga-muted); font-size: 10px; white-space: nowrap; }
.phga__type-icon { height: 46px; position: relative; width: 54px; }
.phga__type-icon--bar { align-items: end; border-bottom: 2px solid #5f4b91; display: flex; gap: 5px; justify-content: center; }
.phga__type-icon--bar i { background: #7a4ce2; border-radius: 3px 3px 0 0; display: block; height: 20px; width: 10px; }
.phga__type-icon--bar i:nth-child(2) { background: var(--phga-pink); height: 37px; }
.phga__type-icon--bar i:nth-child(3) { background: var(--phga-cyan); height: 29px; }
.phga__type-icon--pie { background: conic-gradient(var(--phga-purple) 0 34%, var(--phga-pink) 34% 67%, var(--phga-yellow) 67%); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #cfc4e8; height: 44px; width: 44px; }
.phga__type-icon--line::before { border-bottom: 3px solid var(--phga-purple); content: ""; left: 3px; position: absolute; top: 21px; transform: rotate(-15deg); width: 48px; }
.phga__type-icon--line i { background: var(--phga-pink); border: 2px solid #fff; border-radius: 50%; height: 11px; position: absolute; top: 25px; width: 11px; }
.phga__type-icon--line i:nth-child(2) { left: 22px; top: 17px; }
.phga__type-icon--line i:nth-child(3) { left: 43px; top: 8px; }
.phga__type-icon--table { background: repeating-linear-gradient(0deg, transparent 0 10px, #a597c9 10px 12px), repeating-linear-gradient(90deg, transparent 0 24px, #a597c9 24px 26px); border: 2px solid var(--phga-purple); border-radius: 4px; height: 43px; width: 52px; }
.phga__type-icon--tally { align-items: center; color: var(--phga-purple); display: flex; font-size: 25px; font-weight: 500; letter-spacing: -3px; transform: rotate(-4deg); }
.phga__type-icon--tally::after { background: var(--phga-pink); content: ""; height: 3px; left: 7px; position: absolute; top: 23px; transform: rotate(-64deg); width: 38px; }
.phga__type-icon--dot i { background: var(--phga-purple); border-radius: 50%; bottom: 5px; height: 10px; position: absolute; width: 10px; }
.phga__type-icon--dot i:nth-child(1) { left: 3px; }
.phga__type-icon--dot i:nth-child(2) { bottom: 18px; left: 22px; }
.phga__type-icon--dot i:nth-child(3) { left: 22px; }
.phga__type-icon--dot i:nth-child(4) { left: 41px; }
.phga__type-icon--stem { align-items: center; display: grid; font-size: 11px; grid-template-columns: 16px 2px 1fr; width: 60px; }
.phga__type-icon--stem b { color: var(--phga-purple-dark); font-size: 12px; white-space: nowrap; }
.phga__type-icon--stem em { background: var(--phga-pink); height: 42px; margin-right: 5px; width: 2px; }

.phga__prompt { align-items: center; background: linear-gradient(100deg, #f3edff, #fbf9ff); border: 1px solid #dfd3fa; border-radius: 16px; display: flex; gap: 14px; margin: 24px 0 20px; padding: 15px 18px; }
.phga__prompt-icon { align-items: center; background: var(--phga-purple); border-radius: 50%; box-shadow: 0 5px 12px rgba(109,63,224,.28); color: #fff; display: flex; flex: 0 0 34px; font-weight: 900; height: 34px; justify-content: center; }
.phga__prompt strong { color: var(--phga-purple-dark); display: block; font-size: 14px; }
.phga__prompt small { color: var(--phga-muted); display: block; font-size: 12px; }

.phga__form-grid { display: grid; gap: 15px; grid-template-columns: repeat(2, minmax(0,1fr)); margin-bottom: 17px; }
.phga__field { display: block; }
.phga__field--wide { grid-column: 1 / -1; }
.phga__field > span, .phga__bulk label > span { color: #463d61; display: block; font-size: 12px; font-weight: 850; margin-bottom: 6px; }
.phga__field input, .phga__field textarea, .phga__bulk textarea { background: #fff; border: 1.5px solid #dcd5eb; border-radius: 11px; color: var(--phga-ink); outline: none; padding: 11px 13px; resize: vertical; transition: .2s; width: 100%; }
.phga__field textarea { min-height: 112px; }
.phga__field input:focus, .phga__field textarea:focus, .phga__bulk textarea:focus { border-color: var(--phga-purple); box-shadow: 0 0 0 3px rgba(109,63,224,.12); }
.phga__field small { color: var(--phga-muted); display: block; font-size: 11px; margin-top: 6px; }

.phga__data-card { background: #faf8ff; border: 1px solid #e4def1; border-radius: 16px; padding: 16px; }
.phga__data-head { align-items: center; display: flex; justify-content: space-between; margin-bottom: 10px; }
.phga__data-head strong { color: #433761; font-size: 13px; }
.phga__data-head span { color: var(--phga-muted); font-size: 11px; }
.phga__row { align-items: center; display: grid; gap: 8px; grid-template-columns: 34px minmax(110px, 1fr) minmax(100px, .55fr) 36px; margin-bottom: 8px; }
.phga__row-number { align-items: center; background: #ebe4fb; border-radius: 9px; color: var(--phga-purple-dark); display: flex; font-size: 12px; font-weight: 900; height: 34px; justify-content: center; }
.phga__row input { background: #fff; border: 1px solid #d9d2e8; border-radius: 9px; color: var(--phga-ink); min-width: 0; outline: none; padding: 9px 11px; width: 100%; }
.phga__row input:focus { border-color: var(--phga-purple); box-shadow: 0 0 0 3px rgba(109,63,224,.1); }
.phga__row-delete { align-items: center; background: transparent; border: 0; border-radius: 8px; color: #a19bad; cursor: pointer; display: flex; font-size: 19px; height: 34px; justify-content: center; }
.phga__row-delete:hover { background: #ffe9f0; color: #d52f67; }
.phga__row-actions, .phga__form-actions, .phga__preview-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.phga__bulk { align-items: end; border-top: 1px dashed #d4c9eb; display: grid; gap: 12px; grid-template-columns: 1fr auto; margin-top: 14px; padding-top: 14px; }
.phga__bulk textarea { min-height: 100px; }

.phga__button { align-items: center; border: 0; border-radius: 11px; cursor: pointer; display: inline-flex; font-size: 13px; font-weight: 850; gap: 7px; justify-content: center; min-height: 41px; padding: 9px 15px; transition: .2s ease; }
.phga__button:hover { transform: translateY(-1px); }
.phga__button--primary { background: linear-gradient(110deg, var(--phga-purple), #8950e7); box-shadow: 0 8px 20px rgba(109,63,224,.25); color: #fff !important; }
.phga__button--primary:hover { box-shadow: 0 11px 25px rgba(109,63,224,.34); }
.phga__button--soft { background: var(--phga-purple-soft); border: 1px solid #ddcffd; color: var(--phga-purple-dark) !important; }
.phga__button--ghost { background: #fff; border: 1px solid #dcd5eb; color: #504566 !important; }
.phga__button--example { background: #fff8dc; border: 1px solid #ffe08c; color: #674e0c !important; }
.phga__form-actions { justify-content: space-between; margin-top: 22px; }
.phga__form-actions .phga__button--primary { font-size: 15px; min-width: 190px; }

.phga__template-grid { display: grid; gap: 13px; grid-template-columns: repeat(3, 1fr); margin-bottom: 20px; }
.phga__template { align-items: center; background: #fff; border: 2px solid var(--phga-line); border-radius: 15px; cursor: pointer; display: grid; gap: 12px; grid-template-columns: 52px 1fr 24px; min-height: 80px; padding: 11px 14px; text-align: left; }
.phga__template:hover { border-color: #c4b3ef; }
.phga__template.is-active { background: #f8f5ff; border-color: var(--phga-purple); }
.phga__template > b { align-items: center; background: var(--phga-purple); border-radius: 50%; color: #fff; display: none; font-size: 11px; height: 22px; justify-content: center; width: 22px; }
.phga__template.is-active > b { display: flex; }
.phga__template strong { color: #382e54; display: block; font-size: 13px; }
.phga__template small { color: var(--phga-muted); display: block; font-size: 10px; }
.phga__swatches { display: flex; gap: 3px; }
.phga__swatches i { background: var(--phga-purple); border-radius: 4px; display: block; height: 34px; width: 13px; }
.phga__swatches i:nth-child(2) { background: var(--phga-pink); height: 45px; margin-top: -11px; }
.phga__swatches i:nth-child(3) { background: var(--phga-cyan); height: 27px; margin-top: 7px; }
.phga__paper-icon { align-items: center; background-color: #fff; background-image: linear-gradient(#d7e2f4 1px, transparent 1px), linear-gradient(90deg,#d7e2f4 1px,transparent 1px); background-size: 8px 8px; border: 1px solid #aebdd6; border-radius: 7px; color: var(--phga-purple); display: flex; font-size: 26px; height: 48px; justify-content: center; width: 48px; }
.phga__simple-icon { align-items: center; background: #fff; border: 2px solid #4e4e54; border-radius: 6px; color: #222; display: flex; font-family: Georgia, serif; font-size: 21px; height: 44px; justify-content: center; width: 48px; }

.phga__toolbar { align-items: center; background: #f8f5ff; border: 1px solid #e2daf3; border-radius: 13px 13px 0 0; display: flex; gap: 18px; padding: 11px 15px; }
.phga__chart-chip { align-items: center; display: flex; gap: 8px; margin-right: auto; }
.phga__chart-chip span { align-items: center; background: var(--phga-purple); border-radius: 8px; color: #fff; display: flex; height: 30px; justify-content: center; width: 30px; }
.phga__chart-chip strong { color: #40345d; font-size: 13px; }
.phga__switch { align-items: center; color: #5d556e; cursor: pointer; display: flex; font-size: 11px; font-weight: 800; gap: 6px; white-space: nowrap; }
.phga__switch input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.phga__switch > span { background: #c9c2d4; border-radius: 999px; height: 21px; position: relative; transition: .2s; width: 37px; }
.phga__switch > span::after { background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,.2); content: ""; height: 17px; left: 2px; position: absolute; top: 2px; transition: .2s; width: 17px; }
.phga__switch input:checked + span { background: var(--phga-purple); }
.phga__switch input:checked + span::after { transform: translateX(16px); }
.phga__switch input:focus-visible + span { outline: 3px solid rgba(109,63,224,.25); }

.phga__chart-wrap { background: #fff; border: 1px solid #ded7ec; border-top: 0; min-height: 460px; padding: 12px; position: relative; }
.phga__chart { align-items: center; display: flex; justify-content: center; min-height: 430px; overflow: hidden; }
.phga__chart svg { display: block; height: auto; max-height: 620px; width: 100%; }
.phga__empty { align-items: center; color: #514967; display: flex; flex-direction: column; inset: 0; justify-content: center; position: absolute; }
.phga__empty > span { align-items: center; background: #fff0c9; border-radius: 50%; color: #8a6211; display: flex; font-size: 22px; font-weight: 900; height: 48px; justify-content: center; margin-bottom: 8px; width: 48px; }
.phga__empty small { color: var(--phga-muted); }

.phga__chart.phga--animate .phga-bar { animation: phgaBarGrow .75s cubic-bezier(.2,.8,.2,1) both; transform-box: fill-box; transform-origin: center bottom; }
.phga__chart.phga--animate .phga-slice { animation: phgaSliceIn .65s ease both; transform-box: fill-box; transform-origin: center; }
.phga__chart.phga--animate .phga-line-path { animation: phgaLineDraw 1.25s ease both; }
.phga__chart.phga--animate .phga-point, .phga__chart.phga--animate .phga-dot { animation: phgaDotPop .45s ease both; transform-box: fill-box; transform-origin: center; }
.phga__chart.phga--animate .phga-table-row { animation: phgaRowIn .4s ease both; }
@keyframes phgaBarGrow { from { opacity: .2; transform: scaleY(.03); } }
@keyframes phgaSliceIn { from { opacity: 0; transform: scale(.7); } }
@keyframes phgaLineDraw { from { stroke-dashoffset: 2000; } }
@keyframes phgaDotPop { from { opacity: 0; transform: scale(0); } }
@keyframes phgaRowIn { from { opacity: 0; transform: translateX(-10px); } }

.phga__summary { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); margin-top: 13px; }
.phga__summary-item { align-items: center; background: #faf8ff; border: 1px solid #e5dff1; border-radius: 12px; display: flex; gap: 10px; padding: 10px 13px; }
.phga__summary-item > span { align-items: center; background: var(--phga-purple-soft); border-radius: 9px; color: var(--phga-purple); display: flex; font-size: 16px; height: 34px; justify-content: center; width: 34px; }
.phga__summary-item small { color: var(--phga-muted); display: block; font-size: 10px; }
.phga__summary-item strong { color: #3a3150; display: block; font-size: 14px; }
.phga__preview-actions { justify-content: center; margin-top: 22px; }

.phga__notebook-layout { display: grid; gap: 18px; grid-template-columns: minmax(0,1.35fr) minmax(250px,.65fr); }
.phga__guide-card { background-color: #fff; background-image: linear-gradient(#e1ebfa 1px, transparent 1px), linear-gradient(90deg,#e1ebfa 1px,transparent 1px); background-size: 24px 24px; border: 1px solid #cad9ed; border-radius: 15px; box-shadow: 0 8px 22px rgba(51,75,111,.08); padding: 24px; position: relative; }
.phga__guide-card::before { background: #f48baa; content: ""; height: calc(100% - 28px); left: 48px; opacity: .45; position: absolute; top: 14px; width: 2px; }
.phga__guide-title { align-items: center; background: rgba(255,255,255,.93); border: 1px solid #dde6f3; border-radius: 12px; display: flex; gap: 12px; margin: 0 0 18px 38px; padding: 12px; position: relative; }
.phga__guide-title > span { font-size: 26px; }
.phga__guide-title strong { color: #332a50; display: block; }
.phga__guide-title small { color: var(--phga-muted); display: block; font-size: 11px; }
.phga__guide-list { counter-reset: phga-guide; list-style: none; margin: 0 0 0 38px; padding: 0; position: relative; }
.phga__guide-list li { align-items: flex-start; background: rgba(255,255,255,.9); border-bottom: 1px dashed #cbd8ea; display: flex; font-size: 13px; gap: 10px; padding: 10px 8px; }
.phga__guide-list li::before { align-items: center; background: var(--phga-purple); border-radius: 50%; color: #fff; content: counter(phga-guide); counter-increment: phga-guide; display: flex; flex: 0 0 25px; font-size: 11px; font-weight: 900; height: 25px; justify-content: center; }
.phga__guide-list li strong { color: var(--phga-purple-dark); }
.phga__note-card { align-self: start; background: #fff5b7; border: 1px solid #efdc74; border-radius: 7px 16px 9px 14px; box-shadow: 0 12px 22px rgba(100,79,9,.12); color: #584b17; padding: 28px 20px 20px; position: relative; transform: rotate(1deg); }
.phga__tape { background: rgba(217,203,167,.58); height: 24px; left: 50%; position: absolute; top: -9px; transform: translateX(-50%) rotate(-2deg); width: 88px; }
.phga__note-card > strong { display: block; font-size: 15px; margin-bottom: 12px; }
.phga__note-card label { align-items: flex-start; display: flex; font-size: 12px; gap: 7px; margin-top: 10px; }
.phga__note-card input { accent-color: var(--phga-purple); margin-top: 3px; }
.phga__scale-box { background: rgba(255,255,255,.5); border: 1px dashed #cdbd61; border-radius: 8px; font-size: 12px; margin-bottom: 13px; padding: 10px; }
.phga__scale-box strong { color: #5c4610; }

.phga__copy-card { background: #fff; border: 1px solid #dfd8ed; border-radius: 15px; margin-top: 20px; padding: 18px; }
.phga__copy-heading { align-items: center; display: flex; gap: 15px; justify-content: space-between; margin-bottom: 14px; }
.phga__copy-heading strong { color: #3d3456; display: block; }
.phga__copy-heading small { color: var(--phga-muted); display: block; font-size: 11px; }
.phga__copy-table { border-collapse: collapse; font-size: 13px; width: 100%; }
.phga__copy-table th { background: var(--phga-purple-soft); color: var(--phga-purple-dark); font-weight: 900; }
.phga__copy-table td, .phga__copy-table th { border: 1px solid #dcd5e9; padding: 8px 10px; text-align: left; }
.phga__copy-table tr:nth-child(even) td { background: #fcfaff; }

.phga__toast { background: #2f2850; border-radius: 12px; bottom: 22px; box-shadow: 0 12px 35px rgba(25,17,56,.35); color: #fff; font-size: 13px; font-weight: 800; left: 50%; padding: 11px 17px; position: fixed; transform: translateX(-50%); z-index: 99999; }
.phga__toast.is-error { background: #a62451; }
.phga__footer { align-items: center; background: #2f2454; color: #cfc3eb; display: flex; font-size: 11px; justify-content: space-between; letter-spacing: .04em; padding: 15px 54px; }
.phga__footer strong { color: #fff; }

.phga button:focus-visible, .phga input:focus-visible, .phga textarea:focus-visible { outline: 3px solid rgba(109,63,224,.28); outline-offset: 2px; }

@media (max-width: 980px) {
  .phga__type-grid { grid-template-columns: repeat(4, 1fr); }
  .phga__hero { padding: 30px 36px; }
  .phga__main { padding: 34px 36px 44px; }
  .phga__hero-art { min-width: 210px; transform: scale(.9); transform-origin: right; }
}

@media (max-width: 720px) {
  .phga { margin: 12px 0; }
  .phga__shell { border-radius: 18px; }
  .phga__hero { min-height: 170px; padding: 27px 22px; }
  .phga__hero h2 { font-size: 34px; }
  .phga__hero p { font-size: 14px; }
  .phga__hero-art { display: none; }
  .phga__steps { padding: 0 5px; }
  .phga__step { flex-direction: column; gap: 4px; min-height: 74px; padding: 8px 3px; }
  .phga__step span { height: 27px; width: 27px; }
  .phga__step strong { font-size: 11px; }
  .phga__main { min-height: 0; padding: 25px 16px 32px; }
  .phga__section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .phga__section-heading h3 { font-size: 21px; }
  .phga__type-grid { gap: 8px; grid-template-columns: repeat(2, 1fr); }
  .phga__type { min-height: 116px; }
  .phga__form-grid, .phga__template-grid, .phga__notebook-layout { grid-template-columns: 1fr; }
  .phga__field--wide { grid-column: auto; }
  .phga__row { grid-template-columns: 29px minmax(80px,1fr) minmax(70px,.65fr) 30px; }
  .phga__bulk { grid-template-columns: 1fr; }
  .phga__form-actions { flex-direction: column-reverse; }
  .phga__form-actions .phga__button { width: 100%; }
  .phga__template { min-height: 70px; }
  .phga__toolbar { align-items: flex-start; flex-wrap: wrap; gap: 8px 14px; }
  .phga__chart-chip { flex-basis: 100%; }
  .phga__chart-wrap { min-height: 300px; padding: 3px; }
  .phga__chart { min-height: 290px; overflow-x: auto; }
  .phga__chart svg { min-width: 620px; }
  .phga__summary { grid-template-columns: 1fr; }
  .phga__preview-actions .phga__button { flex: 1 1 100%; }
  .phga__guide-card { padding: 16px 10px; }
  .phga__guide-card::before { left: 28px; }
  .phga__guide-title, .phga__guide-list { margin-left: 27px; }
  .phga__copy-heading { align-items: flex-start; flex-direction: column; }
  .phga__footer { padding: 14px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .phga *, .phga *::before, .phga *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media print {
  body.phga-printing * { visibility: hidden !important; }
  body.phga-printing .phga.is-print-target, body.phga-printing .phga.is-print-target * { visibility: visible !important; }
  body.phga-printing .phga.is-print-target { left: 0; margin: 0; max-width: none; position: absolute; top: 0; width: 100%; }
  body.phga-printing .phga__hero, body.phga-printing .phga__steps, body.phga-printing .phga__template-grid, body.phga-printing .phga__section-heading, body.phga-printing .phga__toolbar, body.phga-printing .phga__summary, body.phga-printing .phga__preview-actions, body.phga-printing .phga__footer { display: none !important; }
  body.phga-printing .phga__main { padding: 0; }
  body.phga-printing .phga__panel { display: none !important; }
  body.phga-printing .phga__panel[data-panel="preview"] { display: block !important; }
  body.phga-printing .phga__chart-wrap { border: 0; min-height: 0; }
  body.phga-printing .phga__chart { min-height: 0; }
}
