:root {
  color-scheme: light;
  --ink: #172f43;
  --muted: #486274;
  --cyan: #32aedb;
  --pink: #ef009e;
  --rule: #aac2cd;
  --gutter: 24px;
  --sheets: 3px 3px #e5f2f7, 5px 5px #269ac4, 8px 8px white, 10px 10px #e943a7, 0 13px 35px #10253435;
  font: 14px/1.45 Verdana, Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body, h1, p, fieldset { margin: 0; }
body { background: white; }
html { scroll-padding-block: 90px 82px; }
.standalone { min-height: 100vh; padding: clamp(12px, 4vw, 44px); background: #edf3f5; }
.sheet { max-width: 490px; margin-inline: auto; background: white; overflow-wrap: anywhere; }
.standalone .sheet { border: 1px solid #aec5cf; box-shadow: var(--sheets); }
.sheet-heading { position: relative; padding: 18px var(--gutter) 16px; background: white; }
.embedded .sheet-heading { position: sticky; top: 0; z-index: 2; }
.sheet-heading::after {
  content: ""; position: absolute; bottom: 4px; left: var(--gutter); right: var(--gutter);
  height: 2px; background: var(--cyan); transform-origin: left;
}
.wordmark { display: flex; align-items: center; gap: 6px; width: fit-content; color: #275872; font-size: 12px; font-weight: bold; }
.wordmark img { display: block; }
h1 { margin: 7px 35px 0 0; font-size: 29px; line-height: 1.13; letter-spacing: -.04em; }
.register-mark {
  position: absolute; top: 12px; right: 58px; width: 57px; height: 36px; pointer-events: none;
  background: linear-gradient(var(--ink),var(--ink)) left top/10px 1px no-repeat,
              linear-gradient(var(--ink),var(--ink)) left top/1px 10px no-repeat,
              linear-gradient(var(--ink),var(--ink)) right bottom/10px 1px no-repeat,
              linear-gradient(var(--ink),var(--ink)) right bottom/1px 10px no-repeat;
}
.standalone .register-mark { right: var(--gutter); }
.register-mark::before { content: ""; position: absolute; inset: 7px 9px; border: 1px solid var(--cyan); box-shadow: 2px 2px var(--pink); }
.register-mark::after {
  content: ""; position: absolute; right: 15px; top: 11px; width: 14px; height: 14px; border: 1px solid var(--ink); border-radius: 50%;
  background: linear-gradient(var(--ink),var(--ink)) center/1px 100% no-repeat, linear-gradient(var(--ink),var(--ink)) center/100% 1px no-repeat;
}
.sheet-body { padding: 5px var(--gutter) 13px; }
form, fieldset { min-width: 0; }
fieldset { padding: 0; border: 0; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.field > label, .attachment > label { font-size: 13px; font-weight: bold; }
.field :is(input, select, textarea) {
  width: 100%; min-width: 0; border: 1px solid #9aafbc; border-radius: 1px;
  padding: 7px 9px; background: white; color: var(--ink); font: inherit;
}
.field :is(input, select) { height: 40px; margin-top: auto; }
textarea { display: block; min-height: 55px; resize: vertical; }
::placeholder { color: #607482; opacity: 1; }
.phone-entry { position: relative; margin-top: auto; }
.field #vv-phone {
  border-color: #d1c9c1; border-radius: 10px; padding-inline: 12px;
  background: #fff; font-size: 16px; font-variant-numeric: tabular-nums;
}
.field #vv-phone::placeholder, .phone-guide { color: #717471; }
.phone-guide {
  position: absolute; left: 13px; right: 13px; top: 50%; transform: translateY(-50%);
  overflow: hidden; white-space: pre; pointer-events: none; user-select: none;
  font: inherit; font-size: 16px; font-variant-numeric: tabular-nums;
}
.phone-entry:not(:focus-within) .phone-guide, .phone-guide[hidden], .messenger-profile[hidden] { display: none; }
.phone-guide > :first-child { visibility: hidden; }
.messenger-profile { grid-column: 1 / -1; }
.attachment { margin: 9px 0 12px; padding: 7px 10px; border: 1px solid #a6c6d3; border-left: 4px solid var(--cyan); background: #f2f9fb; }
.attachment label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.attachment label span { font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
input[type=file] { width: 100%; min-width: 0; margin: 4px 0 2px; color: var(--ink); font: 13px/1.4 Verdana,Arial,sans-serif; }
input::file-selector-button { margin-right: 8px; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 1px; color: #20475a; background: white; cursor: pointer; font: inherit; }
.hint, .permissions p { font-size: 12px; line-height: 1.45; }
.hint, .sheet-actions span { color: var(--muted); }
.reply legend { margin: 0 0 7px; padding: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 12px; }
.permissions { display: grid; gap: 6px; margin-top: 13px; padding-top: 9px; border-top: 1px dashed #acc1cb; }
.check { display: grid; grid-template-columns: 17px minmax(0,1fr); gap: 7px; align-items: start; font-size: 12px; line-height: 1.5; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: #a90066; }
a { color: #115674; text-decoration: underline; text-underline-offset: 2px; }
.sheet-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px var(--gutter); border-top: 1px solid #c4dbe5; background: white;
}
.sheet-actions span { font-size: 11px; line-height: 1.45; }
.embedded .sheet-actions { position: sticky; bottom: 0; z-index: 1; }
.submit {
  min-height: 44px; padding: 8px 14px; border: 0; border-radius: 1px; background: var(--pink); color: white;
  font: 700 19px/1.22 Verdana,Arial,sans-serif; cursor: pointer;
}
.submit:disabled { opacity: .75; cursor: wait; }
@media (hover:hover) { .submit:enabled:hover { background: #d7008e; transform: translate(-1px,-1px); box-shadow: 2px 2px #17384a; } }
.submit:enabled:active { transform: translate(1px,1px); box-shadow: none; }
:focus-visible { outline: 2px solid #176a88; outline-offset: 2px; }
.alert { margin-top: 10px; padding: 9px 12px; border-left: 3px solid #b4334e; color: #622232; background: #fff3f4; }
.receipt { padding: 10px var(--gutter) 22px; }
.receipt a { display: inline-block; margin-top: 10px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (prefers-reduced-motion:no-preference) {
  .sheet-heading::after { animation: vv-print-rule .42s .06s ease-out both; }
  .standalone .sheet { animation: vv-sheet-in .32s cubic-bezier(.19,.75,.25,1) both; }
  .field :is(input,textarea,select), .submit { transition: border-color .15s, box-shadow .15s, transform .12s; }
}
@keyframes vv-print-rule { from { transform: scaleX(.04); } to { transform: scaleX(1); } }
@keyframes vv-sheet-in { from { opacity: .4; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 445px) {
  :root { --gutter: 15px; }
  .standalone { padding: 8px 17px 18px 7px; }
  .fields { grid-template-columns: 1fr; }
  .sheet-heading { padding-top: 13px; }
  h1 { font-size: 24px; }
  .register-mark { transform: scale(.72); transform-origin: top right; right: 50px; }
  .field :is(input,select,textarea) { font-size: 16px; }
  .field :is(input,select) { min-height: 44px; }
  .submit { font-size: 18px; }
  .sheet-actions { flex-wrap: wrap; padding-bottom: max(10px,env(safe-area-inset-bottom)); }
}
@media (max-width: 290px) { .register-mark { display: none; } .sheet-actions button { width: 100%; } }
@media (max-height: 360px) { .embedded .sheet-actions { position: static; } }

@media (min-width: 291px) and (max-width: 385px) {
  .sheet-heading .register-mark { top: 42px; right: var(--gutter); transform: scale(.55); }
}
@media (max-width: 290px) {
  .embedded .wordmark { max-width: calc(100% - 32px); }
  .wordmark img { flex: none; }
}
