/* 세 시안이 함께 쓰는 뼈대. 색·글꼴·액자는 a/b/c 의 theme.css 에서 정합니다. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: leave .28s ease both; }
::view-transition-new(root) { animation: enter .5s ease .12s both; }
.logo { view-transition-name: logo; }
@keyframes leave { to { opacity: 0; } }
@keyframes enter { from { opacity: 0; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--body);
  font-size: 17px; line-height: 1.6; min-height: 100svh; word-break: keep-all; overflow-wrap: anywhere;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.script { font-family: var(--script); font-weight: 400; line-height: 1.25; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ---------- 첫 화면: 스크롤 없이 한 화면 ---------- */
.home { height: 100svh; min-height: 480px; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(14px, 4svh, 48px) 20px clamp(14px, 3svh, 32px); }
.home-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
.home .logo { width: min(400px, 74vw, 52svh); height: auto; }
.since { font-family: var(--small); font-size: clamp(14px, 2.2svh, 18px); letter-spacing: .14em; color: var(--soft); margin-top: clamp(6px, 1.6svh, 18px); }
.motto { font-size: min(var(--motto-size), var(--motto-vw, 9.4vw), 10svh); margin-top: clamp(16px, 6svh, 68px); white-space: nowrap; }
.doors { display: flex; justify-content: center; margin-top: clamp(20px, 6.5svh, 76px); }
.doors a { display: block; min-width: min(220px, 40vw); padding: clamp(10px, 1.8svh, 18px) 12px;
  font-family: var(--menu); font-size: clamp(19px, 3svh, 28px); letter-spacing: .06em; transition: color .25s, background-color .25s, border-color .25s; }
.signature { display: block; padding: 8px 12px; line-height: 1.5; }
.signature strong { display: block; font-family: var(--menu); font-weight: 500; font-size: clamp(20px, 3svh, 26px); letter-spacing: .08em; }
.signature span { display: block; font-family: var(--small); font-size: clamp(13px, 1.9svh, 15px); color: var(--soft); }
.signature em { font-style: normal; white-space: nowrap; }
@media (max-height: 560px) {
  .home { min-height: 340px; padding-block: 12px; }
  .home .logo { width: min(190px, 50vw); }
  .since { margin-top: 2px; }
  .motto { margin-top: 6px; }
  .doors { margin-top: 8px; }
  .doors a { padding-block: 6px; }
  .signature { padding-block: 0; }
}

/* ---------- 안쪽 화면 공통 ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.top .logo { width: 132px; height: auto; }
.top nav { display: flex; gap: clamp(14px, 3vw, 34px); font-family: var(--menu); font-size: 18px; }
.top nav a { padding: 10px 2px; border-bottom: 1px solid transparent; color: var(--soft); }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); border-color: var(--accent); }
.page-head { text-align: center; padding: clamp(48px, 9vw, 112px) 0 clamp(36px, 6vw, 72px); }
.page-head h1 { font-size: clamp(64px, 11vw, 132px); }
.page-head p { max-width: 34em; margin: 8px auto 0; color: var(--soft); }
.section-title { text-align: center; font-size: clamp(38px, 5vw, 56px); }

/* ---------- 대표작: 가운데 정렬, 최대 5점 ---------- */
.featured { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: clamp(30px, 4vw, 44px) clamp(14px, 2.4vw, 32px); }
.featured > li { width: calc((100% - 4 * clamp(14px, 2.4vw, 32px)) / 5); order: var(--seat); }
.featured .frame { aspect-ratio: 5 / 7; }
.featured .caption { text-align: center; }

/* ---------- 일반 작품 ---------- */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; margin: clamp(72px, 10vw, 128px) 0 12px; font-family: var(--menu); font-size: 19px; }
.tabs button, .subtabs button { min-height: 44px; color: var(--soft); border-bottom: 1px solid transparent; }
.tabs button[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); }
.subtabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; font-family: var(--small); font-size: 15px; margin-bottom: 18px; }
.subtabs button[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); }
.sort { display: flex; justify-content: flex-end; gap: 0 18px; margin-bottom: 14px; font-family: var(--small); font-size: 14px; }
.sort button { min-height: 44px; color: var(--soft); border-bottom: 1px solid transparent; }
.sort button[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 36px 20px; align-items: start; }
.grid .frame { aspect-ratio: 3 / 4; }

