@font-face { font-family: Jeju; src: url('/assets/message/fonts/JejuMyeongjo.woff2'); font-display: swap; }
@font-face { font-family: Gowun; src: url('/assets/message/fonts/GowunDodum.woff2'); font-display: swap; }
@font-face { font-family: Mapo; src: url('/assets/message/fonts/MapoFlowerIsland.woff2'); font-display: swap; }
@font-face { font-family: Sincere; src: url('/assets/message/fonts/NanumSeongSirCe.ttf'); font-display: swap; }
#composer { margin: 0 auto; inset: 24px 0 auto; width: min(430px, calc(100% - 32px)); height: min(810px, calc(100dvh - 48px)); max-width: none; max-height: none; padding: 0; border: 0; color: var(--ink); background: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .16); font: 400 16px/normal -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif; text-align: start; }
#composer::backdrop { background: rgba(0, 0, 0, .35); }
body:has(#composer[open]) { overflow: hidden; }
@scope (#composer) {
  :scope { --ink:#202020; --muted:#575757; --line:#e5e5e5; --accent:#b92f2b; --focus:#888; --paper:#f8f8f8; --choice-base:#f2f2f2; --choice-hover:#f7e6e8; --footer-gap:16px; scrollbar-width:none; }
  * { scrollbar-width:none; }
  *::-webkit-scrollbar { display:none; }
  [hidden] { display:none !important; }
  img { display:block; max-width:100%; }
  /* Keep the storefront's default form and text styling out of the composer. */
  button, input, textarea { font:inherit; color:inherit; }
  button { width:auto; min-height:auto; border-radius:0; }
  button:not(:disabled) { cursor:pointer; }
  button:disabled { cursor:default; }
  input { width:auto; height:auto; padding:revert; background:revert; border:revert; border-radius:revert; }
  label { display:revert; margin:0; font:inherit; }
  p { margin:revert; color:inherit; font:inherit; }
  a { color:inherit; text-underline-offset:auto; }
  :focus-visible { outline:1px solid var(--focus); outline-offset:2px; }
  label:has(:is(input[type="radio"], input[type="checkbox"]):focus-visible) { outline:1px solid var(--focus); outline-offset:2px; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  .primary { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: 0 24px; font-size: 15px; }
  .primary:hover:not(:disabled) { background: #3d3b36; }
  .primary:disabled { background: #e7e4de; color: #696660; border-color: transparent; }
  .wizard { width: 100%; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
  .wizard-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; padding: env(safe-area-inset-top) 8px 0; }
  .icon-button { grid-column: 3; grid-row: 1; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; }
  .icon-button:hover { background: #f4f4f4; }
  .meter { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 4px; max-width: 100px; width: 100%; margin: auto; }
  .meter i { height: 2px; flex: 1; background: #ededed; }
  .meter i.done { background: #bdbdbd; }
  .meter i.current { background: var(--ink); }
  .step { overflow-y: auto; overscroll-behavior: contain; }
  .panel { max-width: 430px; padding: 48px 20px 24px; margin: 0 auto; text-align: center; }
  .panel h2 { margin: 0; padding: 0 10px 18px; font: 400 18px/1.65 Jeju, serif; word-break: keep-all; }
  .panel h2:focus { outline: none; }
  .panel--aligned { display: flex; flex-direction: column; min-height: 100%; padding-bottom: var(--footer-gap); }
  .panel--aligned > h2, .panel--aligned > .segments, .panel--aligned > .letter-state { flex-shrink: 0; }
  .quiet { color: var(--muted); font-size: 13px; line-height: 1.75; }
  .letter-state { min-height: 34px; margin: -8px 0 4px; }
  .paper-field { display: flex; flex: 1 0 150px; }
  .paper-field textarea { display: block; width: 100%; min-width: 0; min-height: 0; padding: 11px 12px; resize: none; border: 0; border-bottom: 1px solid #565656; border-radius: 0; background: #fafafa; color: #292929; font: 400 16px/26px Jeju, serif; text-align: center; }
  .paper-field textarea::placeholder { color: #747474; }
  .panel:has(input[name='format'][value='card']:checked) .paper-field textarea { text-align: left; }
  .counter { display: block; margin: 4px 0; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
  .segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: min(100%, 228px); margin: 14px auto 0; border: 1px solid var(--line); }
  .segments label, .segments button { display: grid; place-items: center; min-height: 42px; padding: 0 8px; border: 0; background: #fff; color: var(--muted); font-size: 14px; cursor: pointer; }
  .segments > * + * { border-left: 1px solid var(--line); }
  .segments label:has(:checked), .segments button[aria-pressed='true'] { background: #eee; color: var(--ink); font-weight: 700; }
  .format-switch { width: min(100%, 300px); margin: 0 auto 15px; }
  .preview-switch { margin: 0 auto 14px; }
  .wizard-foot { display: flex; padding-bottom: env(safe-area-inset-bottom); background: #fff; }
  .wizard-foot button { flex: 1 1 0; min-width: 0; min-height: 60px; padding: 8px 12px; border: 0; border-radius: 0; font-size: 14px; font-weight: 700; line-height: 1.45; word-break: keep-all; }
  .wizard-foot button:focus-visible { outline-offset: -4px; }
  .wizard-foot .secondary { background: #dedede; color: var(--ink); }
  .wizard-foot .secondary:hover { background: #d2d2d2; }
  .wizard-foot .primary { background: #1e1e1e; }
  .wizard-foot .primary:disabled { background: #c8c8c8; color: #3d3d3d; }
  .choices, .fonts, .fields { display: grid; gap: 9px; }
  .choices, .fonts { width: min(100%, 320px); margin: 10px auto 18px; gap: 10px; }
  .font + .font::before { content: ''; position: absolute; top: -5px; left: 50%; width: 100px; height: 1px; transform: translateX(-50%); background: rgba(185, 47, 43, .16); }
  .font { position: relative; display: grid; place-items: center; height: 70px; border-radius: 8px; cursor: pointer; }
  .font img { display: block; width: 100%; height: 70px; object-fit: contain; }
  .font:has(:checked) { background: rgba(185, 47, 43, .09); }
  .font:hover:not(:has(:checked)) { background: #f5f5f5; }
  .choice { width: 100%; padding: 8px; border: 0; font: 18px/1.5 Jeju, serif; word-break: keep-all; }
  .choice:disabled { background: #f2f2f2; color: #777; }
  .choice, .text-button { background: var(--choice-base); }
  .choice:hover:not(:has(:checked)), .text-button:hover { background: var(--choice-hover); }
  .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { position: relative; min-width: 0; border: 1px solid var(--line); padding: 5px 5px 7px; background: #fff; cursor: pointer; }
  .card:has(:checked) { border-color: #303030; box-shadow: inset 0 0 0 1px #303030; }
  .card img { width: 100%; aspect-ratio: 1080 / 1500; object-fit: cover; background: var(--paper); }
  .cards.compact img { aspect-ratio: 5 / 4; }
  .card strong, .card small { display: block; margin: 6px 3px 0; text-align: center; font-size: 13px; font-weight: 400; }
  .card small { margin-top: 2px; color: var(--muted); font-size: 11px; }
  .media-slot { flex: 1 0 255px; display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; container-type: size; }
  .gallery-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, calc((100cqh - 70px) * .72)); gap: 14px; padding: 3px 3px 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 3px; overscroll-behavior-inline: contain; }
  .gallery-slide { position: relative; display: block; min-width: 0; scroll-snap-align: start; cursor: pointer; }
  .gallery-slide:has(input:focus-visible) { outline-offset: -2px; }
  .gallery-slide img { width: 100%; aspect-ratio: 18 / 25; object-fit: cover; background: var(--paper); }
  .gallery-caption { display: flex; flex-direction: column; height: 66px; padding-bottom: 7px; }
  .gallery-caption strong { font: 16px/1.35 Jeju, serif; }
  .gallery-slide:has(:checked) strong { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
  .gallery-caption small { color: var(--muted); font-size: 12px; line-height: 1.5; }
  .upload-preview { margin: 0 auto 14px; width: 144px; aspect-ratio: 1080 / 1500; object-fit: cover; background: var(--paper); }
  .text-button { display: block; min-height: 42px; margin: 8px auto 0; padding: 6px 12px; border: 0; color: var(--muted); font-size: 13px; }
  .fields label { display: grid; gap: 5px; text-align: left; font-size: 14px; }
  .fields input { width: 100%; min-height: 45px; border: 0; border-bottom: 1px solid #888; border-radius: 0; padding: 8px 11px; background: #fafafa; font-size: 16px; }
  .phone-field { min-width: 0; margin: 0; padding: 0; border: 0; text-align: left; }
  .phone-field legend { margin: 0 0 5px; padding: 0; font-size: 14px; }
  .phone-digits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 5px repeat(4, minmax(0, 1fr)) 5px repeat(4, minmax(0, 1fr)); align-items: center; gap: 4px; }
  .phone-field .phone-digit { width: 100%; min-width: 0; min-height: 44px; padding: 0; border: 1px solid transparent; border-radius: 3px; background: #fafafa; font-size: 16px; font-variant-numeric: tabular-nums; text-align: center; }
  .phone-divider { width: 100%; height: 1px; background: var(--muted); }
  .address-lookup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
  .address-lookup-row .address-lookup-button { min-height: 45px; margin: 0; padding-inline: 14px; }
  .panel--postcode { padding-inline: 10px; padding-top: 20px; }
  .postcode-host { width: 100%; height: clamp(300px, calc(100dvh - 196px), 560px); text-align: left; }
  .postcode-host iframe { display: block; width: 100%; border: 0; }
  #front-note { text-align: center; }
  #front-note::placeholder { font-size: 13px; }
  .sender-help { margin: 8px 0 0; text-align: left; }
  .sender-help span { display: block; }
  .preview { position: relative; display: grid; width: min(100%, 300px); aspect-ratio: 18 / 25; overflow: hidden; margin: 0 auto 14px; border: 1px solid var(--line); background: #fff; box-shadow: 0 0 10px 2px rgba(0, 0, 0, .05); }
  .preview img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
  .overlay-note { position: absolute; top: 70%; left: 8%; right: 8%; text-align: center; color: #333; font-size: 16px; overflow-wrap: anywhere; text-shadow: 0 0 4px #fff, 0 0 8px #fff; }
  .preview.back { background: #fff url('/assets/message/post-layout.jpg') center / cover no-repeat; }
  .preview.back p { position: absolute; inset: 9% 8% auto; max-height: 37%; margin: 0; color: #333; white-space: pre-wrap; overflow-wrap: anywhere; word-break: keep-all; line-height: 1.55; font-size: 14px; overflow-y: auto; }
  .preview.back.is-card { aspect-ratio: 1540 / 2150; background: #fff; }
  .preview.back.is-card::before { content: ''; position: absolute; top: 3.7%; right: 6.5%; width: 17.2%; aspect-ratio: 729 / 362; background: url('/assets/message/card-stamp.jpg') center / contain no-repeat; }
  .preview.back.is-card::after { content: 'MADE AND SENT BY 올그림'; position: absolute; inset: auto 6.5% 3.8%; padding-top: 5px; border-top: 1px solid #dedede; color: #484848; font: 8px Gowun, sans-serif; }
  .preview.back.is-card p { inset: 13% 6.5% 15%; max-height: none; text-align: left; }
  .preview-slot { flex-basis: 190px; }
  .preview-slot .preview { width: min(100%, 350px, 72cqh); margin: 0 auto; }
  .preview-slot .preview.is-card { width: min(100%, 350px, calc(100cqh * 1540 / 2150)); }
  .status { margin: 6px 0 12px; padding: 13px 10px; border-block: 1px solid var(--line); text-align: center; font-size: 14px; }
  .receipt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 13px 12px; margin: 12px 0 19px; padding: 13px 0; border-block: 1px solid var(--line); font-size: 15px; }
  .receipt dt, .receipt dd { margin: 0; }
  .receipt dt { text-align: left; }
  .receipt dd { text-align: right; }
  .error { min-height: 0; margin: 4px 0 0; font-size: 12px; line-height: normal; color: #9a2d29; }
  .compose-consents { display: grid; gap: 8px; margin: 10px 0 16px; }
  .consent { display: block; margin: 8px 0; text-align: left; font-size: 13px; line-height: 1.6; }
  .compose-consents .consent { margin: 0; }
  .consent input { margin-inline: 0 4px; accent-color: var(--ink); }
  .consent a { color: var(--muted); text-underline-offset: 2px; }
  #share-status { overflow-wrap: anywhere; }
  #compose-payment-method, #compose-payment-agreement { width: 100%; min-width: 0; }
  .compose-loader { width: 32px; aspect-ratio: 1; margin: 16px auto; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: compose-spin 1s linear infinite; }
  @media (prefers-reduced-motion: reduce) { .compose-loader { animation: none; } }
  .wheel-scrolling { scroll-snap-type: none; }
  @media (max-height:690px) { .panel { padding-top:32px; } }
  @media (max-height:500px) { .panel--aligned { padding-top:20px; } }
}
@keyframes compose-spin { to { transform: rotate(360deg); } }
@media (max-width:599px) { #composer { inset:0; width:min(100%,430px); height:100dvh; box-shadow:none; } }
