:root { font-family: 'PretendardVariable-v1', Pretendard, 'Malgun Gothic', sans-serif; color: #1b1c1b; background: #fff; word-break: keep-all; }
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
input, button, textarea, select { font: inherit; color: inherit; }
button, .button { min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d6d8d4; border-radius: 4px; background: white; font-weight: 600; cursor: pointer; }
button:hover, .button:hover { background: #eff0ed; }
button:disabled { opacity: .5; cursor: default; }
.primary { color: white; background: #1b1c1b; border-color: #1b1c1b; }
.primary:hover { background: #3b3d3a; }
:focus-visible { outline: 2px solid var(--brand-lemon-focus); outline-offset: 2px; }
[hidden] { display: none !important; }
body > header { min-height: 68px; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e7e8e5; }
.wordmark { display: inline-flex; align-items: center; flex: none; width: 98px; height: 24px; }
.wordmark .brand-logo { width: 84px; }
.header-right, .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tool-workspace { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.tools-nav { background: #f8f9f7; border-right: 1px solid #e6e8e3; padding: 20px 12px; }
.tools-nav a { display: block; margin: 2px 0; padding: 9px 12px; border-radius: 4px; }
.tools-nav a:hover, .tools-nav a[aria-current="page"] { background: #e8eae6; }
.tools-nav a[aria-current="page"] { font-weight: 700; }
.tool-heading { padding: 25px 24px; border-bottom: 1px solid #e6e8e3; }
.tool-heading h1 { font-size: 22px; }
.tool-heading p, .hint { margin-top: 5px; color: #60665f; }
.tool-columns { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, 1fr); min-height: calc(100vh - 172px); }
.tool-panel, .tool-preview { min-width: 0; padding: 22px 24px 36px; }
.tool-panel h2, .tool-preview h2 { font-size: 14px; margin-bottom: 18px; }
.tool-preview { background: #f2f3f1; border-left: 1px solid #e6e8e3; }
#tool-form, .tool-fields { display: grid; gap: 14px; }
.field { display: grid; min-width: 0; gap: 5px; }
.field > span { font-weight: 620; }
.field :is(input, textarea, select) { width: 100%; min-width: 0; min-height: 36px; border: 1px solid #d6d8d4; border-radius: 4px; padding: 6px 10px; background: #fff; }
.file-choice { position: relative; justify-self: start; }
.file-choice > input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-choice > span {
  display: inline-flex; min-height: 36px; align-items: center; padding: 0 12px;
  border: 1px solid #d6d8d4; border-radius: 4px; background: #fff; font-size: 13px;
}
.file-choice > input:hover + span { background: #eff0ed; }
.file-choice > input:focus-visible + span { outline: 2px solid var(--brand-lemon-focus); outline-offset: 2px; }
textarea { resize: vertical; }
.tool-fields { border: 1px solid #e1e4de; border-radius: 4px; padding: 12px; }
.rule-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rule-row > button { min-height: 28px; padding-inline: 9px; }
.preview-card { background: white; padding: 22px; border: 1px solid #dfe2dc; border-radius: 10px; overflow-wrap: anywhere; }
.preview-card h3 { font-size: 20px; margin-bottom: 10px; }
.preview-card p { white-space: pre-wrap; }
.preview-card .actions { margin-top: 18px; }
.chat-preview { background: #fbea40; margin-inline: auto; width: min(100%, 365px); padding: 20px; border-radius: 14px; display: grid; gap: 10px; }
.chat-preview .preview-card { border: 0; }
.feed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.feed-grid article { min-width: 0; }
.feed-grid img { width: 100%; aspect-ratio: 1; display: block; object-fit: cover; border-radius: 4px; }
.feed-grid span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.hero-photo, .signup-banner { width: 100%; max-height: 300px; display: block; object-fit: cover; border-radius: 5px; margin-bottom: 14px; }
.survey-form { display: grid; gap: 14px; }
.survey-form button { justify-self: start; }
.survey-choices { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; padding: 10px; min-width: 0; border: 1px solid #e1e4de; border-radius: 4px; }
.survey-choices legend { font-weight: 620; }
.survey-option { display: grid; align-content: start; gap: 5px; }
.survey-option img { width: min(120px, 100%); height: 80px; object-fit: contain; border-radius: 4px; }
.survey-image-fields { display: grid; gap: 8px; padding: 10px; background: #f6f7f4; }
.survey-image-fields img { max-width: 120px; max-height: 80px; object-fit: contain; }
.survey-image-fields > button { justify-self: start; }
.suggestion { display: grid; gap: 7px; padding: 10px 0; border-bottom: 1px solid #e2e5e0; }
.suggestion:first-of-type { padding-top: 0; }
.suggestion strong { color: var(--brand-lemon-ink); }
.suggestion p { margin-bottom: 4px; }
.suggestion button { justify-self: start; }
.signed-demo { margin-top: 12px; font-weight: 650; }
#tool-status { position: fixed; z-index: 4; inset: 14px auto auto 50%; margin: 0; transform: translateX(-50%); text-align: center; width: max-content; max-width: calc(100% - 24px); color: white; background: #222; border-radius: 40px; padding: 9px 14px; border: 1px solid #ffffff30; pointer-events: none; }
dialog { width: min(416px, calc(100% - 30px)); border: 0; border-radius: 4px; padding: 23px; }
dialog::backdrop { background: #0008; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dialog-heading h2 { font-size: 18px; }
.document-heading-start { display: flex; align-items: center; gap: 9px; }
.document-heading-start button { width: 32px; min-height: 32px; padding: 6px; }
.document-heading-start svg { width: 16px; height: 16px; }
dialog .actions { justify-content: flex-end; margin-top: 15px; }
.document-settings > summary { cursor: pointer; font-weight: 650; }
.document-settings > div { display: grid; gap: 10px; margin-top: 10px; }
.document-settings > div > button { justify-self: start; }
.schedule-range {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 10px 12px 12px;
  border: 1px solid #e1e4de;
  border-radius: 4px;
}
.schedule-range legend { padding-inline: 5px; font-weight: 620; }
.schedule-range button { grid-column: 1 / -1; justify-self: start; }
.field input[type="color"] { width: 56px; padding: 3px; }
#document-dialog { width: min(660px, calc(100% - 28px)); max-height: calc(100dvh - 28px); overflow: auto; }
#document-dialog[data-view="list"] { width: min(980px, calc(100% - 28px)); overflow-x: hidden; }
#document-dialog-body > .field { margin-top: 16px; }
.document-list-toolbar { display: flex; gap: 9px; flex-wrap: wrap; align-items: end; margin-bottom: 13px; }
.document-list-toolbar > .field:first-child { flex: 1 1 150px; }
.document-list-toolbar > .field:not(:first-child) { flex: 0 1 auto; }
.document-table-scroll { max-width: 100%; overflow: auto; }
.document-table { width: 100%; min-width: 490px; border-collapse: collapse; color: #1b1c1b; }
.document-table th, .document-table td { padding: 9px; border-bottom: 1px solid #e6e8e3; text-align: left; overflow-wrap: anywhere; }
.document-table th { background: #f5f6f3; white-space: nowrap; }
.document-table td:not(:first-child) { vertical-align: middle; }
.document-table small { display: inline-block; margin-left: 8px; color: #585f54; white-space: nowrap; }
.document-table .table-link { padding: 3px 0; border-color: transparent; text-align: left; }
.document-table :is(.status-control, .table-preview) { padding-inline: 8px; white-space: nowrap; }
.document-table .status-control[aria-pressed="true"] { border-color: var(--brand-sky-line); background: var(--brand-sky-soft); color: var(--brand-sky-ink); }
.document-table .table-preview { text-decoration: underline; text-underline-offset: 2px; }
.document-table :is(.document-dates time, td > small) { display: block; margin: 0; white-space: nowrap; }
.document-dates time + time { color: #585f54; }
.document-row-links { display: flex; gap: 4px; align-items: center; white-space: nowrap; }
[data-view="list"] .document-table { min-width: 690px; }
[data-view="list"] .document-table-scroll { contain: paint; }
[data-view="list"] .document-table td button { padding-inline: 9px; }
[data-view="list"] .document-table td .table-link { padding-inline: 0; }
.document-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.document-menu { position: fixed; inset: auto; margin: 0; min-width: 122px; max-width: calc(100vw - 16px); padding: 4px; border: 1px solid #d6d8d4; border-radius: 4px; box-shadow: 0 6px 18px #0002; }
.document-menu button { display: flex; width: 100%; min-height: 32px; justify-content: flex-start; border-color: transparent; }
.document-confirmation-name { font-weight: 650; overflow-wrap: anywhere; }
.document-settings-summary { display: grid; gap: 0; margin: 10px 0 14px; }
.document-settings-summary > div {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) minmax(0, 3fr);
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #e6e8e3;
}
.document-settings-summary dt { color: #585f54; }
.document-settings-summary dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.document-settings-summary dd > span { display: block; }
.share-card { display: flex; align-items: center; gap: 12px; padding: 12px; background: #f5f6f3; border-radius: 4px; overflow-wrap: anywhere; }
.share-thumbnail { width: min(100px, 30%); height: 65px; flex-shrink: 0; object-fit: cover; border-radius: 4px; }
.share-card p { max-height: 96px; overflow: auto; }
.share-qr { display: grid; place-items: center; margin-top: 15px; }
.share-qr canvas { width: 160px; height: 160px; image-rendering: pixelated; border: 1px solid #e6e8e3; }

#document-dialog.form-share-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 32px;
  border-radius: 4px;
}
.form-share-dialog .dialog-heading { height: 20px; margin-bottom: 32px; }
.form-share-dialog .dialog-heading h2 { font-size: 16px; font-weight: 600; line-height: 16px; }
.form-share-dialog .dialog-heading > button {
  width: 20px; height: 20px; min-height: 20px; padding: 0;
  border: 0; background: transparent; font-size: 20px; font-weight: 400;
}
.form-share-dialog .form-share-choices { display: grid; gap: 12px; }
.form-share-dialog .form-share-choices button { width: 100%; height: 44px; font-weight: 400; }
.form-share-link-dialog #document-back { display: none; }
.form-share-link-dialog .share-qr { margin: 0; }
.form-share-link-dialog .share-qr canvas { width: 139px; height: 139px; border: 0; }
.form-share-link-dialog #document-dialog-body > .actions { justify-content: center; margin: 16px 0 32px; }
.form-share-link-dialog :is(.actions .button, .actions button, .form-share-address-row button) {
  padding: 0 16px; height: 36px; min-height: 36px;
  border: 0; border-radius: 4px; background: #dcdcdc; font-weight: 400;
}
.form-share-link-dialog :is(.actions .button, .actions button, .form-share-address-row button):hover { background: #bec5bc; }
.form-share-address-row { display: flex; align-items: center; gap: 12px; }
.form-share-address-row input {
  flex: 1; min-width: 0; height: 36px; padding: 0 12px;
  border: 0; border-radius: 4px; background: #f4f4f5; text-overflow: ellipsis;
}
.form-share-address-row button { flex: none; }
.results-header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.results-header h3, .results-subheading { font-size: 15px; }
.results-subheading { margin: 18px 0 8px; }
.report-question { border-top: 1px solid #e6e8e3; padding: 10px 0; }
.report-question h3 { font-size: 14px; }
.report-question ul { padding-left: 18px; margin: 6px 0 0; overflow-wrap: anywhere; }
.report-choice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(56px, 2fr) 22px; align-items: center; gap: 8px; }
.report-choice meter { width: 100%; accent-color: var(--brand-lemon-ink); }
.document-viewer .tool-workspace, .document-viewer .tool-columns { display: block; }
.document-viewer .tool-preview { max-width: 740px; margin-inline: auto; border: 0; background: transparent; }
.document-viewer :is(.tools-nav, .tool-panel, #open-backup, .tool-preview > h2) { display: none; }
@media(max-width: 780px) {
  .tool-workspace { grid-template-columns: 1fr; }
  .tools-nav { display: flex; flex-wrap: wrap; padding: 7px 12px; border-right: 0; border-bottom: 1px solid #e6e8e3; }
  .tools-nav a { padding: 6px 8px; }
  .tool-columns { grid-template-columns: 1fr; }
  .tool-preview { border-left: 0; border-top: 1px solid #e6e8e3; }
}
@media(max-width: 420px) {
  body > header, .tool-heading, .tool-panel, .tool-preview { padding-inline: 14px; }
  .header-right { gap: 6px; justify-content: flex-end; }
  .header-right a:first-child { display: none; }
  .header-right :is(a,button) { padding-inline: 7px; font-size: 12px; }
  #document-dialog { padding: 15px; }
  #document-dialog .actions { justify-content: flex-start; }
  [data-view="list"] .document-table td button { min-height: 44px; }
}
@media print {
  body:has(#document-dialog[data-view="results"][open]) > :not(#document-dialog) { display: none; }
  #document-dialog[data-view="results"][open] { position: static; display: block; width: 100%; max-width: none; max-height: none; overflow: visible; padding: 0; }
  #document-dialog[data-view="results"]::backdrop { background: transparent; }
  #document-dialog[data-view="results"] :is(.dialog-heading button, .actions) { display: none; }
  .document-table-scroll { overflow: visible; }
  .document-table { min-width: 0; font-size: 8pt; }
  .report-question { break-inside: avoid; }
}
.event-layer-editor { min-width: 0; margin: 0; border: 1px solid #dfe2dc; border-radius: 4px; padding: 14px; }
.event-layer-editor legend { padding-inline: 6px; font-weight: 600; }
.event-layer-editor > * + * { margin-top: 12px; }
.event-layer-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.event-layer-add { align-items: end; }
.event-layer-add button { justify-self: start; }
.event-layer-list { display: grid; gap: 4px; padding: 0; list-style: none; }
.event-layer-list li { display: flex; gap: 6px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.event-layer-list li > button { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 0; text-align: left; }
.event-layer-list li > button span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-layer-list button[aria-pressed="true"] { background: var(--brand-sky-soft); border-color: var(--brand-sky-line); }
.event-layer-properties { display: grid; gap: 10px; border-top: 1px solid #e6e8e3; padding-top: 12px; }

body[data-embedded] {margin:0;background:#fff;min-width:0;}
body[data-embedded]>header,body[data-embedded] .tools-nav {display:none;}
body[data-embedded] .tool-workspace {display:block;max-width:none;margin:0;padding:24px;}
body[data-embedded] #tools-main {min-width:0;}
body[data-embedded] #document-dialog[data-view="list"] {position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;padding:24px;box-sizing:border-box;}
body[data-embedded] #document-dialog[data-view="list"]::backdrop {background:#fff;}
body[data-embedded] #document-dialog[data-view="list"]>.dialog-heading>button {display:none;}
/* 저장 전후 공유 안내 문구가 바뀌어도 같은 작업 행의 버튼 위치를 유지합니다. */
#tool-form [data-action="open-share"] { min-width: 120px; }