.work { display: block; width: 100%; text-align: left; }
.frame { display: flex; align-items: center; justify-content: center; transition: transform .35s ease, box-shadow .35s ease; }
.frame .art { width: 100%; height: 100%; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.frame img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.featured .frame img { object-fit: cover; }
button.work:hover .frame { transform: translateY(-2px); }
button.work:hover img { transform: scale(1.025); }
.letter { padding: 10px; text-align: center; font-family: var(--menu); font-size: clamp(15px, 1.7vw, 20px); line-height: 1.35; }
.caption { display: block; padding-top: 12px; line-height: 1.35; }
.caption b { display: block; font-family: var(--menu); font-weight: 500; font-size: 17px; }
.caption i { display: block; font-style: normal; font-family: var(--small); font-size: 13px; color: var(--soft); margin-top: 2px; }
.more { display: block; margin: 56px auto 0; min-height: 48px; padding: 10px 36px; border: 1px solid var(--accent); font-family: var(--menu); font-size: 17px; }
.more:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- 마케팅 ---------- */
.plaques .frame { aspect-ratio: 4 / 5; text-align: center; }
.plaques > li { width: calc((100% - 3 * clamp(14px, 2.4vw, 32px)) / 4); max-width: 260px; }
.plate { padding: 12px; }
.plate b { display: block; font-family: var(--menu); font-weight: 500; font-size: clamp(30px, 4vw, 50px); line-height: 1.1; color: var(--accent); }
.plate span { display: block; margin-top: 10px; font-family: var(--menu); font-size: clamp(15px, 1.6vw, 19px); line-height: 1.35; }
.field { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px 48px; padding: 52px 0; border-bottom: 1px solid var(--rule); }
.field h2 { font-family: var(--menu); font-weight: 500; font-size: clamp(25px, 3vw, 34px); line-height: 1.25; }
.field li { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; padding: 8px 0; }
.field li span:first-child { color: var(--soft); font-family: var(--small); }
.fields { margin-top: clamp(64px, 9vw, 112px); border-top: 1px solid var(--rule); }

/* ---------- 프로필 ---------- */
.profile { max-width: 620px; text-align: center; margin-inline: auto; }
.profile h2 { font-family: var(--menu); font-weight: 500; font-size: 20px; margin: 56px 0 10px; color: var(--accent-text); }
.profile li { padding: 5px 0; }

.foot { margin-top: clamp(80px, 12vw, 150px); padding: 44px 0 56px; border-top: 1px solid var(--rule); text-align: center; }
.foot p.script { font-size: clamp(30px, 4vw, 44px); }
.foot a { display: inline-block; padding: 12px; font-family: var(--small); letter-spacing: .04em; border-bottom: 1px solid var(--accent); }
.foot small { display: block; margin-top: 22px; color: var(--soft); font-family: var(--small); font-size: 12px; }

/* ---------- 크게 보기 ---------- */
dialog { margin: auto; width: min(92vw, 480px); max-height: 90svh; padding: 28px; background: var(--bg); color: var(--ink); border: 1px solid var(--accent); }
dialog::backdrop { background: rgba(8, 7, 6, .84); }
dialog img { margin-inline: auto; max-height: 60svh; width: auto; }
dialog .caption { text-align: center; padding-top: 18px; }
dialog .actions { display: flex; justify-content: center; gap: 24px; margin-top: 12px; }
dialog .actions > * { min-height: 44px; display: inline-flex; align-items: center; border-bottom: 1px solid var(--accent); }

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* ---------- 휴대폰: 작품은 한 줄에 2개 ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .featured > li { width: calc((100% - 14px) / 2); order: 0; max-width: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 14px; }
  .top { flex-direction: column; padding: 16px 0 6px; }
  .field { grid-template-columns: 1fr; padding: 36px 0; }
  .field li { grid-template-columns: 1fr; gap: 0; }
  .tabs { gap: 0 18px; font-size: 17px; }
  .caption b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; transition: none !important; }
}

/* 첫 화면 전용 하단 정보: 한 줄, 좁은 화면에서만 세 줄 */
.legal { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 12px;
  font-family: var(--small); font-size: clamp(14px, 2svh, 16px); line-height: 1.7; color: var(--soft); }
.legal > * + *::before { content: "·"; margin-right: 12px; }
.legal .t { display: inline-block; }
.legal a { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; }
.legal a:hover { color: var(--ink); }
.legal svg { width: 1.15em; height: auto; flex: none; }
@media (max-width: 560px) { .legal { flex-direction: column; } .legal > * + *::before { content: none; } }
/* 글자 명판 대신 건 포스터는 잘리지 않게 전체를 보여 줍니다. */
.plaques .frame img { object-fit: contain; }

/* Music: 분류 버튼 아래에 대표작, 그 아래 일반 작품 */
.picks + .tabs { margin-top: 0; }
.picks { margin-bottom: clamp(48px, 7vw, 88px); }
/* CEO: 직함 / 소속을 한 줄에 하나씩 */
.profile .roles li { padding: 7px 0; font-size: clamp(19px, 2.4vw, 23px); }
.profile .roles b { font-weight: 600; letter-spacing: .02em; }
.profile .roles i { font-style: normal; color: var(--accent); opacity: .65; margin: 0 .8em; }
.profile .roles span { color: var(--soft); white-space: nowrap; }
