/* ============================================================
   A001 "빠른 공유" — 네오브루탈리즘 테마
   두꺼운 검정 보더 · 하드 오프셋 섀도 · 쨍한 플랫 컬러
   ※ 마크업/로직은 그대로, 스타일만 교체
   ============================================================ */
:root {
  --bg: #ffd84d;          /* 쨍한 옐로 배경 */
  --card: #ffffff;        /* 화이트 카드 */
  --ink: #111111;         /* 모든 보더·텍스트의 검정 */
  --accent: #4d5bff;      /* 일렉트릭 블루 (주요 액션) */
  --accent-2: #ff5c8a;    /* 핫핑크 (포인트) */
  --lime: #c4f000;        /* 라임 (선택/강조) */
  --muted: #5a5a5a;       /* 보조 텍스트 */
  --field: #f4f3ef;       /* 입력 필드 배경 */
  --err: #ff3b3b;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);
}
* { box-sizing: border-box; }

/* 키보드 포커스 — 두껍고 또렷하게 */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(var(--ink) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 6px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

h1 {
  margin: 0 0 6px; font-size: 30px; line-height: 1.1;
  font-weight: 900; letter-spacing: -0.5px;
}
.sub { margin: 0 0 20px; color: var(--muted); font-size: 13px; font-weight: 600; }

/* ---- 탭 ---- */
.tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.tab {
  flex: 1; padding: 11px; border: 2px solid var(--ink);
  background: var(--card); color: var(--ink); border-radius: 6px;
  cursor: pointer; font-size: 14px; font-weight: 800;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
}
.tab:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.tab.active {
  background: var(--accent); color: #fff;
  transform: translate(0, 0); box-shadow: none;
}

.panel { display: none; }
.panel.active { display: block; animation: fade-in .18s ease; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---- 세그(텍스트/파일) ---- */
.seg { display: flex; gap: 8px; margin-bottom: 14px; }
.seg-btn {
  flex: 1; padding: 9px; border: 2px solid var(--ink);
  background: var(--card); color: var(--ink); border-radius: 6px;
  cursor: pointer; font-size: 13px; font-weight: 700;
  transition: background .12s ease, transform .08s ease;
}
.seg-btn:hover { transform: translate(-1px, -1px); }
.seg-btn.active { background: var(--lime); color: var(--ink); }

/* ---- 입력 필드 ---- */
textarea {
  width: 100%; min-height: 120px; resize: vertical;
  background: var(--field); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px; padding: 12px;
  font-size: 14px; font-family: inherit; font-weight: 500;
  transition: box-shadow .1s ease;
}
textarea:focus, .code-input:focus {
  outline: none; box-shadow: var(--shadow);
}

.file-drop {
  display: flex; align-items: center; justify-content: center;
  min-height: 120px; border: 2px dashed var(--ink); border-radius: 6px;
  background: var(--field); color: var(--muted);
  cursor: pointer; text-align: center; padding: 12px; font-weight: 600;
  transition: background .12s ease, box-shadow .1s ease;
}
.file-drop:hover { box-shadow: var(--shadow); }
.file-drop.drag-over {
  border-style: solid; background: var(--lime); color: var(--ink);
  box-shadow: var(--shadow);
}

/* ---- 옵션 ---- */
.opts { display: flex; align-items: center; gap: 16px; margin: 16px 0; flex-wrap: wrap; }
.opts label { font-size: 13px; color: var(--ink); font-weight: 600; }
.opts select {
  margin-left: 6px; background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px; padding: 6px 8px; font-weight: 700;
}
.chk { display: flex; align-items: center; gap: 6px; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ---- 기본 버튼 ---- */
button.primary, a.primary {
  display: inline-block; width: 100%; text-align: center;
  padding: 14px; border: 3px solid var(--ink); border-radius: 6px;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 900; cursor: pointer;
  text-decoration: none; box-shadow: var(--shadow);
  transition: transform .08s ease, box-shadow .08s ease, filter .12s ease;
}
button.primary:hover, a.primary:hover {
  transform: translate(-2px, -2px); box-shadow: var(--shadow-lg);
}
button.primary:active, a.primary:active {
  transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink);
}
button.primary:disabled {
  opacity: 1; background: var(--muted); cursor: default;
  transform: none; box-shadow: var(--shadow);
}

/* ---- 고스트(보조) 버튼 ---- */
.ghost {
  background: var(--card); border: 2px solid var(--ink);
  color: var(--ink); padding: 8px 12px; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-weight: 700; box-shadow: 2px 2px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
}
.ghost:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); background: var(--lime); }
.ghost:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }

/* ---- 결과 ---- */
.result {
  margin-top: 20px; text-align: center;
  border-top: 3px solid var(--ink); padding-top: 18px;
}
.code-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 14px; }
.code {
  font-size: 36px; letter-spacing: 6px; padding-left: 6px; font-weight: 900;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--accent-2);
}
.qr {
  display: inline-block; padding: 12px; background: #fff;
  border: 3px solid var(--ink); border-radius: 6px; box-shadow: var(--shadow);
}
.qr img, .qr canvas { display: block; }
.hint { color: var(--muted); font-size: 12px; font-weight: 600; margin: 12px 0 4px; }
.expire { color: var(--ink); font-size: 13px; font-weight: 700; margin: 6px 0 14px; }

/* ---- 코드 입력(받기) ---- */
.code-input {
  width: 100%; text-align: center; font-size: 28px; letter-spacing: 8px;
  text-transform: uppercase; padding: 14px; margin-bottom: 12px;
  background: var(--field); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px; font-weight: 800;
  font-family: ui-monospace, Menlo, monospace;
}
.key-input {
  font-size: 14px; letter-spacing: normal; text-transform: none;
  font-family: inherit; font-weight: 600;
}

/* ---- 상태 ---- */
.error {
  color: #fff; background: var(--err); border: 2px solid var(--ink);
  font-size: 13px; font-weight: 700; margin-top: 12px; padding: 8px 10px;
  border-radius: 6px; text-align: center; box-shadow: 2px 2px 0 var(--ink);
}
.hidden { display: none; }

.badge {
  background: var(--lime); color: var(--ink); border: 2px solid var(--ink);
  font-size: 12px; font-weight: 800; padding: 8px 10px;
  border-radius: 6px; margin-bottom: 14px; box-shadow: 2px 2px 0 var(--ink);
}
#copyLink { margin-top: 10px; }

footer {
  margin-top: 24px; text-align: center; color: var(--muted);
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}
