:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #212526;
  background: #f4f4f1;
  font-synthesis: none;
  --accent: #be302c;
  --line: #dadeda;
  --muted: #66716e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid #ccd1cd;
  border-radius: 5px;
  background: #fff;
  color: #252b29;
  min-height: 38px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 12px;
}
button:hover {
  background: #edf0eb;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
svg:focus-visible {
  outline: 3px solid #377b9e;
  outline-offset: 3px;
}
header {
  height: 80px;
  background: #1c2220;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 32px;
  border-bottom: 3px solid var(--accent);
}
a {
  color: inherit;
}
.brand {
  font-size: 25px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -1.3px;
}
.brand span {
  color: #f1f1e8;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 3.7px;
  margin-top: 4px;
  font-weight: 500;
  color: #b8c5bc;
}
.tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  border-left: 1px solid #54615a;
  padding-left: 26px;
  color: #c4ccc4;
}
.back {
  margin-left: auto;
  font-size: 11px;
  color: #c9d0c9;
  text-decoration: none;
}
main {
  max-width: 1580px;
  margin: auto;
  padding: 28px 40px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 27px;
  gap: 20px;
}
.eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #7a817c;
  margin: 0 0 10px;
}
h1 {
  font-size: 38px;
  letter-spacing: -1.7px;
  margin: 0 0 10px;
  font-weight: 700;
}
.intro p:not(.eyebrow) {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.draft-actions {
  display: flex;
  gap: 7px;
}
.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
aside {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 21px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  scrollbar-width: thin;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 6px;
}
h2 {
  font-size: 16px;
  letter-spacing: -0.3px;
  margin: 0;
}
.units {
  display: flex;
  background: #f0f2ee;
  border-radius: 5px;
  padding: 2px;
}
.units button {
  padding: 5px 9px;
  min-height: 28px;
  border: 0;
  background: transparent;
  font-size: 11px;
}
.units button[aria-pressed="true"] {
  background: #263f32;
  color: white;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin: 12px 0;
  color: #4b5850;
}
input:not([type="checkbox"]):not([type="range"]):not([type="color"]),
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid #d8ded7;
  border-radius: 4px;
  padding: 10px;
  margin-top: 6px;
  background: #fff;
  color: #232d27;
  font-size: 13px;
  min-height: 38px;
}
input:invalid {
  border-color: #c86963;
}
input[type="color"] {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: 5px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 3px;
}
input[type="range"] {
  accent-color: #38684e;
  width: 100%;
  margin-top: 10px;
}
summary {
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 18px 0;
  display: flex;
  gap: 11px;
  align-items: center;
}
summary:after {
  content: "+";
  margin-left: auto;
  color: #78857a;
}
details[open] > summary:after {
  content: "−";
}
summary span {
  font-size: 9px;
  color: #929c91;
  font-weight: 400;
}
details {
  border-top: 1px solid #e7eae4;
  margin-top: 18px;
}
details label:first-of-type {
  margin-top: 0;
}
.shape-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.shape-grid button {
  padding: 10px 3px 9px;
  font-size: 10px;
  min-height: 66px;
  font-weight: 400;
}
.shape-grid svg {
  display: block;
  margin: 0 auto 7px;
  width: 23px;
  height: 23px;
  stroke: #586b5d;
  fill: none;
  stroke-width: 1.5;
}
.shape-grid button[aria-pressed="true"] {
  border: 1px solid #4a7358;
  background: #edf3ed;
  color: #2f553d;
  box-shadow: inset 0 0 0 1px #4a7358;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.help {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
small.unit-label {
  float: right;
  font-weight: 400;
  color: #889389;
}
.preview-panel {
  min-width: 0;
  position: sticky;
  top: 20px;
}
.preview-head {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.preview-head p {
  font-size: 10px;
  color: var(--muted);
  margin: 7px 0 0;
}
.preview-head button {
  font-size: 10px;
  min-height: 32px;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #527759;
  margin-right: 8px;
}
#preview-wrap {
  position: relative;
  height: 420px;
  background: #e6e9e1;
  background-image:
    linear-gradient(#dce1d8 1px, transparent 1px),
    linear-gradient(90deg, #dce1d8 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid var(--line);
  overflow: hidden;
}
#preview {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#preview-message {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  font-size: 12px;
  background: #fffaf0;
  padding: 12px;
  border-radius: 4px;
  box-shadow: 0 1px 8px #0001;
}
#preview-message:empty {
  display: none;
}
.canvas-label {
  position: absolute;
  bottom: 15px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  font: 9px monospace;
  color: #5c695d;
  pointer-events: none;
}
.preview-tools {
  background: white;
  border: 1px solid var(--line);
  border-top: 0;
  padding: 7px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #788578;
}
.preview-tools label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  width: 210px;
}
.preview-tools input {
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 23px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.stats > div {
  padding: 0 24px;
  border-right: 1px solid #e3e8e0;
}
.stats > div:last-child {
  border: 0;
}
.stats small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.3px;
  color: #788578;
  margin-bottom: 10px;
}
.stats strong {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.6px;
}
.quote-card {
  margin-top: 20px;
  border: 1px solid #d6ddcf;
  background: #eaf0e4;
  padding: 23px 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.quote-card h2 {
  font-size: 22px;
}
.quote-card p:not(.eyebrow) {
  font-size: 11px;
  line-height: 1.6;
  color: #67755e;
  max-width: 330px;
  margin-bottom: 0;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  padding: 14px 20px;
  white-space: nowrap;
  min-height: 44px;
  font-size: 12px;
}
.primary:hover {
  background: #a72320;
  color: #fff;
}
.primary span {
  margin-left: 22px;
}
.prototype-note {
  font-size: 10px;
  color: #75806f;
  margin: 14px 0;
}
#status {
  font-size: 12px;
  color: #784735;
  line-height: 1.5;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding: 20px 0;
  font-size: 9px;
  color: #7d887c;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.swatches button {
  min-height: 24px;
  width: 24px;
  padding: 0;
  border: 2px solid #ddd;
}
.swatches button:hover {
  outline: 2px solid #888;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
  width: min(900px, calc(100% - 28px));
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 80px #0004;
}
dialog::backdrop {
  background: #182a2477;
  backdrop-filter: blur(4px);
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.dialog-top button {
  border: 0;
  background: #f1f3ee;
}
.dialog-top h2 {
  font-size: 22px;
}
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 22px;
}
.editor-toolbar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.editor-toolbar select {
  max-width: 180px;
  margin: 0;
}
.editor-toolbar button {
  padding: 7px 9px;
  font-size: 10px;
}
#edit-canvas {
  width: 100%;
  background: #f0f3ec;
  border: 1px solid #c8d1c3;
  touch-action: none;
  max-height: 430px;
}
#edit-canvas path {
  cursor: move;
}
#edit-error,
#letter-error {
  font-size: 12px;
  color: #a02c29;
  min-height: 15px;
}
.check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  line-height: 1.6;
}
.check input {
  margin: 3px 0;
}
#letter-dialog,
#quote-dialog {
  max-width: 640px;
}
#letter-preview {
  width: 100%;
  background: #eef1e9;
  margin-top: 15px;
}
#quote-dialog > p {
  font-size: 12px;
  line-height: 1.7;
  color: #586451;
}
.mock-badge {
  font-size: 9px;
  letter-spacing: 1px;
  background: #fff2dc;
  color: #946521;
  padding: 10px;
  border-radius: 3px;
}
#quote-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #f0f0e9;
  margin-top: 15px;
}
#coverage {
  font-size: 12px;
  line-height: 1.5;
  background: #edf1e8;
  padding: 12px;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
