@font-face{font-family:'Gaegu';src:url(../assets/gaegu-full-400.woff2) format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Gaegu';src:url(../assets/gaegu-full-700.woff2) format('woff2');font-weight:700;font-style:normal;font-display:swap}

body.mk { margin: 0; color: #3b2a3f; font: 16px/1.4 ui-sans-serif, system-ui, -apple-system, sans-serif; word-break: keep-all;
  background-color: #fff6f9; background-image: linear-gradient(rgba(255,110,170,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(255,110,170,.10) 1px, transparent 1px); background-size: 18px 18px; }

body.mk > :not(.mk-sheet):not(.se) { max-width: var(--phone); margin-left: auto; margin-right: auto; }
.mk-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(255,246,249,.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid #f6d3e4; }
.mk-home { color: #9a6b85; text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
.mk-tabs { display: flex; gap: 2px; margin-left: auto; background: #fff; border-radius: 999px; padding: 3px; box-shadow: inset 0 0 0 1.5px #f6d3e4; }
.mk-tabs button { all: unset; padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; color: #9a6b85; cursor: pointer; }
.mk-tabs button.on { background: #ff4fa3; color: #fff; }
.mk-note { margin-top: 10px; padding: 0 14px; font: 11px/1.3 'Galmuri11', ui-monospace, monospace; color: #c08aa5; text-align: center; }
#edit { padding: 12px 14px 140px; display: flex; flex-direction: column; gap: 14px; }
.mk-card { background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 6px 16px rgba(150,60,110,.10); display: flex; flex-direction: column; gap: 10px; }
.mk-card label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #9a6b85; }
.mk-card label small { font-weight: 400; color: #c08aa5; }
.mk-card input, .mk-card textarea { font: 18px/1.35 'Gaegu', ui-rounded, system-ui, sans-serif; color: #3b2a3f; background: #fffafd; border: 1.5px solid #f2b8d3; border-radius: 10px; padding: 8px 10px; width: 100%; box-sizing: border-box; }
.mk-card textarea { resize: vertical; min-height: 84px; }
.mk-row { display: flex; gap: 12px; align-items: flex-start; }
.mk-thumb { all: unset; flex: none; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; font-weight: 700; color: #ff4fa3; text-align: center; }
.mk-thumb img, .mk-thumb .mk-art { width: 96px; height: 96px; border-radius: 16px; display: grid; place-items: center; object-fit: contain;
  box-shadow: 0 0 0 3px #fff, 0 4px 12px rgba(150,60,110,.2); background-size: 22px 22px; }
.mk-thumb img { background-color: #fff; }
.mk-art svg { width: 62px; height: 62px; }
.mk-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mk-tones { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-tone { all: unset; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1.5px #f2b8d3; cursor: pointer; }
.mk-tone.on { box-shadow: inset 0 0 0 2px #fff, 0 0 0 3px #ff4fa3; }
.mk-ctl { justify-content: flex-end; }
.mk-ctl button { all: unset; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #9a6b85; box-shadow: inset 0 0 0 1.5px #f2d1e1; cursor: pointer; }
.mk-ctl button:disabled { opacity: .35; cursor: default; }
.mk-add { all: unset; text-align: center; padding: 16px; border-radius: 16px; border: 2px dashed #f2b8d3; font: 700 20px/1 'Gaegu', ui-rounded, sans-serif; color: #ff4fa3; cursor: pointer; }
.mk-add:disabled { opacity: .4; }
.mk-reset { all: unset; text-align: center; font-size: 13px; color: #c08aa5; text-decoration: underline; cursor: pointer; padding: 6px; }
.mk-fb { align-self: center; padding: 6px; font-size: 13px; color: #7b5cff; text-decoration: underline; text-underline-offset: 3px; }
.mk-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 14px 14px calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(255,246,249,0), #fff6f9 34%); }
.mk-publish { all: unset; box-sizing: border-box; display: block; width: 100%; text-align: center; padding: 14px; border-radius: 999px; background: #ff4fa3; color: #fff; font-weight: 800; font-size: 16px; box-shadow: 0 4px 0 #c42f7f; cursor: pointer; }
.mk-saved { margin: 6px 0 0; font: 11px/1 'Galmuri11', ui-monospace, monospace; color: #c08aa5; text-align: center; }
#stage { padding-bottom: 280px; } 
.mk-canvas .app-in { padding-bottom: 40px; }
.mk-decobar { position: fixed; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom)); translate: -50% 0; z-index: 16; display: flex; gap: 4px; padding: 5px; background: #fff; border-radius: 999px; box-shadow: 0 6px 18px rgba(150,60,110,.22); }
.mk-decobar button { all: unset; padding: 9px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; color: #7d5a70; cursor: pointer; white-space: nowrap; }
.mk-decobar button:disabled { opacity: .35; }
.app.deco-edit .stk { pointer-events: none; }
.app.deco-edit .deco { pointer-events: auto; touch-action: none; cursor: grab; }
.app.deco-edit .deco.sel { outline: 2px dashed #7b5cff; outline-offset: 6px; border-radius: 6px; }

.deco-h { position: absolute; right: -19px; bottom: -19px; width: 26px; height: 26px; border-radius: 50%; background: #7b5cff; box-shadow: 0 0 0 2.5px #fff, 0 2px 6px rgba(59,42,63,.3);
  display: grid; place-items: center; cursor: nwse-resize; touch-action: none; }
.deco-h svg { pointer-events: none; }
.app.deco-edit.has-sel { touch-action: none; }
.mk-sheet { position: fixed; inset: 0; z-index: 40; background: rgba(59,42,63,.35); display: flex; align-items: flex-end; }
.mk-sheet-in { width: 100%; max-width: var(--phone); margin: 0 auto; box-sizing: border-box; background: #fff; border-radius: 20px 20px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
.mk-sheet-t { margin: 0 0 10px; font: 700 22px/1.1 'Gaegu', ui-rounded, sans-serif; color: #ff4fa3; }
.mk-sheet-p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; }
.mk-sheet-close { margin-top: 6px; }
.mk-sheet-in { max-height: 88vh; max-height: 88svh; overflow-y: auto; }

.ac-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.ac-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #9a6b85; }
.ac-field small { font-weight: 400; color: #c08aa5; }
.ac .se-input { font: 16px/1.3 ui-sans-serif, system-ui, sans-serif; width: 100%; box-sizing: border-box; }
.ac-row { display: flex; gap: 8px; align-items: center; }
.ac-row .se-input { flex: 1; }
.ac-row .ac-m { flex: 0 0 76px; }
.ac-chk { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.ac-chk input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #ff4fa3; flex: none; }
.ac-terms { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 0 26px; font-size: 13px; color: #7d5a70; }
.ac-terms dt { font-weight: 700; }
.ac-terms dd { margin: 0; }
.ac-small { margin: 0 0 8px; font-size: 12px; line-height: 1.5; color: #9a6b85; }
.ac-small a { color: #7b5cff; text-underline-offset: 3px; }
.ac-msg { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: #ffe1e1; color: #c2261d; font-size: 13px; font-weight: 700; }
.ac-msg.ok { background: #e6f8ef; color: #1d7a4f; }
.ac-dev { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: #fff3c4; font-size: 13px; }
.ac-code { letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.ac-link { margin-bottom: 12px; }
.ac-label { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: #9a6b85; }
.ac-link .ac-row { margin-top: 8px; }
.ac-link a.pill { text-decoration: none; }
.ac .mk-publish { margin-bottom: 10px; }
.ac .mk-publish:disabled { opacity: .6; }
.ac-resend { margin-bottom: 10px; }
.ac-resend:disabled { opacity: .5; }
.ac-text { all: unset; display: block; margin: 0 0 10px; font-size: 13px; color: #7b5cff; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ac-end { justify-content: space-between; }
.ac-end .ac-text { color: #9a6b85; }

html.se-open, html.se-open body { overflow: hidden; }
.se { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: #fff6f9; max-width: var(--phone); margin: 0 auto; box-shadow: 0 0 0 100vmax rgba(59,42,63,.35); }
.se-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; padding-top: calc(8px + env(safe-area-inset-top)); }
.se-top b { font: 700 20px/1 'Gaegu', ui-rounded, sans-serif; color: #ff4fa3; }
.se-top button { all: unset; padding: 8px 14px; font-weight: 700; font-size: 15px; color: #9a6b85; cursor: pointer; border-radius: 999px; }
.se-top .se-done { background: #ff4fa3; color: #fff; }
.se-top .se-done:disabled { opacity: .5; }
.se-wrap { flex: none; display: flex; flex-direction: column; align-items: center; padding: 2px 12px 0; }
.se canvas { width: min(100%, 46vh, 420px); height: auto; aspect-ratio: 1; touch-action: none; border-radius: 14px;
  background: repeating-conic-gradient(#fbe3ee 0 25%, #fff 0 50%) 0 0 / 20px 20px; }
.se-hint { margin: 6px 0 0; font-size: 12px; color: #c08aa5; }
.se-msg { margin: 6px 12px 0; padding: 8px 10px; border-radius: 10px; background: #ffe1e1; color: #c2261d; font-size: 13px; font-weight: 700; text-align: center; }
.se-panel { flex: 1; overflow-y: auto; padding: 10px 12px 4px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.pill { all: unset; padding: 8px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px #f2b8d3; font-weight: 700; font-size: 14px; color: #7d5a70; cursor: pointer; }
.pill.on { background: #ff4fa3; color: #fff; box-shadow: none; }
.sw { all: unset; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1.5px #e5c7d8; cursor: pointer; }
.sw.on { box-shadow: inset 0 0 0 2px #fff, 0 0 0 3px #7b5cff; }
.st, .ic { all: unset; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1.5px #f2b8d3; cursor: pointer; }
.ic { background: #ffb8d6; }
.ic.on { box-shadow: 0 0 0 3px #7b5cff; }
.chip { all: unset; padding: 7px 11px; border-radius: 999px; background: #ffe1ee; font: 700 17px/1 'Gaegu', ui-rounded, sans-serif; color: #ff4fa3; cursor: pointer; }
.se-input { flex: 1; min-width: 0; font: 18px/1.2 'Gaegu', ui-rounded, sans-serif; padding: 8px 10px; border: 1.5px solid #f2b8d3; border-radius: 10px; color: #3b2a3f; }
.tip { margin: 0; font-size: 12px; color: #9a6b85; }
.se-tools { display: flex; gap: 2px; overflow-x: auto; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #f6d3e4; }
.se-tools button { all: unset; flex: none; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: 14px; color: #7d5a70; cursor: pointer; }
.se-tools button.on { background: #ffe1ee; color: #ff4fa3; }


body.mk [hidden] { display: none !important; }
