/* 서식헬프 메인 에디터의 공통 토큰·폼 스타일을 따르는 온라인 도장 UI */
body{background:var(--bg);color:var(--tx);font-family:var(--font,Pretendard,sans-serif)}
.stamp-wrap{max-width:var(--layout-width,1180px);margin:42px auto 64px;padding:0 var(--layout-gutter,24px)}
.stamp-hero{text-align:center}.stamp-hero .sub-hero__eyebrow{display:block}.stamp-hero .sub-hero__desc{max-width:690px;margin:0 auto}
.stamp-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:20px;align-items:start}
.stamp-card{min-width:0;margin:0;padding:23px;border:1px solid var(--bd);border-radius:17px;background:var(--card)}
.stamp-card h2{margin:0 0 15px;color:var(--tx);font-size:17px;line-height:1.45;letter-spacing:-.025em}
.stamp-card label{display:block;margin:14px 0 5px;color:#536582;font-size:13px;font-weight:650}
.stamp-card label:first-of-type{margin-top:0}
.stamp-card input:not([type=range]),.stamp-card select,.stamp-card textarea{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:12px;border:1px solid #dce5f1;border-radius:9px;background:#fafcff;color:var(--tx);font:400 15px/1.4 var(--font,Pretendard,sans-serif)}
.stamp-card input:focus,.stamp-card select:focus,.stamp-card textarea:focus{outline:2px solid #b7cfff;outline-offset:1px}
.stamp-card input[type=range]{display:block;width:100%;accent-color:var(--primary)}
.stamp-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:19px}
.stamp-actions button,.stamp-actions a{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:39px;padding:9px 13px;border:1px solid #c9d7ed;border-radius:9px;background:#fff;color:var(--primary);font:650 13px/1.3 var(--font,Pretendard,sans-serif);cursor:pointer;text-decoration:none;transition:background .2s ease,color .2s ease,border-color .2s ease}
.stamp-actions button:hover,.stamp-actions a:hover,.stamp-actions button:focus-visible{background:var(--primary);border-color:var(--primary);color:#fff}
.stamp-actions button.primary{background:var(--primary);border-color:var(--primary);color:#fff}
.stamp-actions button.primary:hover{background:var(--primary-deep);border-color:var(--primary-deep)}
.stamp-canvas{min-height:330px;display:flex;align-items:center;justify-content:center;border:1px solid var(--bd);border-radius:10px;background:repeating-conic-gradient(#f4f7fb 0 25%,#fff 0 50%) 50%/20px 20px}
.stamp-canvas canvas{width:260px;max-width:100%;height:auto}
.stamp-intro{color:var(--sub)}.stamp-return{display:none;margin:0 0 18px;padding:14px;border:1px solid var(--bd);border-radius:12px;background:#edf4ff}.stamp-return a{color:var(--primary);font-weight:700}
.stamp-notice{margin:16px 0 0;color:var(--sub);font-size:13px;line-height:1.65}
#stampDocumentSample{margin-top:16px;padding:14px;border:1px solid var(--bd)!important;border-radius:9px;background:#fff}
#stampDocumentSample .stamp-notice{margin:0}
@media(max-width:1024px){.stamp-layout{grid-template-columns:1fr;gap:16px}.stamp-wrap{margin:30px auto 48px}}
@media(max-width:580px){.stamp-card{padding:16px;border-radius:14px}.stamp-actions button{flex:1 1 auto}.stamp-wrap{margin:24px auto 44px}}
@media(prefers-reduced-motion:reduce){.stamp-actions button,.stamp-actions a{transition:none}}

/* 도장 설정: PC 2열, 모바일 1열 */
.stamp-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px;align-items:start}
.stamp-field{min-width:0}.stamp-field label{margin:0 0 6px}.stamp-field input,.stamp-field select{width:100%}.stamp-grid-wide{grid-column:1/-1;margin:0}
.stamp-field input[type=range]{min-height:44px;margin:0}
@media(max-width:580px){.stamp-settings-grid{grid-template-columns:1fr;gap:12px}.stamp-grid-wide{grid-column:auto}}

/* Letter-count driven stamp settings and validation */
.stamp-card .stamp-error{margin:6px 0 0;color:#b4232e;font-size:12px;line-height:1.5}
.stamp-card .stamp-error[hidden]{display:none}
.stamp-card .stamp-readonly{display:flex;align-items:center;box-sizing:border-box;min-height:44px;padding:9px 12px;border:1px solid #dce5f1;border-radius:9px;background:#f4f7fa;color:#536582;font-size:13px;line-height:1.5}
.stamp-card .stamp-suffix-note{margin:5px 0 0;color:#64748b;font-size:12px;line-height:1.5}
.stamp-card select:disabled{background:#f4f7fa;color:#748097;cursor:not-allowed}
.stamp-card input[aria-invalid="true"]{border-color:#c62828}

.stamp-field .stamp-field-caption{display:block;margin:0 0 6px;color:#536582;font-size:13px;font-weight:650}

/* Keep row alignment stable when error/help text appears under one field. */
.stamp-settings-grid>.stamp-field{align-self:start;min-width:0}
.stamp-settings-grid>.stamp-field>label,.stamp-settings-grid>.stamp-field>.stamp-field-caption{min-height:20px;line-height:20px}
.stamp-settings-grid>.stamp-field input:not([type=range]),.stamp-settings-grid>.stamp-field select,.stamp-settings-grid>.stamp-field .stamp-readonly{min-height:46px}
.stamp-settings-grid>.stamp-grid-wide{grid-column:1/-1;min-width:0;margin:0}
@media(max-width:580px){.stamp-settings-grid>.stamp-grid-wide{grid-column:auto}}

/* 2026-11-02: stamp size, texture and typography upgrade. */
@font-face{font-family:SuseongHyejeong;src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2205-2@1.0/SuseongHyejeong.woff2') format('woff2');font-style:normal;font-weight:400;font-display:swap}
.stamp-config-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.stamp-config-header h2{margin:0}
.stamp-reset,.stamp-subbutton{min-height:43px;padding:9px 14px;border-radius:9px;border:1px solid #c9d7ed;background:#fff;color:#1956bb;font:650 13px/1.3 var(--font,Pretendard,sans-serif);cursor:pointer}
.stamp-reset:hover,.stamp-subbutton:hover{background:#edf4ff}
.stamp-section{margin-top:18px;padding-top:18px;border-top:1px solid #e4eaf2}
.stamp-section h3{margin:0 0 14px;color:#253956;font-size:14px;font-weight:750}
.stamp-section .stamp-settings-grid{gap:14px 16px}
.stamp-card .stamp-field label,.stamp-card .stamp-field .stamp-field-caption{margin:0 0 6px}
.stamp-card .stamp-field select,.stamp-card .stamp-field input:not([type=checkbox]){background:#fff}
.stamp-section .stamp-notice{margin:0;font-size:12px;line-height:1.5}
.stamp-section .stamp-notice:empty{display:none}
.stamp-layout-note{padding:9px 12px;background:#f6f9ff;border-radius:8px;color:#536582;font-size:12px;line-height:1.5}
.stamp-field[hidden],.stamp-status[hidden],.stamp-document-sample[hidden]{display:none!important}
.stamp-reroll-field{display:flex;flex-direction:column;align-items:stretch}
.stamp-reroll-field .stamp-subbutton{width:100%}
.stamp-privacy{margin-top:20px;padding:13px 14px;border:1px solid #dfe8f5;border-radius:10px;background:#f6f9ff}
.stamp-privacy .stamp-check{display:flex;align-items:center;gap:9px;margin:0;color:#344a68;font-size:13px;font-weight:650;cursor:pointer}
.stamp-privacy input{width:16px;height:16px;min-width:16px;margin:0;accent-color:var(--primary)}
.stamp-privacy p{margin:8px 0 0;color:#64758a;font-size:12px;line-height:1.6}
.stamp-actions a{flex:0 0 auto}
.stamp-status{margin:12px 0 0;padding:10px 12px;background:#edf5ff;color:#214b87;border-radius:8px;font-size:13px;line-height:1.55}
.stamp-status[data-kind="error"]{background:#fff1f1;color:#a62626}
.stamp-status[data-kind="success"]{background:#f0f9f1;color:#28663a}
.stamp-output{position:sticky;top:24px}
.stamp-canvas{min-height:320px;overflow:hidden;background:repeating-conic-gradient(#edf1f7 0 25%,#fff 0 50%) 50%/18px 18px}
.stamp-canvas canvas{width:300px;max-width:100%;height:auto}
.stamp-document-sample{padding:14px;border:1px solid #dce5f1;border-radius:10px;background:#fff;margin-top:17px}
.stamp-document-sample strong{font-size:13px;color:#263c5a}
.stamp-document-line{display:flex;align-items:center;gap:8px;min-height:80px;margin-top:12px;padding:10px 14px;border:1px solid #e2e7ed;color:#344359;font-family:'Noto Serif KR','Batang',serif;font-size:14px}
.stamp-document-line canvas{display:block;flex:none;height:auto}
.stamp-document-size{display:block;margin-top:9px;color:#6b7789;font-size:11px;line-height:1.5}
.stamp-info{margin:22px 0 0;padding:22px 24px;background:#fff;border:1px solid var(--bd);border-radius:16px}
.stamp-info>h2{margin:0 0 16px;font-size:18px;color:#263c59}
.stamp-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.stamp-info h3{margin:0 0 8px;font-size:14px;color:#2c4160}
.stamp-info p{margin:0;color:#5e6e83;font-size:13px;line-height:1.7}
.stamp-info a{color:#145cdd;text-decoration:underline}
@media(max-width:1024px){.stamp-output{position:static}.stamp-info-grid{grid-template-columns:1fr;gap:16px}}
@media(max-width:580px){.stamp-info{padding:17px}.stamp-config-header{margin-bottom:0}.stamp-section{margin-top:16px;padding-top:15px}.stamp-canvas{min-height:290px}.stamp-canvas canvas{width:245px}.stamp-actions button,.stamp-actions a{flex:1 1 calc(50% - 6px)}.stamp-document-line{padding:8px;min-height:70px}}

/* Keep checkbox compact despite shared text-input selectors. */
.stamp-card .stamp-privacy input[type="checkbox"]{display:inline-block;box-sizing:border-box;width:16px;height:16px;min-height:0;min-width:16px;margin:0;padding:0;appearance:auto;background:transparent;border:0;border-radius:0;flex:none}
.stamp-card .stamp-reroll-field button[hidden]{display:none!important}
