/* =========================================================
   HWASEON – Unified Styles (tidy, lossless)
   ※ 디자인 결과 불변 / 값·순서·셀렉터 유지
   ========================================================= */

/* ==== Root tokens ==== */
:root{
  /* Colors */
  --bg:#f6f8fb;
  --panel:#ffffff;
  --ink:#0f172a;
  --ink-2:#334155;
  --muted:#64748b;
  --line:#e6eaf2;
  --brand:#111827;    /* 딥그레이 */
  --accent:#2563eb;   /* 링크/포인트 */

  /* Effects & Radius */
  --shadow:0 10px 30px rgba(15,23,42,.06);
  --radius:14px;
  --radius-sm:10px;

  /* Layout */
  --container-max:760px;
}

/* ==== Base ==== */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--ink);
  background:var(--bg);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
.hidden{ display:none!important; }

/* ==== Container / Section ==== */
.container{
  max-width:var(--container-max);
  margin:0 auto;
  padding:0 20px;
}
.section{ padding-top:64px; } /* 헤더와 간격 */
.page-title{
  margin:0 0 6px;
  color:var(--brand);
  font-size:28px;
  font-weight:800;
  line-height:1.25;
}
.page-subtitle{
  margin:0 0 14px;
  color:var(--muted);
  font-size:14px;
}

/* ==== Header (index 동일) ==== */
.site-header{
  position:sticky;
  top:0;
  z-index:10;
  background:#fff;
  border-bottom:1px solid var(--line);
  backdrop-filter:saturate(180%) blur(6px);
}
.site-header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:64px;
}
.brand__logo{
  display:block;
  width:auto;
  height:28px;
  object-fit:contain; /* 로고 높이 통일 */
}
.site-nav a{
  margin-left:22px;
  color:var(--ink-2);
  font-weight:600;
  text-decoration:none;
}
.site-nav a:hover{ color:var(--brand); }
.nav-id{
  margin-left:20px;
  color:#03bd9b;     /* 최신 민트 톤 */
  font-weight:700;
  letter-spacing:.2px;
}

/* ==== Intro ==== */
.intro{ margin-bottom:18px; }
.intro__title{
  margin:0 0 6px;
  color:var(--brand);
  font-size:28px;
  font-weight:800;
  line-height:1.25;
}
.intro__sub{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

/* ==== Card ==== */
.card{
  padding:18px 22px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

/* ==== Form ==== */
.form-label{
  display:block;
  margin:16px 0 8px;
  color:var(--ink-2);
  font-weight:700;
}
/* 업로더/인풋 높이/스타일 동일화 */
.control,
.fileuploader{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px;
  color:#6b7280;
  background:#f8fafc;
  border:1px dashed #e2e8f0;
  border-radius:10px;
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.fileuploader input{ display:none; }
.fileuploader:hover{ background:#f9fbff; border-color:#cfd9ea; }
.control.input{ background:#fff; border-style:solid; } /* 텍스트 인풋은 실선 */
.control.input input{ all:unset; flex:1; height:100%; font-size:15px; }
/* 선택된 파일 표시(알약) */
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  max-width:100%;
  margin-top:10px;
  padding:8px 12px;
  color:#475569;
  background:#fbfcff;
  border:1px solid var(--line);
  border-radius:999px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pill--muted{ background:#f6f8fe; }
/* 버튼 (index 톤) */
.actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
  margin-bottom:16px;
}
.btn{
  height:38px;
  padding:0 14px;
  color:#111827;
  background:#f5f7fb;
  border:1px solid var(--line);
  border-radius:10px;
  font-weight:700;
  cursor:pointer;
}
.btn:hover{ background:#eef2f8; }
.btn.btn--dark{
  color:#fff;
  background:#111827;
  border-color:#111827;
}
.btn.btn--dark:hover{ background:#0b1220; }

/* ==== Result box (compact & tidy) ==== */
.result{ margin-top:18px; }
.result-box{
  position:relative;
  padding:14px 16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:var(--shadow);
}
/* 넓은 화면: 썸네일 | 정보 2열 그리드 */
@media (min-width:860px){
  .result-box{
    display:grid;
    grid-template-columns:200px 1fr; /* 썸네일 더 작게 */
    gap:18px;
    align-items:start;
  }
}
/* 썸네일 (컴팩트) */
.result-box .result-img{
  display:block;
  max-width:180px;   /* 360 → 180 */
  max-height:130px;  /* 220 → 130 */
  margin:0 auto 10px;
  object-fit:cover;
  border-radius:10px;
  box-shadow:0 8px 18px rgba(15,23,42,.12);
}
@media (min-width:860px){
  .result-box .result-img{ margin:0; }
}
/* 정보 영역 */
.result-box .result-info{
  display:flex;
  flex-direction:column;
  gap:10px;
}
/* URL 행: 복사 버튼을 앞쪽으로 */
.result-url-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  min-width:0;
}
.result-url-row .copy-btn{
  order:-1;
  height:28px;
  padding:0 10px;
  color:#fff;
  background:#111827;
  border:1px solid var(--line);
  border-radius:8px;
  font-weight:800;
  cursor:pointer;
}
.result-url-row .copy-btn:hover{ background:#0b1220; }
/* URL 텍스트 줄바꿈/말줄임 */
.result-url-row a{
  max-width:100%;
  color:var(--accent);
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.result-url-row a:hover{ text-decoration:underline; }
/* 메모 */
.result-memo{ color:#374151; }
.result-memo b,
.result-url-row b{ color:var(--brand); }
/* 여러 결과 스크롤러 */
.result-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:340px;
  overflow:auto;
  padding-right:6px;
}
.result-list::-webkit-scrollbar{ width:8px; height:8px; }
.result-list::-webkit-scrollbar-thumb{ background:#d9deea; border-radius:8px; }
.result-list::-webkit-scrollbar-track{ background:transparent; }
/* (선택) 전체 복사 버튼을 카드 우상단에 고정 */
.result-copy-all{
  position:absolute;
  top:10px; right:10px;
  height:30px;
  padding:0 12px;
  color:#fff;
  background:#111827;
  border:1px solid var(--line);
  border-radius:999px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(2,6,23,.10);
}
.result-copy-all:hover{ background:#0b1220; }

/* ==== Footer ==== */
.site-footer{
  margin-top:40px;
  padding-bottom:14px;
  color:#6b7280;
  font-size:14px;
}
