* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --ink: #33251c;
  --muted: #6d594a;
  --line: #e8dacb;
  --accent: #913c24;
  --warm: #f8ecdf;
  --surface: #fffdf9;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: #fbf6ee; line-height: 1.55; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #976029; outline-offset: 3px; }
.shell { width: min(100% - 40px, 1020px); margin-inline: auto; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar, nav, .brand, .privacy { display: flex; align-items: center; }
.bar { min-height: 72px; gap: 34px; flex-wrap: wrap; }
.brand { color: inherit; text-decoration: none; gap: 9px; font-weight: 800; white-space: nowrap; }
.brand span { display: grid; place-items: center; width: 34px; height: 34px; color: var(--accent); background: var(--warm); border-radius: 10px; font-size: 21px; }
nav { gap: 6px; }
nav button { padding: 8px 13px; color: var(--muted); border: 0; border-radius: 8px; background: transparent; }
nav [aria-pressed="true"] { color: var(--accent); background: var(--warm); font-weight: 750; }
.privacy { margin: 0 0 0 auto; gap: 7px; font-size: .85rem; color: var(--muted); }
.privacy span { background: #487250; width: 7px; height: 7px; border-radius: 50%; }
main { padding-block: 54px 28px; }
.intro { margin-bottom: 28px; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); letter-spacing: -.055em; line-height: 1.2; margin: 0 0 10px; }
p { margin: 0; }
.intro p, .empty, #summary, .source, small, #status { color: var(--muted); }
.steps { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 17px; background: var(--surface); padding: 22px; min-width: 0; }
h2 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 0 0 17px; }
.number { display: grid; place-items: center; flex: 0 0 31px; height: 31px; background: var(--warm); color: var(--accent); border-radius: 50%; }
.drop { background: #fbf1e5; border: 1px dashed #bd8a6b; border-radius: 13px; min-height: 196px; padding: 17px; display: grid; place-content: center; justify-items: center; gap: 11px; text-align: center; }
.drop.over { background: #f2ddc8; border-color: var(--accent); }
.upload-icon { color: var(--accent); background: var(--surface); border-radius: 10px; font-size: 24px; line-height: 40px; width: 40px; }
.secondary, .primary, .file button { border-radius: 8px; padding: 9px 13px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-weight: 700; }
.secondary:hover, .file button:not(:disabled):hover { background: var(--warm); }
.empty { min-height: 196px; display: grid; place-content: center; text-align: center; border: 1px solid var(--line); border-radius: 13px; padding: 14px; }
ol { list-style: none; margin: 0; padding: 0; }
.file { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.file-meta { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.file-meta small { display: block; }
.file button { padding: 5px 9px; min-width: 33px; }
.file button:disabled { opacity: .35; }
.file[draggable="true"] { cursor: grab; }
.file.target { background: var(--warm); }
.source { padding-bottom: 9px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
label { display: block; margin: 9px 0 4px; font-weight: 650; }
select, #range { width: 100%; min-height: 42px; border-radius: 8px; border: 1px solid #baaa9b; color: var(--ink); padding: 6px 9px; background: white; }
[aria-invalid="true"] { border-color: var(--accent) !important; }
.output { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.output h2 { margin-bottom: 5px; }
#summary { padding-left: 41px; font-size: .9rem; }
.primary { background: var(--accent); color: white; border-color: transparent; padding: 11px 17px; }
.primary:hover:not(:disabled) { background: #73301d; }
.primary:disabled { background: #eaded3; color: #715d50; }
.primary span { margin-left: 6px; }
[role="alert"] { margin-top: 8px; color: #922d20; white-space: pre-line; overflow-wrap: anywhere; font-size: .9rem; }
#status { margin-top: 10px; font-size: .9rem; }
@media (max-width: 680px) {
  .bar { gap: 10px 18px; padding-block: 12px; }
  .privacy { margin-left: 0; }
  main { padding-top: 32px; }
  .steps { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .empty { min-height: 94px; }
  .primary { width: 100%; }
}
@media (pointer: coarse) {
  button, .file button { min-height: 44px; }
  .file button { min-width: 44px; }
}

/* Site navigation and document workspaces */
:root {
  --ink: #171a21;
  --muted: #515c6d;
  --line: #e1e6ef;
  --accent: #075bc9;
  --warm: #eaf2ff;
  --surface: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
body { background: #f5f6f9; }
:focus-visible { outline-color: var(--accent); }
.top { background: #ffffffed; }
.bar { gap: 10px 24px; }
.navigation { flex-wrap: wrap; gap: 2px; }
nav a { color: var(--muted); text-decoration: none; padding: 7px 9px; border-radius: 8px; font-size: .92rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); background: var(--warm); }
.pdf-tabs { margin-bottom: 24px; }
.drop { background: #f4f8ff; border-color: #8aa9d7; }
.drop.over { background: #e8f1ff; }
select, #range, #edit-text { border: 1px solid #aebbd0; }
.primary:hover:not(:disabled) { background: #064ca7; }
.primary:disabled { background: #e6eaf0; color: #505d70; }
.link-button { display: inline-block; text-decoration: none; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 24px; padding: clamp(26px,6vw,64px); background: linear-gradient(125deg, #fff 20%, #e7efff 100%); border: 1px solid #dce7fa; border-radius: 27px; overflow: hidden; }
.hero h1 { font-size: clamp(2.8rem, 7.8vw, 5.2rem); line-height: 1.04; letter-spacing: -.075em; margin-bottom: 19px; word-break: keep-all; }
.hero p { color: var(--muted); margin-bottom: 24px; max-width: 28em; word-break: keep-all; }
.art { position: relative; isolation: isolate; min-height: 242px; }
.art-paper { position: absolute; left: 50%; top: 50%; width: 133px; aspect-ratio: .76; padding: 20px 15px; border: 1px solid #cfddf1; border-radius: 15px; background: #fdfdff; box-shadow: 0 16px 35px #254e8e26; display: grid; align-content: start; gap: 10px; }
.art-paper b { color: #124c99; background: #eaf2ff; width: fit-content; padding: 4px 8px; border-radius: 6px; font-size: .78rem; }
.art-paper i { height: 4px; background: #deebfc; border-radius: 5px; }
.art-paper i:nth-of-type(2) { width: 70%; }
.art-back { --angle: 15deg; --left: -22%; --top: -57%; transform: translate(var(--left), var(--top)) rotate(var(--angle)); animation: settle .9s ease-out both; background: #f2f6ff; }
.art-front { --angle: -12deg; --left: -82%; --top: -42%; transform: translate(var(--left), var(--top)) rotate(var(--angle)); animation: settle .88s .12s ease-out both; }
.art-front em { position: absolute; display: grid; place-items: center; right: 13px; bottom: 13px; width: 34px; height: 34px; border-radius: 50%; background: #1263d3; color: white; font-style: normal; }
@keyframes settle {
  from { opacity: 0; transform: translate(var(--left), calc(var(--top) + 24px)) rotate(0deg); }
  to { opacity: 1; transform: translate(var(--left), var(--top)) rotate(var(--angle)); }
}
@media (prefers-reduced-motion: reduce) { .art-paper { animation: none; } }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 12px; margin-top: 16px; }
.tool { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; padding: 16px; }
.tool:hover { border-color: #a8c5ed; }
.tool span { display: grid; place-items: center; margin-bottom: 7px; width: 36px; height: 36px; border-radius: 10px; background: var(--warm); color: var(--accent); font-size: 21px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 22px; padding-block: 16px; }
.site-footer nav { flex-wrap: wrap; }
.info .card { max-width: 720px; }
.info h2 { margin: 0 0 6px; }
.info p + h2 { margin-top: 22px; }
.info ul { margin: 0; padding-left: 24px; }
.info li + li { margin-top: 8px; }
.info a { color: var(--accent); }
input[type="file"] { width: 100%; font-size: .9rem; }
input[type="file"]::file-selector-button { font: inherit; padding: 7px 10px; margin-right: 8px; color: var(--accent); background: var(--warm); border: 0; border-radius: 8px; cursor: pointer; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.secondary:disabled { opacity: .5; }
#edit-text { width: 100%; min-height: 42px; padding: 6px 9px; border-radius: 8px; margin-bottom: 8px; }
#signature { display: block; width: 100%; height: auto; border: 1px dashed #8aa9d7; border-radius: 8px; background: #fcfdff; touch-action: none; }
#pdf-preview { width: 100%; height: clamp(280px, 50vh, 550px); border: 1px solid var(--line); border-radius: 9px; margin-top: 10px; }
#hwp-paper { margin-top: 12px; background: #edf1f7; border-radius: 12px; padding: 12px; }
.page-nav { justify-content: center; margin: 0 0 12px; }
#hwp-image { display: block; width: min(100%, 780px); height: auto; margin: auto; background: white; border: 1px solid var(--line); }
#edit-status, #hwp-status, #word-status { font-size: .9rem; color: var(--muted); margin-top: 10px; }
#convert-word { margin-top: 14px; }
@media(max-width:680px) {
  .navigation { order: 3; width: 100%; }
  .bar .privacy { margin-inline-start: auto; }
  .hero { gap: 10px; }
  .art { min-height: 180px; }
  .art-paper { width: 100px; padding: 13px 10px; gap: 7px; }
}
@media(max-width:420px) {
  .hero { grid-template-columns: 1fr; }
  .art { min-height: 155px; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .bar { gap: 10px; }
}
