:root{
  --bg: #f5f5f5;
  --text: #282828;
  --muted: #6e6e6e;
  --line: rgba(56, 56, 56, 0.22);
  --card: #ffffff;
  --card2: #ffffff;
  --primary: #282828;
  --highlight: #e0ff00;
  --primary-soft: rgba(224, 255, 0, 0.22);
  --mint: #282828;
}

*{box-sizing:border-box}
[hidden]{display:none !important}
.hidden{display:none !important}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  background: var(--bg);
  font-family: "Roboto", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

a{color:inherit; text-decoration:none}

/* layout */
.container{
  max-width: 1280px;
  padding: 26px 22px 40px;
  margin: 0 auto;
}

/* top nav */
.nav{
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid #e6e6e6;
}
.nav-inner{
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 22px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
}
.brand--logo-only{
  gap: 0;
}
.brand-logo{
  display: block;
  height: 21px;
  width: auto;
  flex-shrink: 0;
}
.brand-text{min-width:0}
.brand-top{
  display:flex;
  align-items: center;
  gap: 6px;
  line-height: 1.1;
}
.brand-sub{
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand-desc{
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}
.brand--tool{
  align-items: flex-end;
}
.brand-tool-label{
  font-family: "Outfit", "Roboto", sans-serif;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: -2px;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav-right{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-link{
  font-size: 13px;
  color: rgba(51, 65, 85, 0.92);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255,255,255,0.62);
}
.nav-link:hover{
  background: rgba(255,255,255,0.90);
  border-color: rgba(56, 56, 56, 0.22);
}
.nav-link:focus-visible{
  outline: 2px solid rgba(224, 255, 0, 0.65);
  outline-offset: 2px;
}

/* 사용자 메뉴 (PDF Plus / EPUB 앱과 동일 패턴) */
.nav-right--user{
  flex-shrink: 0;
  overflow: visible;
  mask-image: none;
  margin-right: 0;
  padding-bottom: 0;
}
.nav-user-menu{
  position: relative;
}
.nav-user-trigger{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(52vw, 280px);
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.nav-user-trigger:hover{
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(56, 56, 56, 0.22);
}
.nav-user-trigger:focus-visible{
  outline: 2px solid rgba(224, 255, 0, 0.65);
  outline-offset: 2px;
}
.nav-user-avatar{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  flex-shrink: 0;
}
.nav-user-name{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.nav-user-caret{
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
}
.nav-user-dropdown{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  padding: 6px;
  z-index: 1000;
}
.nav-user-item{
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(51, 65, 85, 0.95);
  font-size: 13px;
  text-decoration: none;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}
.nav-user-item:hover{
  background: rgba(241, 245, 249, 0.95);
}
.nav-user-item--button{
  /* font: inherit 는 font-size까지 부모로 덮어써서 링크 항목보다 커짐 */
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: inherit;
}
.nav-user-sep{
  height: 1px;
  background: rgba(148, 163, 184, 0.28);
  margin: 6px 4px;
}
.btn:focus-visible{
  outline: 2px solid rgba(224, 255, 0, 0.65);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce){
  .card{ transition: none; }
  .card:hover{ transform: none; }
}

/* hero */
.hero{
  margin-top: 18px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.hero-bg{
  display: none;
}
.hero-inner{
  position: relative;
  padding: 34px 34px 26px;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.hero h1{
  margin: 16px 0 10px;
  font-size: 46px;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.lead{
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 66ch;
  line-height: 1.55;
}
.hero-actions{
  margin-top: 16px;
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 560px){
  .hero-actions{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .hero-actions .btn{
    width: 100%;
    min-height: 44px;
    font-size: 13px;
    padding: 0 10px;
  }
}
.btn{
  cursor: pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid rgba(148, 163, 184, 0.30);
}
.btn-primary{
  background: var(--highlight);
  color: var(--text);
  border-color: rgba(56, 56, 56, 0.25);
}
.btn-primary:hover{
  filter: brightness(0.96);
}
.btn-secondary{
  background: rgba(255,255,255,0.78);
  color: var(--text);
}
.btn-secondary:hover{
  background: rgba(255,255,255,0.92);
  border-color: rgba(56, 56, 56, 0.18);
}
.chips{
  margin-top: 18px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip{
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 999px;
  color: rgba(51, 65, 85, 0.92);
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(148, 163, 184, 0.26);
}
a.chip{
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
a.chip:hover{
  background: rgba(255,255,255,0.92);
  border-color: rgba(224, 255, 0, 0.65);
  color: var(--text);
}
a.chip:focus-visible{
  outline: 2px solid rgba(224, 255, 0, 0.65);
  outline-offset: 2px;
}

/* cards */
.cards{
  margin-top: 16px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 721px){
  .cards{
    grid-template-columns: repeat(2, minmax(260px, 400px));
    justify-content: center;
  }
}
@media (min-width: 1100px){
  .cards{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .card{
    padding: 18px 16px 16px;
  }
  .card-title{font-size: 17px;}
  .card-list{font-size: 12.5px;}
}
.card{
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.30);
  background: #fff;
  padding: 20px 20px 18px;
  transition: transform .14s ease, border-color .14s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}
.card:hover{
  transform: translateY(-2px);
  border-color: rgba(224, 255, 0, 0.55);
}
.card-head{
  display:flex;
  align-items:center;
  gap: 12px;
}
.card-icon{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text);
  background: #f5f5f5;
  border: 1px solid var(--line);
}
.card-icon--mint{
  color: var(--text);
  background: #f5f5f5;
  border-color: var(--line);
}
.card-title{font-size: 18px; font-weight: 900; letter-spacing:-0.02em}
.card-sub{margin-top: 2px; font-size: 12px; color: var(--muted); font-weight: 700}
.card-title-wrap{min-width:0}
.card-list{
  flex: 1 1 auto;
  margin: 14px 0 0;
  padding: 0 0 0 18px;
  color: rgba(51, 65, 85, 0.92);
  line-height: 1.55;
  font-size: 13px;
  min-height: 0;
}
.card-cta{
  margin-top: auto;
  display:flex;
  align-items:center;
  justify-content: space-between;
  font-weight: 900;
  color: var(--text);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.card-cta--mint{
  color: var(--text);
}
.arrow{font-weight: 900}

/* footer */
.footer{
  margin-top: 18px;
  padding: 16px 4px 0;
  text-align:center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px){
  .container{padding: 18px 14px 34px;}
  .nav-inner{
    padding: 12px 14px;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .nav-right:not(.nav-right--user){
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
    gap: 6px;
    padding-bottom: 4px;
    margin-right: -4px;
    mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 20px), transparent 100%);
  }
  .nav-right:not(.nav-right--user)::-webkit-scrollbar{ height: 3px; }
  .nav-right:not(.nav-right--user)::-webkit-scrollbar-thumb{
    background: rgba(148, 163, 184, 0.5);
    border-radius: 3px;
  }
  .nav-link{
    flex-shrink: 0;
    padding: 8px 9px;
    font-size: 12px;
  }
  .nav-user-trigger{
    max-width: min(48vw, 200px);
    padding: 6px 10px;
    font-size: 12px;
  }
  .hero-inner{padding: 24px 16px 20px;}
  .hero h1{font-size: 34px;}
  .cards{grid-template-columns: 1fr;}
}

/* tool pages (/qr, /isbn) */
.tool-main{padding-top: 32px; padding-bottom: 48px;}
.tool-head{margin: 0 0 22px;}
.tool-head h1{
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 900;
}
.tool-head p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 62ch;
}
.tool-head--wide p{
  max-width: 72ch;
}
.tool-panel{
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.30);
  background: #fff;
  padding: 22px 22px 20px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.tool-panel--wide{max-width: 720px;}
.tool-head--qr,
.tool-head--wide{
  text-align: center;
}
.tool-head--qr p,
.tool-head--wide p{
  margin-left: auto;
  margin-right: auto;
}
.tool-field{margin-bottom: 16px;}
.tool-field:last-of-type{margin-bottom: 0;}
.tool-label{
  display:block;
  font-size: 12px;
  font-weight: 800;
  color: rgba(51, 65, 85, 0.92);
  margin-bottom: 6px;
}
.tool-input,
.tool-select{
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255,255,255,0.95);
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
}
.tool-input:focus-visible,
.tool-select:focus-visible,
.tool-textarea:focus-visible{
  outline: 2px solid rgba(224, 255, 0, 0.65);
  outline-offset: 2px;
  border-color: rgba(56, 56, 56, 0.45);
}
.tool-textarea{
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255,255,255,0.95);
  font-size: 14px;
  resize: vertical;
  font-family: ui-monospace, monospace;
}
.tool-row{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
.tool-row--isbn-actions{
  margin-bottom: 12px;
}
.tool-hint{
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.tool-error{
  margin: 10px 0 0;
  font-size: 13px;
  color: #b91c1c;
  font-weight: 700;
}
.tool-success{
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: ui-monospace, monospace;
  color: var(--text);
  word-break: break-all;
}
.qr-preview-wrap{
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  background: #fff;
  display:flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.tool-head--qr p{max-width: 48ch;}
.tool-panel--qr{
  max-width: 920px;
  padding: 0;
  overflow: hidden;
}
.qr-layout{
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-width: 0;
}
.qr-layout > *{
  min-width: 0;
}
@media (min-width: 840px){
  .qr-layout{
    grid-template-columns: minmax(0, 1fr) minmax(0, min(42vw, 420px));
    gap: 0;
    align-items: stretch;
  }
  .qr-preview-column{
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    background: #fff;
  }
}
.qr-controls{
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.qr-controls > .tool-field{
  margin-bottom: 0;
}
.qr-controls > .tool-field.tool-field--inline{
  margin-bottom: 0;
}
.qr-controls > .tool-row{
  margin-top: 0;
}
.qr-controls > .tool-hint{
  margin-top: 0;
}
.qr-controls > .tool-error{
  margin-top: 0;
}
.qr-preview-column{
  min-height: 200px;
  min-width: 0;
}
.qr-preview-card{
  height: 100%;
  min-height: 280px;
  min-width: 0;
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qr-preview-title{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
/* 단일 미리보기 영역 — 빈 상태 / Canvas / SVG 교체 (중첩 카드 제거) */
.qr-preview-stage{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  padding: 16px;
}
.qr-preview-stage--checkered{
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e8e8e8 25%, transparent 25%),
    linear-gradient(-45deg, #e8e8e8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8e8e8 75%),
    linear-gradient(-45deg, transparent 75%, #e8e8e8 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.qr-preview-empty-msg{
  text-align: center;
  padding: 12px;
}
.qr-preview-placeholder{
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.qr-preview-live{
  width: 100%;
  min-width: 0;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.qr-preview-live svg{
  display: block;
  max-width: 100%;
  max-height: min(72vh, 440px);
  width: auto;
  height: auto;
  border-radius: 8px;
}
.tool-textarea--qr{min-height: 140px; line-height: 1.5;}
.tool-field--inline{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 14px;
}
.tool-field--inline .tool-label{margin-bottom: 0;}
.tool-field--grow .tool-select--narrow{max-width: 140px; width: auto; min-width: 120px;}
.tool-field--qr-size .tool-label,
.tool-field--qr-margin .tool-label{
  margin-bottom: 6px;
}
.qr-appearance > .tool-label{
  margin-bottom: 10px;
}
.tool-label--sub{
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 8px;
}
.qr-color-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 480px){
  .qr-color-grid{
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
.qr-color-inputs{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.qr-alpha-row{
  margin-top: 8px;
  width: 100%;
  min-width: 0;
}
.qr-alpha-label{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.qr-alpha-pct{
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 700;
}
.qr-alpha-range{
  width: 100%;
  height: 8px;
  accent-color: var(--text);
  cursor: pointer;
}
.qr-color-inputs input[type="color"]{
  width: 44px;
  height: 44px;
  padding: 2px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  flex-shrink: 0;
}
.qr-color-inputs input[type="color"]::-webkit-color-swatch-wrapper{
  padding: 2px;
}
.qr-color-inputs input[type="color"]::-webkit-color-swatch{
  border-radius: 8px;
  border: none;
}
.tool-input--hex{
  flex: 1;
  min-width: 0;
  max-width: 120px;
  height: 44px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.tool-row--downloads{
  margin-top: 8px;
}
.tool-hint--qr{margin-top: 6px;}

.tool-row--formats{
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.tool-row--formats-inner{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tool-label--inline{
  margin-bottom: 0;
  margin-right: 4px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.tool-row--downloads.tool-row--formats{
  flex-direction: column;
  align-items: flex-start;
}
@media (min-width: 480px){
  .tool-row--downloads.tool-row--formats{
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
}
.tool-row--formats .btn{
  min-width: 4.75rem;
  padding: 0 12px;
  font-size: 13px;
}
.barcode-svg-host{
  position: fixed;
  left: -9999px;
  top: 0;
  width: 480px;
  height: 220px;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
}

.barcode-block{
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}
.barcode-block-head{
  display:flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.barcode-block-head .tool-row{flex: 1; justify-content: flex-end; min-width: 0;}
.barcode-toolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 4px;
}
.barcode-toolbar .tool-label{margin-bottom: 0;}
.barcode-toolbar .btn{ flex-shrink: 0; }
.barcode-preview-wrap{
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  background: #fff;
  display:flex;
  flex-direction: column;
  align-items: center;
  overflow: auto;
}
#isbn-barcode-canvas{display:block; max-width: 100%; height: auto;}
.btn-ghost{
  background: rgba(255,255,255,0.78);
  color: rgba(15, 23, 42, 0.92);
}
.btn-ghost:hover{
  background: rgba(255,255,255,0.92);
  border-color: rgba(56, 56, 56, 0.18);
}
.btn:disabled{opacity: 0.5; cursor: not-allowed; pointer-events: none;}
button:not(:disabled){cursor: pointer;}
button:disabled{cursor: not-allowed;}

