@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('./assets/fonts/manrope.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('./assets/fonts/jetbrains-mono.woff2') format('woff2');
}
:root {
  font-family: 'Manrope Variable', sans-serif;
  color: #26392e;
  background: #f7f8f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --green: #245d42;
  --ink: #25392e;
  --muted: #68716a;
  --border: #dce1d9;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; min-width: 320px; }
button, input, textarea { font: inherit; }
button, a, summary, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a, summary { touch-action: manipulation; }
button { color: inherit; }
button:disabled { cursor: default; }
button, a, summary, input, textarea { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--green); }
::selection { background: #cfe4c9; color: #183b29; }
textarea { caret-color: var(--green); scrollbar-width: thin; scrollbar-color: #c7d1c7 transparent; }
svg { flex-shrink: 0; }
a { color: inherit; text-underline-offset: 4px; }
.site-shell { max-width: 1328px; margin-inline: auto; padding-inline: 52px; }
.site-header { height: 96px; display: flex; align-items: center; gap: 30px; border-bottom: 1px solid var(--border); }
.wordmark { display: inline-flex; align-items: center; text-decoration: none; font-size: 25px; font-weight: 800; letter-spacing: -0.035em; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: var(--green); color: #fff; margin-right: 10px; }
.brand-dot { color: #73927b; }
.header-note { font-size: 12px; color: var(--muted); border-left: 1px solid var(--border); padding-left: 26px; }
.privacy-link { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; font-size: 12px; font-weight: 600; text-decoration: none; }
.privacy-link:hover { text-decoration: underline; }
.intro { padding: 58px 0 36px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
h1 { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.2; letter-spacing: -0.04em; font-weight: 650; margin: 0 0 14px; text-wrap: balance; }
h1 span { color: #3d7850; }
.intro p { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0; }
.mobile-break { display: none; }
.local-badge { font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 7px; background: #edf1e9; border-radius: 6px; padding: 8px 11px; white-space: nowrap; margin-bottom: 4px; }
.status-dot { width: 5px; height: 5px; background: #417950; border-radius: 50%; }
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) 142px minmax(0, 1fr); align-items: stretch; }
.editor-panel { min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 180ms ease, background-color 180ms ease; }
.editor-panel:focus-within { border-color: #71917a; }
.editor-panel.dragging { border-color: var(--green); background: #edf5e9; }
.editor-heading { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 20px; border-bottom: 1px solid #edf0eb; }
.editor-title { display: flex; align-items: center; gap: 10px; }
.editor-title label { font-size: 14px; font-weight: 700; }
.format-tag { font-size: 9px; letter-spacing: 0.04em; font-weight: 650; color: #626f63; background: #f0f3ed; padding: 4px 6px; border-radius: 4px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: #617363; transition: color 150ms ease, background-color 150ms ease; }
.icon-button:hover:not(:disabled) { background: #eaf0e6; color: var(--green); }
.icon-button:disabled { color: #a6ada6; }
.editor-content { position: relative; display: flex; flex-direction: column; height: 340px; min-height: 340px; }
textarea { resize: none; display: block; width: 100%; min-height: 0; flex: 1; padding: 23px 21px; background: transparent; border: 0; border-radius: 0; font-family: 'JetBrains Mono Variable', 'Noto Sans Mono CJK KR', 'Malgun Gothic', 'Apple SD Gothic Neo', monospace; font-size: 13px; line-height: 1.95; color: #2f4936; overflow-wrap: anywhere; }
textarea::placeholder { color: #6b756b; opacity: 1; }
textarea:focus { outline: none; }
textarea[readonly] { color: #6b746b; }
.sample-button { align-self: flex-start; display: flex; align-items: center; gap: 7px; color: var(--green); background: #f1f5ec; border: 0; border-radius: 5px; font-size: 11px; font-weight: 650; padding: 9px 11px; margin: 0 21px 20px; transition: background-color 150ms; }
.sample-button:hover { background: #e3eddb; }
.editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 51px; padding: 0 16px 0 20px; border-top: 1px solid #edf0eb; }
.file-actions { display: flex; align-items: center; gap: 7px; }
.text-button { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: #566a59; background: none; border: 0; border-radius: 4px; min-height: 34px; padding: 0; }
.text-button:hover:not(:disabled) { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.text-button:disabled { opacity: 0.5; }
.download-button { width: 28px; min-width: 28px; }
.byte-count { font-family: 'JetBrains Mono Variable', monospace; font-size: 10px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.conversion-controls { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; padding: 18px 15px; }
.direction-symbol { display: flex; align-items: center; gap: 9px; color: #8c9d8d; margin: 8px 0 13px; width: 100%; }
.direction-symbol span { flex: 1; height: 1px; background: #dce3d7; }
.convert-button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 44px; border-radius: 7px; font-size: 12px; font-weight: 650; border: 1px solid transparent; transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
.convert-button.primary { background: var(--green); color: white; }
.convert-button.primary:hover:not(:disabled) { background: #19492f; }
.convert-button.primary:disabled { background: #dfe7db; color: #6b7c6b; }
.convert-button.secondary { background: #fff; color: var(--green); border-color: #cfd9ca; }
.convert-button.secondary:hover:not(:disabled) { background: #eaf1e5; border-color: #90ab89; }
.convert-button.secondary:disabled { background: transparent; border-color: #e0e5db; color: #83907f; }
.shortcut { font-size: 9px; color: var(--muted); margin: 4px -8px 16px; white-space: nowrap; }
kbd { font-family: inherit; }
.reset-button { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; font-size: 10px; padding: 8px; border-radius: 4px; color: #63705f; }
.reset-button:hover:not(:disabled) { color: var(--green); background: #eaf0e5; }
.reset-button:disabled { opacity: 0.5; }
.file-chip { display: flex; align-items: center; gap: 7px; background: #edf3e8; color: #4b634e; font-size: 10px; margin: 12px 15px 0; padding: 6px 8px; border-radius: 5px; min-width: 0; }
.file-chip > span:first-of-type { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; }
.file-chip > span:last-of-type { font-variant-numeric: tabular-nums; white-space: nowrap; }
.file-chip button { display: grid; place-items: center; min-width: 24px; min-height: 24px; border: 0; border-radius: 3px; background: none; padding: 3px; }
.file-chip button:hover { background: #dbe8d5; }
.input-privacy { display: flex; align-items: center; gap: 6px; color: #5a6e59; font-size: 12px; margin: 16px 0 21px; }
.below-workbench { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; column-gap: 22px; row-gap: 14px; }
.options { display: flex; align-items: center; gap: 23px; }
.options-label { font-size: 11px; font-weight: 650; color: #64725f; }
.checkbox-label { display: flex; align-items: center; gap: 7px; font-size: 11px; white-space: nowrap; cursor: pointer; min-height: 25px; }
input[type='checkbox'] { appearance: none; display: grid; place-content: center; width: 14px; height: 14px; border: 1px solid #a6b49e; border-radius: 3px; background: #fff; margin: 0; cursor: pointer; }
input[type='checkbox']:checked { border-color: var(--green); background: var(--green); }
input[type='checkbox']:checked::after { content: ''; width: 6px; height: 3px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.option-detail { font-family: 'JetBrains Mono Variable', monospace; color: var(--muted); font-size: 10px; padding-left: 1px; }
.file-limit { font-size: 10px; color: var(--muted); }
.feedback { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 10px; line-height: 1.7; margin-top: 17px; min-height: 34px; }
.feedback svg { margin-top: 1px; }
.feedback.error { color: #a43c2c; }
.feedback.success { color: var(--green); }
.about-section { border-top: 1px solid var(--border); margin-top: 27px; padding-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 42px; }
.privacy-note { display: flex; align-items: flex-start; gap: 13px; }
.privacy-icon { display: grid; place-items: center; width: 42px; height: 42px; background: #eaf0e3; color: #4e7950; border-radius: 12px; }
.about-section h2 { font-size: 12px; font-weight: 700; margin: 0 0 7px; }
.about-section p { font-size: 11px; color: var(--muted); line-height: 1.9; margin: 0; }
.format-note { padding-left: 71px; }
.help { border-top: 1px solid var(--border); margin-top: 29px; }
.help summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 19px 0; font-size: 11px; font-weight: 600; }
.help summary::-webkit-details-marker { display: none; }
.help summary svg { transition: transform 180ms ease; }
.help[open] summary svg { transform: rotate(180deg); }
.help > div { max-width: 75ch; font-size: 12px; color: var(--muted); line-height: 1.9; padding-bottom: 10px; }
.help p { margin: 0 0 13px; }
.help code { font-family: 'JetBrains Mono Variable', monospace; font-size: 11px; background: #eaf0e3; padding: 1px 4px; color: var(--green); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0 28px; margin-top: 25px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.spinner { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  .workbench { animation: reveal 700ms var(--ease) both; }
  @keyframes reveal { from { clip-path: inset(0 0 7% 0 round 14px); } to { clip-path: inset(0 round 14px); } }
}
@media (min-width: 1500px) { .site-shell { padding-inline: 40px; } .intro { padding-top: 70px; } .editor-content { height: 360px; min-height: 360px; } }
@media (max-width: 1050px) {
  .site-shell { padding-inline: 30px; }
  .workbench { grid-template-columns: minmax(0, 1fr) 124px minmax(0, 1fr); }
  .conversion-controls { padding-inline: 12px; }
  .format-note { padding-left: 35px; }
  .editor-heading { padding-inline: 15px; }
  .editor-title { gap: 6px; }
  .editor-footer { padding-inline: 12px; }
  .editor-content textarea { padding-inline: 16px; }
  .sample-button { margin-left: 16px; }
  .desktop-break { display: none; }
}
@media (max-width: 720px) {
  .site-shell { padding-inline: 22px; }
  .site-header { height: 76px; }
  .wordmark { font-size: 23px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .header-note { display: none; }
  .privacy-link { font-size: 10px; gap: 5px; }
  .intro { padding: 35px 0 25px; gap: 18px; }
  h1 { font-size: 34px; margin-bottom: 12px; }
  .intro p { font-size: 12px; max-width: 32ch; line-height: 1.8; }
  .local-badge { display: none; }
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .editor-heading { min-height: 54px; padding-inline: 17px; }
  .editor-content { height: 230px; min-height: 230px; }
  textarea { min-height: 0; padding: 18px; font-size: 13px; }
  .sample-button { margin-bottom: 15px; }
  .editor-footer { padding-inline: 16px; min-height: 48px; }
  .conversion-controls { flex-direction: row; padding: 15px 0; gap: 10px; }
  .direction-symbol, .shortcut { display: none; }
  .convert-button { max-width: 132px; min-height: 44px; }
  .encode-arrow { transform: rotate(90deg); }
  .decode-arrow { transform: rotate(90deg); }
  .reset-button { margin-left: auto; white-space: nowrap; font-size: 10px; }
  .below-workbench { row-gap: 14px; }
  .options { gap: 15px; flex-wrap: wrap; row-gap: 8px; }
  .options-label { flex-basis: 100%; }
  .input-privacy { margin-bottom: 19px; }
  .file-limit { font-size: 10px; }
  .feedback { margin-top: 15px; min-height: 38px; }
  .about-section { grid-template-columns: minmax(0, 1fr); gap: 25px; padding-top: 25px; margin-top: 20px; }
  .format-note { padding-left: 55px; }
  .help { margin-top: 25px; }
  .site-footer { flex-direction: column; gap: 7px; padding-bottom: 25px; margin-top: 16px; }
}
@media (max-width: 370px) {
  .site-shell { padding-inline: 16px; }
  .privacy-link { font-size: 9px; }
  h1 { font-size: 31px; }
  .mobile-break { display: block; }
  .convert-button { max-width: 106px; }
  .reset-button { padding-inline: 3px; font-size: 9px; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Formatter shares the Base64 workbench's visual language. */
[hidden] { display: none !important; }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark .icon { width: 22px; height: 22px; }
.intro { padding-top: 44px; padding-bottom: 29px; }
.intro h1 { font-size: clamp(30px, 3.4vw, 42px); }
.format-toolbar { display: flex; align-items: flex-end; gap: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.setting { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.setting label { font-size: 11px; font-weight: 650; color: #566750; }
select, input[type='number'] { min-height: 39px; border: 1px solid #cbd5c5; border-radius: 6px; background-color: #fff; color: var(--ink); font-family: inherit; font-size: 12px; padding: 7px 30px 7px 11px; }
select { cursor: pointer; }
select:hover, input[type='number']:hover { border-color: #8ba280; }
.format-setting { flex: 1; max-width: 210px; margin-right: 11px; }
.format-setting select { font-weight: 650; color: var(--green); }
.width-setting { width: 95px; }
input[type='number'] { padding-right: 7px; width: 100%; }
.final-newline { margin: 0 0 7px 4px; }
.format-options { margin: 0 0 25px; border-bottom: 1px solid var(--border); }
.format-options summary { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 44px; cursor: pointer; list-style: none; font-size: 11px; font-weight: 650; }
.format-options summary::-webkit-details-marker { display: none; }
.format-options summary svg { width: 12px; height: 12px; transition: transform 150ms ease; }
.format-options[open] summary svg { transform: rotate(180deg); }
.specific-options { display: flex; align-items: flex-start; flex-wrap: wrap; column-gap: 27px; row-gap: 14px; padding: 0 0 16px; }
.specific-options fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; column-gap: 16px; row-gap: 8px; }
.specific-options legend { padding: 0 0 8px; color: #586953; font-size: 10px; font-weight: 650; }
.specific-options .checkbox-label { font-size: 11px; }
.setting-note { color: var(--muted); font-size: 10px; line-height: 1.7; }
#format-note { flex-basis: 100%; margin: 0; }
.inline-setting { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.inline-setting select { min-height: 32px; font-size: 11px; padding-block: 5px; }
.workbench { grid-template-columns: minmax(0, 1fr) 146px minmax(0, 1fr); }
.editor-content { height: 370px; min-height: 370px; }
.editor-content textarea { line-height: 1.85; }
textarea[readonly] { color: #2f4936; }
textarea[aria-invalid='true'] { background-color: #fdf9f6; }
#source:focus-visible { outline: none; }
.editor-title { gap: 8px; }
#result-state.stale { color: #82591f; background: #faf0dd; }
.use-result { display: flex; align-items: center; justify-content: center; gap: 5px; background: transparent; border: 0; border-radius: 4px; min-height: 28px; font-size: 10px; color: #526b50; }
.use-result .icon { width: 12px; transform: rotate(180deg); }
.use-result:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 4px; }
.use-result:disabled { color: #879181; cursor: default; }
.workspace-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.workspace-meta .input-privacy { margin-block: 18px 0; }
.wrap-option { margin-top: 18px; font-size: 10px; }
.feedback { font-size: 11px; margin-top: 15px; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 35px; }
.about-section { margin-top: 22px; }
.privacy-icon .icon { width: 20px; height: 20px; }
#download:disabled { color: #879181; }
#format-button[aria-busy='true'] .icon { animation: spin 900ms linear infinite; }
@media (max-width: 1050px) {
  .format-toolbar { gap: 16px; }
  .format-setting { margin-right: 0; }
  .final-newline { margin-left: 0; }
  .workbench { grid-template-columns: minmax(0, 1fr) 128px minmax(0, 1fr); }
  .editor-title label { font-size: 13px; }
  .format-tag { font-size: 8px; }
}
@media (max-width: 720px) {
  .intro { padding-top: 30px; padding-bottom: 24px; }
  .intro h1 { font-size: 32px; max-width: 16ch; }
  .intro p { max-width: 43ch; }
  .format-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-bottom: 17px; }
  .format-setting { max-width: none; }
  .width-setting { width: auto; }
  .final-newline { margin: 0; }
  select { width: 100%; }
  .specific-options { gap: 16px; }
  .specific-options fieldset { flex-wrap: wrap; gap: 9px 14px; }
  .specific-options legend { padding-bottom: 6px; }
  .inline-setting { flex-wrap: wrap; }
  .format-options { margin-bottom: 20px; }
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .editor-content { height: 240px; min-height: 240px; }
  .conversion-controls { flex-wrap: wrap; gap: 9px; }
  .convert-button { flex: 1; max-width: none; min-width: 110px; width: auto; font-size: 11px; }
  .use-result { min-height: 34px; font-size: 10px; }
  .use-result .icon { transform: rotate(-90deg); }
  .reset-button { min-height: 28px; padding-right: 2px; }
  .workspace-meta { align-items: flex-start; flex-direction: column; gap: 11px; }
  .workspace-meta .input-privacy { font-size: 11px; }
  .wrap-option { margin-top: 0; }
  .feedback { min-height: 44px; margin-top: 16px; font-size: 10px; }
  .about-section { margin-top: 20px; }
  .format-tag { font-size: 9px; }
}
