/* 우리식품기술연구소 공통 — 타일 보드(dense-tiles). 모든 페이지가 같이 쓴다.
   규칙: 선·그림자·그라데이션·작은 영문 라벨·번호 매기기 없음. 타일은 면으로만 구분한다. 반경은 6px 하나. */
:root {
  --navy: #0f2a52; --navy-2: #163a6b; --navy-3: #0b1f3d; --sky: #cfe0f5; --orange: #f08a12; --green: #5aa832;
  --ink: #14213a; --ink-2: #4a5670; --on-dark: #ffffff; --on-dark-2: #c9d4e6;
  --t1: #f2f5f9; --t2: #e4eaf2; --t3: #d6dfeb;
  --r: 6px; --gap: 8px; --pad: clamp(16px, 3vw, 24px);
  --fs-d: clamp(40px, 6.2vw, 92px); --fs-h: clamp(26px, 3vw, 42px); --fs-l: clamp(19px, 1.7vw, 24px); --fs-b: 17px; --fs-s: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Pretendard Variable', 'Pretendard', sans-serif; color: var(--ink); background: #fff; word-break: keep-all; -webkit-font-smoothing: antialiased; letter-spacing: -0.02em; line-height: 1.55; font-size: var(--fs-b); }
a { color: inherit; }
.box { width: min(1280px, calc(100% - 2 * var(--pad))); margin: 0 auto; }
.sec { padding-top: clamp(96px, 11vw, 160px); }
.sec:last-of-type { padding-bottom: clamp(96px, 11vw, 160px); }

/* 글자 크기는 다섯 단계만 쓴다 */
.d { font-size: var(--fs-d); font-weight: 800; letter-spacing: -0.05em; line-height: 1.02; }
.h { font-size: var(--fs-h); font-weight: 800; letter-spacing: -0.045em; line-height: 1.2; color: var(--navy); }
.l { font-size: var(--fs-l); font-weight: 600; letter-spacing: -0.03em; line-height: 1.5; }
.s { font-size: var(--fs-s); line-height: 1.55; color: var(--ink-2); }
.p { max-width: 60ch; }
.s { max-width: 72ch; }
.s.note { font-size: 16px; }
/* 타일 밖에 놓인 제목·글은 타일 안 글과 같은 선에서 시작한다 */
.inset { padding-inline: clamp(20px, 2.4vw, 32px); }

/* 보드와 타일 */
.board { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.tile { border-radius: var(--r); padding: clamp(20px, 2.4vw, 32px); background: var(--t1); min-width: 0; }
.tile.dk { background: var(--navy); color: var(--on-dark); } .tile.dk2 { background: var(--navy-2); color: var(--on-dark); } .tile.dk3 { background: var(--navy-3); color: var(--on-dark); }
.tile.or { background: var(--orange); color: var(--navy); } .tile.sk { background: var(--sky); color: var(--navy); }
.tile.t2 { background: var(--t2); } .tile.t3 { background: var(--t3); }
.tile.dk .h, .tile.dk2 .h, .tile.dk3 .h { color: #fff; }
.tile.dk p, .tile.dk2 p, .tile.dk3 p { color: var(--on-dark-2); }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.stack { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }

/* 사진 자리 (사진을 받으면 이 칸을 그대로 사진으로 바꾼다) */
.slot { position: relative; display: flex; align-items: flex-end; border-radius: var(--r); background: var(--t3); color: var(--ink-2); padding: 20px 22px; min-height: 240px; font-size: var(--fs-s); font-weight: 600; overflow: hidden; }
.slot.dk { background: var(--navy-2); color: var(--on-dark-2); }
.slot.ph { padding: 0; background: var(--t3); }
.slot.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* 버튼: 하나의 모양 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: var(--r); font-size: var(--fs-b); font-weight: 800; text-decoration: none; transition: transform .18s ease, background-color .18s ease; }
.btn:hover { transform: translateY(-2px); } .btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.btn-o { background: var(--orange); color: var(--navy); } .btn-o:hover { background: #ff9a26; }
.btn-n { background: var(--navy); color: #fff; } .btn-n:hover { background: var(--navy-2); }
.btn-w { background: #fff; color: var(--navy); } .btn-w:hover { background: var(--t1); }

/* 하위 페이지 머리: 이름 타일 + 설명 타일 */
.phead { padding-top: 24px; }
.phead .board { min-height: clamp(260px, 34vw, 420px); }
.phead .dk { grid-column: span 8; display: flex; flex-direction: column; justify-content: flex-end; }
.phead .tile.sk, .phead .tile.t2, .phead .tile.or { grid-column: span 4; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 20px; }

/* 마무리 타일 줄 (상담 신청) */
.close { padding: clamp(96px, 11vw, 160px) 0; }
.close .board { min-height: 300px; }
.close .side { grid-column: span 2; }
.close .main { grid-column: span 8; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; padding: clamp(28px, 4vw, 48px); }

/* 휴대폰 하단 고정 버튼 */
.fixbar { display: none; }

/* 움직임: 스크립트가 있을 때만 숨겼다가 보여 준다 */
[data-rise="ready"] > * { opacity: 0; transform: translateY(24px); }
[data-rise="in"] > * { opacity: 1; transform: none; transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
[data-rise="in"] > *:nth-child(2) { transition-delay: .07s; } [data-rise="in"] > *:nth-child(3) { transition-delay: .14s; } [data-rise="in"] > *:nth-child(4) { transition-delay: .21s; }
[data-rise="in"] > *:nth-child(5) { transition-delay: .28s; } [data-rise="in"] > *:nth-child(6) { transition-delay: .35s; } [data-rise="in"] > *:nth-child(n+7) { transition-delay: .42s; }
[data-shutter="ready"] { clip-path: inset(0 0 100% 0); }
[data-shutter="in"] { clip-path: inset(0 0 0 0); transition: clip-path 1.1s cubic-bezier(.7,0,.2,1); }
@media (prefers-reduced-motion: reduce) {
  [data-rise] > *, [data-shutter] { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
  .btn { transition: none; }
}

@media (max-width: 900px) {
  .c3, .c4, .c5 { grid-column: span 6; } .c6, .c7, .c8 { grid-column: span 12; }
  .phead .dk, .phead .tile.sk, .phead .tile.t2, .phead .tile.or { grid-column: span 12; }
  .close .side { display: none; } .close .main { grid-column: span 12; }
}
@media (max-width: 560px) {
  .board { gap: 6px; }
  .c3, .c4, .c5 { grid-column: span 12; }
  .fixbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -6px 20px rgba(0,0,0,0.08); /* taste-skill-ignore: 화면 위에 떠 있는 고정 바 */ }
  .fixbar a { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: var(--r); font-size: 16px; font-weight: 800; text-decoration: none; }
  .fixbar a:first-child { background: var(--t2); color: var(--navy); } .fixbar a:last-child { background: var(--orange); color: var(--navy); }
  body { padding-bottom: 72px; }
}

/* 독립 사이트 전용: 머리글(로고·메뉴), 바닥글, 의뢰서 폼, 1:1 문의, 관리자 화면. 색·반경은 common.css 변수를 쓴다 */
[hidden] { display: none !important; }
.hd { position: sticky; top: 0; z-index: 60; background: #fff; }
.hd .in { width: min(1280px, calc(100% - 2 * var(--pad))); margin: 0 auto; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hd .logo { display: flex; align-items: center; }
.hd .logo img { height: 38px; width: auto; display: block; }
.hd nav { display: flex; align-items: center; gap: 4px; }
.hd nav a { padding: 10px 14px; border-radius: var(--r); font-size: 16px; font-weight: 700; color: var(--ink); text-decoration: none; transition: background-color .2s, color .2s; }
.hd nav a:hover { background: var(--t1); color: var(--navy); }
.hd nav a[aria-current="page"] { color: var(--navy); background: var(--t1); }
.hd nav a.cta { margin-left: 8px; background: var(--navy); color: #fff; }
.hd nav a.cta:hover { background: var(--navy-2); color: #fff; }
.hd .menu { display: none; width: 44px; height: 44px; border: 0; border-radius: var(--r); background: var(--t1); color: var(--navy); font: inherit; font-weight: 800; cursor: pointer; }
@media (max-width: 860px) {
  .hd .in { height: 62px; }
  .hd .logo img { height: 30px; }
  .hd .menu { display: inline-flex; align-items: center; justify-content: center; }
  .hd nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px var(--pad) 16px; background: #fff; box-shadow: 0 16px 24px rgba(15,42,82,0.08); /* taste-skill-ignore: 펼친 메뉴 */ }
  .hd[data-open] nav { display: flex; }
  .hd nav a { padding: 14px 12px; font-size: 17px; }
  .hd nav a.cta { margin: 8px 0 0; text-align: center; }
}

.ft { margin-top: clamp(64px, 8vw, 120px); background: var(--t1); color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.ft .in { width: min(1280px, calc(100% - 2 * var(--pad))); margin: 0 auto; padding: 48px 0 40px; display: grid; grid-template-columns: 1fr auto; gap: 28px 48px; align-items: start; }
.ft .nm { font-size: 18px; font-weight: 800; color: var(--navy); letter-spacing: -0.03em; }
.ft .nm small { margin-left: 8px; font-size: 13px; font-weight: 600; color: #5b6577; }
.ft dl { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; }
.ft dl div { display: flex; gap: 6px; }
.ft dt { color: #5b6577; font-weight: 600; }
.ft dd { color: var(--ink); }
.ft .links { display: flex; gap: 10px; flex-wrap: wrap; }
.ft .links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; background: #fff; color: var(--navy); }
.ft .links a.p { background: var(--navy); color: #fff; }
.ft .cp { grid-column: 1 / -1; padding-top: 8px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #5b6577; }
.ft .cp a { color: var(--ink-2); font-weight: 700; text-decoration: none; }
@media (max-width: 760px) { .ft .in { grid-template-columns: 1fr; } }

/* 의뢰서 폼 */
.form { background: var(--t1); border-radius: var(--r); padding: clamp(24px, 4vw, 56px); scroll-margin-top: 90px; }
.form > h2 { margin-bottom: 8px; }
.form > .s { margin-bottom: 32px; max-width: 60ch; }
.fg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 16px; }
.fg .full { grid-column: 1 / -1; }
.fl { display: flex; flex-direction: column; gap: 8px; }
.fl > span { font-size: 15px; font-weight: 700; color: var(--navy); }
.fl > span em { font-style: normal; color: var(--orange); margin-left: 3px; }
.fl input, .fl select, .fl textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--t3); border-radius: var(--r); background: #fff; font: inherit; font-size: 16px; color: var(--ink); transition: border-color .2s; }
.fl textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.fl input:focus, .fl select:focus, .fl textarea:focus { outline: none; border-color: var(--navy); }
.fl .hint { font-size: 13px; color: var(--ink-2); }
.agree { margin-top: 24px; padding: 18px 20px; background: #fff; border-radius: var(--r); font-size: 14px; color: var(--ink-2); }
.agree summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.agree p { margin-top: 10px; }
.check { margin-top: 14px; display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }
.form .send { margin-top: 28px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.form button[type="submit"] { border: 0; cursor: pointer; font: inherit; }
.form button[disabled] { opacity: .6; cursor: wait; }
.msg { font-size: 15px; font-weight: 700; }
.msg[data-k="ok"] { color: #2f7a17; } .msg[data-k="err"] { color: #c0392b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .fg { grid-template-columns: 1fr; } }

/* 1:1 문의 */
.qhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.qlist { list-style: none; display: grid; gap: 6px; }
.qlist li { background: var(--t1); border-radius: var(--r); }
.qlist button { width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 20px clamp(16px, 2.4vw, 28px); border: 0; background: none; border-radius: var(--r); font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.qlist button:hover { background: var(--t2); }
.qlist .t { font-weight: 700; } 
.qlist .m { font-size: 14px; color: var(--ink-2); }
.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; background: #fff; color: var(--ink-2); white-space: nowrap; }
.badge.on { background: var(--sky); color: var(--navy); }
.empty { padding: 48px 8px; text-align: center; color: var(--ink-2); }
.pager { margin-top: 20px; display: flex; gap: 6px; justify-content: center; }
.pager button { min-width: 40px; height: 40px; border: 0; border-radius: var(--r); background: var(--t1); font: inherit; font-weight: 700; cursor: pointer; }
.pager button[aria-current="true"] { background: var(--navy); color: #fff; }
dialog.q { width: min(640px, calc(100% - 32px)); border: 0; border-radius: 10px; padding: clamp(22px, 4vw, 36px); color: var(--ink); }
dialog.q::backdrop { background: rgba(11,31,61,0.5); }
dialog.q h3 { font-size: var(--fs-l); color: var(--navy); margin-bottom: 18px; }
dialog.q .x { float: right; border: 0; background: var(--t1); width: 40px; height: 40px; border-radius: var(--r); font-size: 18px; cursor: pointer; }
.qbody { white-space: pre-wrap; padding: 18px; background: var(--t1); border-radius: var(--r); }
.qans { margin-top: 14px; white-space: pre-wrap; padding: 18px; background: var(--sky); border-radius: var(--r); }
.qans b { display: block; color: var(--navy); margin-bottom: 6px; }

/* 관리자 */
.adm { width: min(1100px, calc(100% - 32px)); margin: 40px auto 80px; }
.adm table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm th, .adm td { padding: 12px 10px; border-bottom: 1px solid var(--t2); text-align: left; vertical-align: top; }
.adm th { background: var(--t1); color: var(--navy); }
.adm .tabs { display: flex; gap: 6px; margin: 24px 0 16px; }
.adm .tabs button { padding: 10px 18px; border: 0; border-radius: var(--r); background: var(--t1); font: inherit; font-weight: 700; cursor: pointer; }
.adm .tabs button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.adm pre { white-space: pre-wrap; font: inherit; }
.adm textarea { width: 100%; min-height: 110px; padding: 10px; border: 1.5px solid var(--t3); border-radius: var(--r); font: inherit; }
.adm .row-b { display: flex; gap: 8px; margin-top: 8px; }
.adm .sm { padding: 8px 14px; border: 0; border-radius: var(--r); background: var(--navy); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.adm .sm.g { background: var(--t2); color: var(--ink); }