progress {
  width: 100%;
  margin-top: 25px;
  accent-color: #426e50;
}
#quote-status {
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
}
#quote-form[hidden],
#preparing[hidden] {
  display: none;
}
@media (min-width: 1450px) {
  #preview-wrap {
    height: 500px;
  }
  .workspace {
    grid-template-columns: 350px minmax(0, 1fr);
  }
}
@media (max-width: 950px) {
  header {
    padding: 0 24px;
  }
  .tag {
    display: none;
  }
  main {
    padding: 24px;
  }
  .workspace {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
  }
  aside {
    padding: 16px;
  }
  .quote-card {
    display: block;
  }
  .quote-card button {
    margin-top: 16px;
  }
  .stats > div {
    padding: 0 12px;
  }
  .stats strong {
    font-size: 15px;
  }
  .intro {
    align-items: start;
  }
  h1 {
    font-size: 32px;
  }
  .draft-actions {
    flex-wrap: wrap;
    justify-content: end;
  }
  .preview-head {
    padding: 16px;
  }
  #preview-wrap {
    height: 360px;
  }
  .preview-tools span {
    display: none;
  }
}
@media (max-width: 680px) {
  header {
    height: 70px;
    padding: 0 18px;
  }
  .brand {
    font-size: 22px;
  }
  .back {
    font-size: 9px;
    max-width: 95px;
    text-align: right;
    line-height: 1.6;
  }
  main {
    padding: 22px 14px;
  }
  .intro {
    display: block;
  }
  .intro h1 {
    font-size: 33px;
  }
  .intro p:not(.eyebrow) {
    font-size: 11px;
    line-height: 1.5;
  }
  .draft-actions {
    justify-content: start;
    margin-top: 18px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .preview-panel {
    position: static;
    order: -1;
    width: 100%;
  }
  #preview-wrap {
    height: 280px;
  }
  .preview-head {
    padding: 14px;
  }
  .quote-card {
    display: flex;
    padding: 18px;
    gap: 12px;
  }
  .quote-card .eyebrow {
    font-size: 7px;
  }
  .quote-card h2 {
    font-size: 19px;
  }
  .quote-card button {
    margin: 0;
    padding: 12px;
    font-size: 10px;
  }
  .quote-card p:not(.eyebrow) {
    font-size: 10px;
  }
  .primary span {
    margin-left: 5px;
  }
  .stats {
    padding: 18px 0;
  }
  .stats small {
    font-size: 7px;
    letter-spacing: 0.6px;
  }
  .stats strong {
    font-size: 16px;
  }
  aside {
    width: 100%;
    max-height: none;
    padding: 20px;
  }
  .shape-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .preview-tools {
    padding: 9px 18px;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  dialog {
    padding: 18px;
  }
  #edit-canvas {
    max-height: 340px;
  }
  footer {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }
  .prototype-note {
    font-size: 9px;
  }
  #special button {
    margin-top: 8px;
  }
}
[hidden] {
  display: none !important;
}
@media (max-width: 680px) {
  label {
    font-size: 12px;
  }
  .help {
    font-size: 11px;
  }
  input:not([type="checkbox"]):not([type="range"]):not([type="color"]),
  select,
  textarea {
    font-size: 16px;
  }
  aside button,
  .editor-toolbar button {
    min-height: 44px;
  }
}

