/* IMGIFY design-first — 전각: 소개·사진 넣기·가이드·이야기·대화상자·인주 색상 (편집기 본체는 engraving-layout.css) */
@font-face{font-family:Gowun;src:url('../engraving/fonts/GowunBatang-Regular.ttf')}
@font-face{font-family:SealHanja;src:url('../engraving/fonts/serif.woff2')}
.usage{margin-top:70px;border-top:1px solid #d5cbbd;padding:60px 0;display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center}
.usage h2{font-size:38px}
.photo-label{display:inline-block;border-bottom:1px solid #9e5942;color:#9e5942;padding:8px 0;margin-top:10px;cursor:pointer}
.photo-label input{display:block;font-size:11px;margin-top:8px;max-width:260px}
.usage-art{aspect-ratio:1.5;background:#ded6c9 center/cover;position:relative;display:grid;place-items:center;overflow:hidden}
.usage-copy{font-family:Gowun;font-size:clamp(22px,3vw,38px);line-height:1.5;letter-spacing:.12em;color:#666055}
.usage-art canvas{position:absolute;right:10%;bottom:8%;width:20%;height:auto}
@media(max-width:850px){.usage{grid-template-columns:1fr;gap:28px;margin-top:48px;padding:40px 0}.usage h2{font-size:32px}}
.stories-teaser{padding:65px 0;border-top:1px solid #d8cfc1}
.stories-teaser h2,.story-hero h1{font:normal 38px/1.3 Gowun,serif;margin:8px 0}
.story-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:24px 0}
.story-cards a{display:flex;flex-direction:column;gap:20px;padding:22px;background:#faf8f2;border:1px solid #e1d8ca;text-decoration:none;color:#3b342d;min-height:148px}
.story-cards small{color:#a16c50;letter-spacing:.12em}
.story-cards strong{font:normal 20px Gowun,serif}
.story-cards span,.story-link{font-size:12px;color:#9f3d2e}
.story-link{display:inline-block;padding:8px 0}
.story-hero{padding:55px 0 35px;border-bottom:1px solid #d4cbbc}
.story-hero p{color:#796f63}
.story-nav{margin:18px 0;display:flex;justify-content:space-between;gap:12px;align-items:center}
.story-nav a,.article a{color:#9f3d2e}
.story-nav select{max-width:160px}
.article{display:grid;grid-template-columns:105px minmax(0,700px);gap:30px;padding:42px 0;border-bottom:1px solid #d8cfc1;scroll-margin-top:25px}
.article .ordinal{font:normal 32px Gowun;color:#bba995}
.article h2{font:normal 28px Gowun,serif;margin:0 0 18px}
.article p{font-size:15px;line-height:1.95;color:#625b51}
.article .source{font-size:11px;color:#8b8175}
.article .make-link{display:inline-block;margin-top:12px;padding:10px 0;font-weight:700;text-decoration:none;border-bottom:1px solid #a1392c}
.translation-note{font-size:12px;color:#857969}
@media(max-width:700px){.story-cards{grid-template-columns:1fr}.story-cards a{min-height:0;gap:10px}.article{grid-template-columns:1fr;gap:4px;padding:30px 0}.article .ordinal{font-size:22px}.story-hero h1{font-size:34px}}
@font-face{font-family:SongMyung;src:url('../engraving/fonts/SongMyung-Regular.ttf')}
.voice-error{color:#9f3d2e}
.guide-top,.quick-more,.guide-header a,.guide-items a{color:#6d28b6;font-weight:700;font-size:13px;text-underline-offset:3px}
.guide-top{display:flex;align-items:center;min-height:44px;white-space:nowrap}
.full-guide{background:#fff;border:1px solid #e9e4ee;border-radius:18px;box-shadow:0 2px 8px #38274909}
.quick-more{display:inline-flex;align-items:center;min-height:44px}
.usage{border-top:1px solid #e4dcec;margin-top:44px;padding:40px 0}
.usage h2{font:700 26px/1.4 system-ui;color:#30283e}
.usage h2 em{font-style:normal;color:#7c3aed}
.photo-label{color:#6d28b6;border-color:#9d7ccb}
.usage-art{border-radius:14px}
.full-guide{padding:24px;margin-top:32px;scroll-margin-top:16px}
.guide-header{display:flex;justify-content:space-between;align-items:start;gap:12px}
.guide-header h2{font-size:20px;margin:0}
.guide-header p{font-size:13px;color:#786f82;margin:5px 0 15px}
.guide-header a{min-height:44px;display:flex;align-items:center;white-space:nowrap}
.guide-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.guide-items summary{display:flex;align-items:center;min-height:48px;padding:10px 14px;color:#44384d;font-size:14px;line-height:1.4;list-style:none}
.guide-items summary:after{content:'+';margin-left:auto;color:#7c3aed;font-size:20px}
.guide-items details[open] summary:after{content:'−'}
.guide-items p{font-size:13px;color:#6e6577;line-height:1.7;padding:0 14px;margin:2px 0 8px}
.guide-items a{display:inline-flex;align-items:center;min-height:44px;margin:0 14px}
.stories-teaser{border-color:#e4dcec;padding:42px 0}
.stories-teaser h2{font:700 23px system-ui}
.story-cards a{background:#fff;border-color:#e8e2ed;border-radius:14px;color:#30283e}
.story-cards small,.story-cards span,.story-link{color:#6d28b6}
.story-cards strong{font:700 17px system-ui}
.story-hero h1,.article h2{font-family:system-ui;font-weight:700}
.story-nav a,.article a{color:#6d28b6}
.article{border-color:#e5deeb}
.article .ordinal{color:#a28bbd}
#usage-step{scroll-margin-top:16px}
@media(max-width:850px){.guide-top{font-size:12px}.quick-more{min-height:44px}.guide-items{grid-template-columns:1fr}.usage{margin-top:36px}}
@media(max-width:390px){.guide-top{min-height:44px}.full-guide{padding:18px}}
@media(max-width:850px){.story-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.story-cards a{padding:12px 9px;gap:10px;min-height:130px}.story-cards small{font-size:9px}.story-cards strong{font-size:13px;line-height:1.4;word-break:keep-all}.story-cards span{font-size:11px}}
.ink-field{border:0;padding:0;margin:0;min-width:0}
.ink-field legend{font-weight:600;margin-bottom:8px}
.ink-swatches{display:flex;flex-wrap:wrap;gap:8px}
.ink-swatches label{position:relative;display:inline-flex;cursor:pointer;padding:4px}
.ink-swatches input{position:absolute;opacity:0}
.ink-swatches span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--ink);border:2px solid white;box-shadow:0 0 0 1px #888;color:white}
.ink-swatches input:checked+span{box-shadow:0 0 0 3px #6744c4}
.ink-swatches input:checked+span:after{content:'✓';font-weight:bold}
.ink-swatches input:focus-visible+span{outline:3px solid #222;outline-offset:4px}
.ink-field output{display:block;margin:6px 0}
.custom-ink{display:flex;align-items:center;gap:8px}
.custom-ink input{width:45px;height:36px;padding:0}
.story-result{border:1px solid #ded6f0;border-radius:14px;padding:12px;margin-top:12px;background:#faf8ff}
.story-result summary{cursor:pointer;font-weight:700}
.story-result p{line-height:1.6}
.story-actions{display:flex;gap:8px;flex-wrap:wrap}
.story-actions button{min-height:44px;border:1px solid #ccc2e9;background:white;color:#553a9b;border-radius:9px;padding:8px 12px}
.story-notice{font-size:.9em;color:#554a66}
.share-preview{white-space:pre-wrap;overflow-wrap:anywhere}
.story-result a{overflow-wrap:anywhere}
.guide-top{display:inline-flex;justify-content:center;padding:0 12px;border:1px solid #a987e3;border-radius:9px;text-decoration:none;color:#6d28b6;background:#fff}
.guide-top:hover{background:#f5efff}
.full-guide,.usage,.stories-teaser{font-family:system-ui,-apple-system,'Malgun Gothic',sans-serif}
.guide-top{font:inherit;cursor:pointer}
.full-guide{position:fixed;inset:0;width:min(720px,calc(100% - 32px));max-width:720px;max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:24px;border:1px solid #ded4ec;color:#30283e;font-family:system-ui,-apple-system,'Malgun Gothic',sans-serif}
.full-guide::backdrop{background:rgba(27,17,43,.58)}
.guide-language{display:block;margin-bottom:16px}
.guide-language select{max-width:180px}
.guide-header button{min-width:70px;min-height:44px;padding:8px 14px;border:1px solid #b79bdf;border-radius:9px;color:#6d28b6;background:white;font:inherit;cursor:pointer}
.full-guide #guideSummary{font-size:14px;line-height:1.7;color:#554a60;white-space:pre-line}
.full-guide .guide-items[hidden]{display:none}
@media(max-width:390px){.full-guide{padding:18px}}
.story-card-preview{margin:16px 0 0}
.story-card-preview img{display:block;width:min(100%,360px);height:auto;border:1px solid #ded6f0;border-radius:10px}
.story-card-preview figcaption{margin-top:6px;font-size:12px;color:#655c70}
.meaning-panel{min-height:150px}
.meaning-empty{font-size:13px;color:#786f82}
.meaning-panel:has(#nameStories:not(:empty)) .meaning-empty{display:none}
.name-summary{display:grid;grid-template-columns:1fr 1fr;background:#faf7ff;border:1px solid #eee6f5;border-radius:10px}
.name-summary>div{padding:12px 14px;min-width:0}
.name-summary>div+div{border-left:1px solid #eee6f5}
.name-summary span,.name-summary strong{display:block;overflow-wrap:anywhere}
.name-summary span{font-size:12px;color:#75698b}
.name-summary strong{font-size:17px;color:#24173b;margin-top:4px}
.meaning-empty{padding:10px 14px;border-radius:8px;background:#f8f4fc}
.ink-swatches{gap:9px}
.guide-top:focus-visible{outline:3px solid #7c3aed;outline-offset:3px}
@media(max-width:520px){.name-summary>div{padding:10px}}
.example-badge{display:inline-block;margin:0 0 10px;padding:4px 9px;border-radius:999px;background:#f1e9ff;color:#652cb5;font-size:12px;font-weight:700}
.example-badge[hidden],.example-story[hidden],.meaning-empty[hidden]{display:none}
.example-story{font-size:13px;line-height:1.65;color:#51475f}
.example-story p{margin:10px 0 0}
.ink-field legend{float:none;width:100%;margin-bottom:4px}
.ink-field output{order:3;margin:0 0 0 4px;font-size:12px}
.ink-swatches{gap:4px}
.custom-ink{position:relative;display:block;margin:0;order:2}
.custom-ink #customColorOpen{display:grid;place-items:center;width:40px;height:40px;padding:0;border-radius:50%;border:1px solid #a88ac9;background:#fff;color:#5f389c;font-size:11px;font-weight:700}
.color-popup[hidden]{display:none}
.color-popup{position:absolute;z-index:30;top:48px;right:0;width:200px;padding:12px;background:#fff;border:1px solid #d4c4e5;border-radius:10px;box-shadow:0 6px 20px #26183533}
.color-popup label{display:block}
.color-popup #color{width:100%;height:44px;margin:4px 0 8px}
.color-popup #colorHex{width:100%;min-height:44px;margin:4px 0}
.color-popup button{min-height:44px;background:#fff;border:1px solid #d4c4e5;border-radius:8px;padding:0 12px}
.color-popup #colorHelp{display:block;font-size:12px;color:#a1392c}
@media(max-width:600px){.color-popup{right:0}}
.meaning-layout{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(0,1.4fr);border:1px solid #e9e1f1;border-radius:12px;overflow:hidden}
.meaning-layout .name-summary{display:flex;flex-direction:column-reverse;justify-content:center;text-align:center;border:0;border-radius:0;background:#f8f3ff}
.meaning-layout .name-summary>div+div{border:0}
.meaning-layout .name-summary strong{font-size:20px}
.meaning-facts{padding:8px 14px;min-width:0}
.meaning-facts>div{display:grid;grid-template-columns:88px minmax(0,1fr);gap:8px;padding:10px 0;font-size:13px;line-height:1.5}
.meaning-facts>div+div{border-top:1px solid #eee8f5}
.meaning-facts span{overflow-wrap:anywhere}
.example-story{padding:10px 14px;margin-top:10px;background:#f4edff;border-radius:10px;font-size:13px}
.example-story p{margin:3px 0}
.usage{margin-top:32px;padding:28px;border:1px solid #e9e0f1;border-radius:18px;background:#fff;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:center}
.usage h2{font-size:25px;line-height:1.35}
.photo-button{display:inline-flex;justify-content:center;align-items:center;min-width:140px;min-height:44px;padding:8px 16px;border-radius:10px;background:#7c3aed;color:white;font-size:14px;cursor:pointer}
.photo-input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.photo-input:focus-visible+.photo-status,.usage-info:has(.photo-input:focus-visible) .photo-button{outline:3px solid #6d28d9;outline-offset:3px}
.usage .photo-status{font-size:13px;color:#786f82;overflow-wrap:anywhere}
.usage-art{aspect-ratio:1.7;max-height:310px;background-color:#ede7f3;background-size:contain;background-repeat:no-repeat}
.usage-art.has-photo .usage-copy{display:none}
.stories-teaser{padding:30px 0}
.stories-teaser h2{font-size:24px}
.story-cards{gap:12px;margin:18px 0}
.story-cards a{gap:12px;padding:20px;min-height:160px}
.story-cards small{font-size:12px}
.story-cards strong{font-size:18px;line-height:1.45}
.story-cards span{display:flex;align-items:center;min-height:44px;font-size:14px;font-weight:700}
.story-link{min-height:44px;display:inline-flex;align-items:center;font-size:14px}
.full-guide #guideProgress{width:100%;height:10px;accent-color:#7c3aed}
.guide-demo{display:flex;justify-content:center;align-items:center;gap:14px;min-height:165px;margin:16px 0;background:#f7f2ff;border:1px solid #e9dff4;border-radius:12px;padding:14px}
.guide-demo>div{text-align:center}
.guide-demo canvas{display:block;width:110px;height:110px}
.guide-demo span{display:block;font-size:13px;font-weight:700}
.guide-name-demo,.guide-save-demo{font-size:20px;font-weight:700;color:#6326b1;overflow-wrap:anywhere}
.guide-actions{display:flex;justify-content:space-between;gap:10px;margin-top:20px}
.guide-actions button{min-height:44px;padding:8px 18px;border:1px solid #cdbde1;border-radius:9px;background:white;color:#5c298f;font-weight:700}
.guide-actions #guideNext{background:#7c3aed;color:white;border-color:#7c3aed}
.guide-actions button:disabled{opacity:.45}
.full-guide h3{font-size:19px;margin:12px 0}
.full-guide .guide-header p{margin:4px 0}
.guide-language{font-size:12px}
@media(max-width:850px){.usage{grid-template-columns:minmax(0,1fr);padding:20px;gap:16px}.usage-art{width:100%;max-height:260px}.story-cards{grid-template-columns:1fr}.story-cards a{min-height:0}.meaning-layout{grid-template-columns:minmax(100px,.7fr) minmax(0,1.3fr)}}
@media(max-width:390px){.meaning-layout{grid-template-columns:minmax(0,1fr)}.meaning-layout .name-summary{flex-direction:row;justify-content:space-around}.meaning-facts>div{grid-template-columns:80px minmax(0,1fr)}.guide-demo canvas{width:90px;height:90px}}
.full-guide .guide-header{align-items:center;gap:12px}
.full-guide .guide-header>div{min-width:0}
.full-guide .guide-header p{margin:3px 0 0}
.guide-language{margin:8px 0 10px}
.guide-language select{margin-top:4px;min-height:44px}
.guide-actions{justify-content:flex-end;align-items:center;gap:10px}
.guide-actions button,.guide-header button{height:44px;min-width:82px;padding:0 16px;display:inline-flex;justify-content:center;align-items:center}
@media(max-width:520px){.guide-actions button{flex:0 1 auto;min-width:78px}.full-guide .guide-header{align-items:center}}
.full-guide #guideCount{margin:6px 0 0;font-size:12px;color:#786f82}
.guide-actions{align-items:stretch}
.guide-actions button{height:auto;min-height:44px;min-width:0;flex:1 1 0;max-width:150px;padding:8px 10px;line-height:1.3;white-space:normal}
.guide-actions #guideNext{flex:1.8 1 0;max-width:180px}
.guide-reference{margin:18px 0 8px;font-size:13px;line-height:1.7;color:#685a78}
.guide-content{margin:32px 0;padding:22px;border:1px solid #e6deef;border-radius:16px;background:#fff}
.guide-content h2{margin:0 0 12px;font-size:20px}
.guide-content summary{min-height:44px;display:flex;align-items:center;color:#50306f;font-size:14px}
.guide-content p{font-size:14px;line-height:1.7;color:#5d536b}
.full-guide{width:min(580px,calc(100% - 32px));max-width:580px;padding:20px;text-align:center}
.full-guide .guide-header{justify-content:center}
.guide-language{display:flex;flex-direction:column;align-items:center;gap:4px}
.guide-language select{width:min(220px,100%);margin:0;text-align:center}
.full-guide #guideCount{margin:4px 0}
.full-guide #guideProgress{display:block;margin:10px auto}
.full-guide #guideReference,.full-guide #guideSummary{text-align:center}
.full-guide h3{margin:10px 0 6px}
.guide-actions{justify-content:center;margin-top:16px}
.content-dialog{width:min(620px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow:auto;margin:auto;border:1px solid #dfd3ed;border-radius:16px;background:white;padding:22px;color:#30283e}
.content-dialog::backdrop{background:#21132e99}
.content-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.content-dialog h2{font-size:20px;margin:0}
.content-dialog h3{font-size:17px}
.content-dialog p{font-size:14px;line-height:1.7}
.content-dialog button{min-width:64px;min-height:44px;border:1px solid #cdbde1;border-radius:9px;background:white;color:#5c298f}
.content-dialog article+article{border-top:1px solid #e9e1f1;margin-top:16px}
@media(max-width:520px){.full-guide{padding:16px}}
.help-dialog{text-align:left}
.help-dialog ol{padding-left:1.4em;margin:18px 0 12px}
.help-dialog li{font-size:14px;line-height:1.65;margin:8px 0}
.help-dialog p{margin:12px 0}
.help-dialog button{flex:none}
@media(max-width:520px){.help-dialog{padding:18px}.help-dialog h2{font-size:18px}}
.stories-teaser .story-cards{display:flex;flex-direction:column;gap:0;overflow:hidden;margin:18px 0 8px;border:1px solid #e8e2ed;border-radius:14px;background:#fff}
.stories-teaser .story-cards a{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:12px 18px;border:0;border-radius:0;background:transparent;text-decoration:none}
.stories-teaser .story-cards a+a{border-top:1px solid #eee8f4}
.story-list-content{display:flex;flex-direction:column;gap:3px;min-width:0}
.stories-teaser .story-cards strong{font-size:15px;line-height:1.45}
.stories-teaser .story-cards .story-list-description{display:block;min-height:0;color:#786f82;font-size:13px;font-weight:400;line-height:1.5}
.stories-teaser .story-cards .story-list-arrow{display:block;min-height:0;font-size:18px;color:#6d28b6}
.stories-teaser .story-cards a:focus-visible{outline:3px solid #7c3aed;outline-offset:-3px}
@font-face{font-family:SealBrush;src:url(../engraving/fonts/NanumBrushScript-Regular.ttf) format("truetype")}
@font-face{font-family:SealCalBrush;src:url(../engraving/fonts/NanumBrushScript-Regular.ttf) format("truetype");font-display:block}
@font-face{font-family:SealCalDokdo;src:url(../engraving/fonts/EastSeaDokdo-Regular.ttf) format("truetype");font-display:block}
@font-face{font-family:ImgifyHeader;src:url('../stamp/fonts/Pretendard-Bold.woff2') format('woff2');font-weight:700}
.guide-link-area{margin:24px 0 0;text-align:center}
.guide-link-area a{display:inline-flex;align-items:center;min-height:44px;color:#6d28b6;font-weight:700;text-decoration:underline}
.stories-teaser{margin-top:24px}
:root{--engraving-shell-width:1120px;--engraving-shell-gutter:20px}
@media(max-width:700px){:root{--engraving-shell-gutter:24px}}
.meaning-facts > div[hidden]{display:none}