/* iOS AppTheme / CCGActionButtonStyle, adapted to a responsive website. */
:root{color-scheme:dark;--page:#051217;--surface:#000;--card:#1a2126;--selected:#4a4a4a;--text:#fff;--muted:#afbbc3;--blue:#0a84ff;--cyan:#32d7f5;--teal:#40c8e0;--green:#30d158;--orange:#ff9f0a;--red:#ff453a;--line:#ffffff26;--accent:var(--cyan);font:15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--page);color:var(--text)}
body{background:var(--page);color:var(--text)}
button{--button-accent:var(--cyan);background:linear-gradient(135deg,color-mix(in srgb,var(--button-accent) 32%,transparent),color-mix(in srgb,var(--button-accent) 20%,transparent)),#000a;border:1px solid color-mix(in srgb,var(--button-accent) 65%,transparent);border-radius:12px;color:white;min-height:44px;padding:10px 12px;font-size:15px;font-weight:600;box-shadow:0 2px 5px color-mix(in srgb,var(--button-accent) 15%,transparent);transition:filter .12s,opacity .12s}
button:hover{background-color:#10232b;filter:brightness(1.14)}button:active{opacity:.7}button:disabled{opacity:.4;filter:none;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,svg:focus-visible{outline:3px solid var(--cyan);outline-offset:3px}
header{height:76px;background:#000;border-bottom:1px solid #ffffff24;padding:0 32px;gap:24px}.brand{font-size:24px;letter-spacing:-1px}.brand small{font-size:10px;color:var(--cyan);letter-spacing:3px}.brand span{color:#fff}.tag{font-size:11px;letter-spacing:1px;color:var(--muted);border-color:var(--line)}.back{font-size:13px;color:#cad8df}
main{max-width:1560px;padding:26px 32px}.intro{margin-bottom:24px;gap:16px}.eyebrow{color:var(--cyan);font-size:11px;letter-spacing:1.5px;margin-bottom:6px}h1,.intro h1{font-size:28px;letter-spacing:-.6px;margin-bottom:4px}.intro p:not(.eyebrow){font-size:14px;color:var(--muted)}.draft-actions{gap:8px;flex-wrap:wrap}.quiet,#reset,#delete,#delete-point{--button-accent:var(--red)}#save,.apply,#apply-custom,#apply-letter,#finish-outline{--button-accent:var(--teal)}
.workspace{grid-template-columns:minmax(370px,440px) minmax(0,1fr);gap:24px}aside{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px;max-height:none;overflow:visible}.panel-heading{display:block;margin-bottom:16px}.panel-heading h2{margin-bottom:12px}h2{font-size:18px;letter-spacing:-.2px}.units,.segments{display:flex;gap:4px;padding:4px;background:#0009;border:1px solid var(--line);border-radius:12px}.units button,.segments button{flex:1;min-width:0;min-height:44px;padding:8px;font-size:14px;border:1px solid transparent;background:transparent;box-shadow:none;white-space:normal}.units button[aria-pressed=true],.segments button[aria-pressed=true]{background:#0a84ff29;border-color:var(--blue);color:white}.segments{margin-top:8px}.segments button[aria-expanded]{font-size:14px}.background-group{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
label{font-size:15px;color:#eef3f6;margin:14px 0;font-weight:500}.help{font-size:12px;line-height:1.6;color:var(--muted)}input:not([type=checkbox]):not([type=range]):not([type=color]),select,textarea{background:#0b151c;color:#fff;border:1px solid #52606b;border-radius:10px;min-height:44px;font-size:16px;padding:10px 12px}input::placeholder,textarea::placeholder{color:#97a6b0}input:invalid{border-color:var(--red)}input[type=checkbox]{accent-color:var(--blue);width:20px;height:20px;flex-shrink:0}.pair{gap:14px}.attribute{margin:14px 0}.pair:has(.attribute){grid-template-columns:1fr}.attribute-top{display:flex;justify-content:space-between;align-items:center;gap:8px}.attribute-top>span{font-size:15px}.exact-value{display:flex;gap:6px;align-items:center;flex-shrink:0;font-variant-numeric:tabular-nums;font-size:14px;padding:7px 9px}.exact-value img{width:13px;height:13px;filter:invert(1)}.edit-word{font-size:12px}.attribute-slider{display:block}input[type=range]{appearance:none;-webkit-appearance:none;background:transparent;height:36px;width:100%;margin:4px 0;cursor:pointer;accent-color:var(--blue)}input[type=range]::-webkit-slider-runnable-track{height:5px;border-radius:8px;background:linear-gradient(to right,var(--blue) var(--range-fill,50%),#58616a var(--range-fill,50%))}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;border-radius:50%;background:#fff;border:2px solid #e2eef5;box-shadow:0 1px 4px #0008;margin-top:-8.5px}input[type=range]::-moz-range-track{height:5px;border-radius:8px;background:#58616a}input[type=range]::-moz-range-progress{height:5px;border-radius:8px;background:var(--blue)}input[type=range]::-moz-range-thumb{width:20px;height:20px;border:1px solid white;border-radius:50%;background:white}input[type=range]:disabled{opacity:.4;cursor:default}
details{border:1px solid #ffffff40;border-radius:12px;padding:0 12px 12px;margin-top:18px}details:not([open]){padding-bottom:0}summary{padding:14px 0;font-size:17px;color:white;gap:10px}summary span{font:bold 12px ui-monospace,monospace;color:var(--blue)}summary:after{content:'⌄';font-size:20px;color:var(--muted);transform:rotate(-90deg)}details[open]>summary:after{content:'⌄';transform:none}.shape-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.shape-grid button{min-height:76px;font-size:11px;font-weight:700;padding:8px 3px;background:#ffffff0a;border:1px solid #ffffff1f;box-shadow:none;color:#e8edf0;border-radius:12px}.shape-grid svg{width:32px;height:28px;stroke:currentColor;color:inherit;stroke-width:1.5;margin-bottom:8px}.shape-grid button[aria-pressed=true]{background:#0a84ff29;border:1px solid var(--blue);color:var(--blue);box-shadow:none}.shape-grid button[aria-pressed=true] polygon,.shape-grid button[aria-pressed=true] circle{fill:currentColor}.shape-grid button:hover{background:#ffffff14}#special button{margin:10px 0;width:100%}
.preview-panel{top:16px}.preview-head{background:var(--card);border:1px solid var(--line);border-radius:18px 18px 0 0;gap:10px;padding:16px;flex-wrap:wrap}.preview-head>div{flex:1;min-width:160px}.preview-head button{font-size:13px;min-height:44px}.preview-head p{font-size:12px;color:var(--muted)}.preview-name{margin:0;font-size:12px;color:var(--muted)}.preview-name input{font-weight:600;font-size:18px!important;margin-top:4px!important}.live-dot{background:var(--green)}#preview-wrap{height:440px;border-radius:0 0 18px 18px;background:#000;background-image:none;border:1px solid #ffffff1f}#preview-message{background:#132932ed;color:#e7faff;border:1px solid #32d7f555;border-radius:12px;right:66px;font-size:13px;box-shadow:none}.preview-badge{position:absolute;left:14px;bottom:38px;background:#000c;border-radius:30px;padding:7px 10px;font-size:10px;font-weight:700;letter-spacing:.7px;pointer-events:none}.canvas-label{left:18px;right:68px;bottom:12px;color:#fff;font-size:10px;gap:8px;text-shadow:0 1px 3px #000}.canvas-label span{background:#000b;border-radius:5px;padding:2px 4px}.zoom-rail{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:44px;padding:4px 0;background:#000b;border:1px solid #ffffff26;border-radius:24px;display:flex;flex-direction:column;align-items:center;gap:8px}.zoom-rail button{background:transparent;border:0;box-shadow:none;min-height:36px;width:42px;padding:0;font-size:24px}.zoom-rail input{writing-mode:vertical-lr;direction:rtl;width:36px;height:130px;margin:0}.zoom-rail input::-webkit-slider-runnable-track{width:5px;height:100%;background:#52616c}.zoom-rail input::-webkit-slider-thumb{margin:0 0 0 -8.5px;background:var(--blue);border-color:var(--blue)}#preview-wrap:fullscreen{height:100vh;width:100vw;border-radius:0}.preview-tools{background:transparent;border:0;padding:12px 4px;color:var(--muted);font-size:12px;gap:12px}.repeat-description{color:white}.stats{background:#ffffff0f;border:1px solid var(--line);border-radius:12px;padding:16px 0}.stats>div{padding:0 18px;border-color:var(--line)}.stats small{font-size:10px;color:var(--muted);letter-spacing:.6px;margin-bottom:6px}.stats strong{font-size:18px;font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:0}.quote-card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px;gap:18px}.quote-card h2{font-size:21px}.quote-card p:not(.eyebrow){font-size:13px;color:var(--muted);max-width:360px}.quote-card .eyebrow{font-size:10px}.primary{white-space:normal;min-height:48px;font-size:15px;padding:12px 18px;background:linear-gradient(135deg,#146ea6,#0d4a78);border-color:#32d7f5a6;color:#fff}#quote,#send{background:linear-gradient(135deg,#1aa84d,#085c29);border-color:#30d15880;flex-shrink:0}.primary:hover{background-color:#146ea6;filter:brightness(1.1)}#quote{max-width:220px}.prototype-note{font-size:12px;color:var(--muted)}#status{color:var(--orange);font-size:13px}footer{font-size:12px;color:var(--muted);border-color:var(--line);flex-wrap:wrap}
.color-wheel{margin-top:16px}.wheel-title{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px}.color-swatch{min-height:44px;width:48px;flex-shrink:0;border:2px solid #ffffffa6;box-shadow:none}.wheel-disc{width:180px;height:180px;border-radius:50%;position:relative;margin:24px auto;touch-action:none;border:1px solid #fff6;background:radial-gradient(circle,#fff,transparent 70.7%),conic-gradient(from 90deg,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)}.wheel-shade{position:absolute;inset:0;border-radius:50%;background:#000;pointer-events:none}.wheel-marker{position:absolute;width:20px;height:20px;border:3px solid white;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 1px 4px #000;pointer-events:none}.brightness{font-size:14px}.brightness output, label>output{float:right;font-variant-numeric:tabular-nums}.rgb-readout{font:12px ui-monospace,monospace;color:var(--muted);text-align:center}.range-ends{display:flex;justify-content:space-between;color:var(--muted);font-size:12px}.control-title{font-size:15px;margin-bottom:4px}.swatches{margin-top:12px;gap:8px}.swatches button{width:32px;min-height:32px;border-radius:8px;border:1px solid #fff8;box-shadow:none}
dialog{background:#101e28;color:#fff;border:1px solid #32d7f580;border-radius:18px;padding:20px;max-height:90dvh;width:min(1000px,calc(100% - 24px))}dialog::backdrop{background:#000b;backdrop-filter:blur(5px)}.dialog-top{position:sticky;top:-20px;background:#101e28;z-index:2;padding:12px 0;border-bottom:1px solid var(--line)}.dialog-top h2{font-size:20px}.dialog-top button{background:#32d7f526;border:1px solid #32d7f580}.editor-toolbar{gap:8px}.editor-toolbar button{font-size:13px;min-height:44px}.editor-layout{grid-template-columns:minmax(0,1fr) 250px}#edit-canvas{background:#071219;border:1px solid var(--line);border-radius:12px;max-height:520px}#letter-preview{background:#071219;border:1px solid var(--line);border-radius:12px}#letter-preview path{fill:var(--cyan)}#edit-error,#letter-error,.entry-error{color:var(--red);font-size:13px}#quote-dialog>p{color:var(--muted);font-size:14px}.mock-badge{background:#0a84ff1a;color:var(--cyan);border:1px solid #0a84ff66;border-radius:10px;font-size:11px}#coverage{background:#ffffff0f;border-radius:12px;color:white;font-size:14px}#quote-preview{background:#000;border-radius:12px}progress{accent-color:var(--blue)}.small-dialog{max-width:440px}.entry-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px;position:sticky;bottom:-20px;background:#101e28;padding:12px 0}.entry-actions button{min-width:90px}.rgb-fields{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}#apply-custom,#apply-letter{position:sticky;bottom:-20px;z-index:2;background:#174652;margin-top:12px}
@media(min-width:1450px){#preview-wrap{height:510px}.workspace{grid-template-columns:440px minmax(0,1fr)}}
@media(max-width:1100px){main{padding:22px}.workspace{grid-template-columns:minmax(350px,390px) minmax(0,1fr);gap:18px}.quote-card{display:block}.quote-card button{margin-top:16px;width:100%;max-width:none!important}.stats>div{padding:0 10px}.stats strong{font-size:15px}.preview-head{padding:12px}}
@media(max-width:991px){.workspace{display:flex;flex-direction:column;gap:20px}.preview-panel{position:static;order:-1;width:100%}aside{width:100%}#preview-wrap{height:350px}.quote-card{display:flex}.quote-card button{width:auto;margin-top:0}.preview-tools span{display:inline}.shape-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.intro{align-items:flex-start}.intro h1{font-size:26px}.draft-actions{justify-content:flex-start}.editor-layout{grid-template-columns:1fr}.panel-heading{display:flex;flex-wrap:wrap}.panel-heading h2{margin:0}.units{min-width:230px}}
@media(max-width:500px){header{padding:0 16px;height:72px}.brand{font-size:22px}.back{font-size:11px;max-width:96px}.tag{display:none}main{padding:20px 12px}.intro{display:block}.draft-actions{margin-top:16px}.draft-actions button{font-size:14px}.quote-card{display:block;padding:16px}.quote-card button{width:100%;margin-top:14px}#preview-wrap{height:310px}.preview-head{gap:8px}.preview-head>div{flex-basis:100%}.preview-head button{flex:1}.stats small{font-size:9px}.stats strong{font-size:14px}.stats>div{padding:0 8px}.canvas-label{font-size:8px}.preview-badge{font-size:9px}.preview-tools{font-size:11px}aside{padding:14px}details{padding-left:10px;padding-right:10px}.attribute-top>span{font-size:14px}.exact-value{font-size:13px}.exact-value .edit-word{font-size:11px}.shape-grid button{font-size:10px}.units{width:100%;margin-top:12px}dialog{padding:14px;max-height:94dvh}.dialog-top{top:-14px}.entry-actions{bottom:-14px}.editor-toolbar select{max-width:100%;width:100%}#edit-canvas{max-height:none}footer{gap:12px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Keep the live preview visible while the design controls scroll. */
.preview-panel { position: sticky; top: 16px; align-self: start; }
@media (min-width: 992px) {
  #preview-wrap { height: clamp(160px, calc(100dvh - 550px), 440px); }
}
@media (max-width: 991px) {
  /* Flatten the panel so the canvas sticks throughout the whole workspace,
     not just until its original panel ends above the controls. */
  .preview-panel { display: contents; }
  .preview-head { order: -3; width: 100%; }
  #preview-wrap {
    order: -4;
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    height: clamp(160px, 32dvh, 280px);
    flex-shrink: 0;
    border-radius: 12px;
    box-shadow: 0 8px 20px #0006;
  }
  .preview-tools { order: -1; width: 100%; }
  .workspace > aside { order: 0; }
  .stats { order: 1; width: 100%; }
  .quote-card { order: 2; width: 100%; }
  .prototype-note { order: 3; }
  #status { order: 4; }
  .zoom-rail { gap: 2px; }
  .zoom-rail input { height: clamp(50px, 12dvh, 120px); }
  aside summary, aside button, aside input, aside select {
    scroll-margin-top: calc(clamp(160px, 32dvh, 280px) + 16px);
  }
}
#preview-3d{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab}#preview-3d:active{cursor:grabbing}.zoom-rail,.preview-badge,.canvas-label{z-index:2}.view-status{position:absolute;top:12px;left:12px;right:62px;z-index:3;background:#10202eef;color:white;border:1px solid #32d7f570;border-radius:10px;padding:10px;font-size:12px;pointer-events:none}.view-status:empty{display:none}.view-modes{flex:0 0 120px!important;min-width:120px!important;margin:0}.preview-tools{flex-wrap:wrap}.preview-tools button{font-size:12px;min-height:40px}.preview-tools button[aria-pressed=true]{border-color:var(--blue);background:#0a84ff33}.calibration-space{height:75px;display:flex;align-items:center;justify-content:center;overflow:visible}.calibration-line{height:16px;border:solid currentColor;border-width:0 2px;position:relative;flex-shrink:0}.calibration-line:before{content:"";position:absolute;left:0;right:0;top:7px;border-top:2px solid currentColor}.calibration-dialog{min-width:340px}.calibration-dialog p{font-size:13px;line-height:1.5}
:root[data-theme=light]{color-scheme:light;--card:#ffffff;--line:#bacad2;--muted:#4b606c;color:#102c3a;background:#eef4f6}
[data-theme=light] body{background:#eef4f6;color:#102c3a}[data-theme=light] header{background:#fff;border-color:#c8d6dc}[data-theme=light] .brand,[data-theme=light] h1,[data-theme=light] h2,[data-theme=light] summary,[data-theme=light] label,[data-theme=light] .attribute-top,[data-theme=light] .repeat-description,[data-theme=light] .stats strong{color:#102c3a}[data-theme=light] .eyebrow,[data-theme=light] .back,[data-theme=light] .brand small,[data-theme=light] .brand span{color:#176583}
[data-theme=light] button{background:#e0f2f7;border-color:#438fa6;color:#123c4d;box-shadow:0 2px 5px #17495a12}[data-theme=light] button:hover{background:#cde9f3}[data-theme=light] .quiet{background:transparent;color:#415964}[data-theme=light] input:not([type=range]),[data-theme=light] select,[data-theme=light] textarea{background:#fff;color:#143344;border-color:#9db3bf}[data-theme=light] .units,[data-theme=light] .segments{background:#e9f0f4}[data-theme=light] .units button,[data-theme=light] .segments button{background:transparent;color:#143344}[data-theme=light] .units button[aria-pressed=true],[data-theme=light] .segments button[aria-pressed=true]{background:#d6eaff;color:#054e94;border-color:#1476d7}[data-theme=light] .shape-grid button{background:#f1f6f8;color:#193c4f;border-color:#c3d1d9}[data-theme=light] .shape-grid button[aria-pressed=true]{background:#d6eaff;color:#0755a0;border-color:#1476d7}[data-theme=light] .shape-grid svg{color:inherit}[data-theme=light] .exact-value img{filter:none}[data-theme=light] details{border-color:#bacad2}[data-theme=light] .stats{background:#fff}[data-theme=light] .color-wheel,[data-theme=light] .control-title{color:#143344}[data-theme=light] .color-wheel .help,[data-theme=light] .help,[data-theme=light] .prototype-note{color:#4b606c}[data-theme=light] dialog,[data-theme=light] .dialog-top,[data-theme=light] .entry-actions{background:#f7fbfd;color:#143344}[data-theme=light] dialog::backdrop{background:#12334466}[data-theme=light] #coverage{background:#e3edf3;color:#143344}[data-theme=light] #quote-dialog>p{color:#4b606c}[data-theme=light] .mock-badge{color:#155a80}[data-theme=light] #quote,[data-theme=light] #send{color:white;background:linear-gradient(135deg,#1aa84d,#085c29)}[data-theme=light] #apply-custom,[data-theme=light] #apply-letter{background:#d2edf2;color:#123c4d}[data-theme=light] .danger,[data-theme=light] #delete{background:#ffe7e7;color:#8d1c22;border-color:#d58085}[data-theme=light] .zoom-rail button{color:white;background:transparent;box-shadow:none}[data-theme=light] .entry-error,[data-theme=light] #edit-error,[data-theme=light] #letter-error{color:#ad2430}
[data-theme=light] input:not([type=checkbox]):not([type=range]):not([type=color]){background:#fff;color:#143344;border-color:#9db3bf}.preview-badge{color:#fff}[data-theme=light] .tag{color:#4b606c}[data-theme=light] .rgb-readout{color:#465d6b}
.calibration-dialog{min-width:0}.calibration-dialog .entry-actions{flex-wrap:wrap}.calibration-space{overflow-x:auto;justify-content:safe center}.preview-head .view-modes button{flex:1}

/* Opt-in embed mode: keep the editor and its own scrolling/preview behavior. */
[data-embedded=true] body>header,[data-embedded=true] main>footer{display:none}
[data-embedded=true] main{max-width:none;padding-top:16px;padding-bottom:16px}

@media (max-width: 991px) {
  .workspace > .draft-actions { order: -1; width: 100%; margin-top: 0; justify-content: flex-start; }
  .preview-tools { order: -2; }
}

/* Keep 2D centered while allowing normal page scrolling over the canvas. */
#preview{touch-action:pan-y pinch-zoom;cursor:default}
#life-size::before{content:"";display:inline-block;width:15px;height:15px;border:2px solid currentColor;border-radius:4px;margin-right:8px;vertical-align:-2px;line-height:15px;text-align:center}
#life-size[aria-pressed=true]{background:#147b43;border-color:#30d158;color:#fff;box-shadow:0 0 0 2px #30d15833}
#life-size[aria-pressed=true]::before{content:"✓";background:#fff;color:#147b43;border-color:#fff;font-size:13px;font-weight:800}
@media(max-width:991px){
 #fit,#preview-fullscreen{display:none}
 .preview-head #life-size{font-size:16px;min-height:46px}
 #quote{font-size:20px;font-weight:700;line-height:1.3;min-height:52px}
}

.mobile-draft-section{display:none}
.app-downloads{margin-top:24px;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--card)}
.app-downloads h2{margin:0 0 14px}.store-badges{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.store-badges a{display:inline-flex}.store-badges img{height:44px;width:auto;display:block}.store-badges .google-play-badge{height:64px}.store-credit{font-size:10px;color:var(--muted);margin-top:14px}
@media(max-width:991px){
 .intro .eyebrow,.preview-tools{display:none}
 .preview-head{display:grid;grid-template-columns:1fr 1.1fr 1fr;gap:6px;border-radius:12px;padding:10px;width:100%}
 .preview-head #life-size,.preview-head #calibrate-screen{font-size:13px;min-width:0;padding:8px 4px;min-height:46px}
 .preview-head .view-modes{min-width:0!important;width:100%;margin:0}
 .preview-head .view-modes button{font-size:13px;padding:6px;min-width:0}
 #life-size::before{margin-right:4px;width:13px;height:13px}
 .mobile-draft-section{display:block;order:3;width:100%;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px}
 .mobile-draft-section>div>p{display:none}
 .mobile-draft-section .draft-actions{margin-top:14px;justify-content:flex-start;gap:8px}
 .prototype-note{order:4}#status{order:5}
}

@media(max-width:991px){
 .prototype-note{display:none}
 .workspace>.app-downloads{order:4;width:100%;margin-top:0}
 #quote-form{padding-bottom:50px}
}

/* Contain boundary gestures in embedded Studio, including its scrollable dialogs.
   Set this on the framed document itself, not on the parent iframe element. */
html[data-embedded=true],
html[data-embedded=true] body,
html[data-embedded=true] dialog {
  overscroll-behavior-y: contain;
}

/* Keep the custom-arrangement action above mobile browser chrome. */
@media(max-width:991px){
 #editor{padding-bottom:calc(64px + env(safe-area-inset-bottom, 0px))}
 #apply-custom{bottom:calc(50px + env(safe-area-inset-bottom, 0px))}
}

/* Dedicated vector outline editor; geometry uses a normalized 20-division canvas. */
#point-editor{display:none}
.outline-dialog{width:min(620px,calc(100vw - 24px));max-height:94dvh;box-sizing:border-box;padding:20px 20px calc(64px + env(safe-area-inset-bottom,0px));overflow-y:auto;overscroll-behavior-y:contain}
.outline-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-20px;background:var(--panel,#101e2b);z-index:2;padding:12px 0}
.outline-heading h2{margin:0}.outline-canvas{display:block;width:100%;aspect-ratio:1;background:#09151d;border:1px solid #344854;border-radius:16px;touch-action:none;user-select:none;margin:12px 0}
.outline-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}.outline-tools button{min-height:44px}.outline-tools [aria-pressed=true]{background:#126780;color:white;border-color:#32d7f5}
.outline-tools [data-count]{margin-left:auto;font-variant-numeric:tabular-nums}.outline-radius{border:1px solid #66889955;border-radius:14px;padding:14px}.outline-radius h3{margin-top:0}.outline-radius label{display:block;margin:12px 0}.outline-radius input[type=range]{width:100%}.outline-radius input[type=checkbox],.outline-tools input[type=checkbox]{width:auto}
.outline-accept{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.outline-accept button{min-height:48px}.outline-dialog [data-status]{min-height:2.5em}.outline-dialog button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:991px){.outline-dialog{padding-bottom:calc(80px + env(safe-area-inset-bottom,0px))}.outline-accept{flex-direction:column}}

.outline-dialog{width:min(1040px,calc(100vw - 24px))}.outline-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}.outline-drawing{position:sticky;top:66px}.outline-heading{background:var(--card,#101e2b)}.outline-dialog .outline-tools [aria-pressed=true]{background:#126780;color:#fff}.outline-dialog .outline-accept button,.outline-dialog [data-action=apply-radius]{background:#087f83;color:white;border-color:#16b7b7}
[data-theme=light] .outline-heading{background:#f7fbfd}
@media(max-width:991px){.outline-layout{display:block}.outline-drawing{top:64px;z-index:1;background:var(--card,#101e2b);padding:4px 0}.outline-canvas{width:min(100%,38dvh);margin:0 auto 12px}.outline-heading{z-index:2}[data-theme=light] .outline-drawing{background:#f7fbfd}}

@media(max-width:991px){.outline-drawing{top:46px}}
