.ep1-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg-label { font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.seg { display: flex; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; background: #fff; }
.seg-btn { border: 0; background: #fff; height: 30px; padding: 0 11px; font-size: 13px; color: var(--fg-2); cursor: pointer; white-space: nowrap; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn[aria-pressed="true"] { background: var(--blue-bg); color: var(--blue); font-weight: 600; }

.ep1-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr) minmax(0, 1.25fr); gap: 22px 22px; align-items: stretch; }
.ep1 .region { transition: opacity .25s ease, background-color .25s ease, border-color .25s ease; }
.ep1[data-view="screen"] .region:not(.screen-r) { opacity: .28; }
.ep1[data-view="inside"] .screen-r { opacity: .28; }

/* DNS */
.dns-table { display: grid; gap: 4px; }
.dns-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 7px; border-radius: 5px; font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-3); flex-wrap: wrap; }
.dns-row.is-target { color: var(--fg); border: 1px solid var(--line); background: #fff; }
.dns-row.is-hit { border-color: var(--blue); color: var(--blue); }
.dns-row.is-found .dns-ip { color: var(--green); font-weight: 600; }

/* 브라우저 미리보기 */
.ep1 .bw-body { padding: 10px; }
.enter-key { flex: none; margin-left: auto; font-family: var(--font-sans); font-size: 11px; font-weight: 600; color: var(--blue); border: 1px solid var(--blue); border-radius: 4px; padding: 0 5px; line-height: 16px; }
.page-area { position: relative; width: 100%; aspect-ratio: 2.3 / 1; }
.lay-canvas { position: relative; width: 100%; aspect-ratio: 1.7 / 1; }
.page-status { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--fg-2); }
.page-status.is-faint { color: var(--fg-3); }
.lb { position: absolute; box-sizing: border-box; display: flex; align-items: center; min-width: 0; overflow: hidden; color: #111; }
.lb-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-card { align-items: flex-start; }
.lb-size { display: none; }

/* 화면에 그려진 페이지 */
.page-area .lb-h1 { font-size: 17px; font-weight: 700; }
.page-area .lb-p { font-size: 13px; }
.page-area .lb-a { font-size: 13px; color: #1a0dab; text-decoration: underline; }
.page-area .lb-card.is-styled { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 10px rgba(28, 45, 60, .08); }
.page-area .lb-h1.is-styled { color: var(--blue); font-size: 18px; }
.page-area .lb-p.is-styled { color: var(--fg-2); }
.page-area .lb-a.is-styled { justify-content: center; background: var(--green); color: #fff; text-decoration: none; border-radius: 6px; font-weight: 600; }
.page-area.is-painted { background: #F7F8FA; border-radius: 6px; }

/* 스타일·배치 캔버스 */
.lay-canvas { background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.lay-none { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; color: var(--fg-3); }
.lay-canvas .lb { font-size: 12px; outline: 1px dashed transparent; }
.lay-canvas .lb-h1 { font-weight: 700; font-size: 13px; }
.lay-canvas .lb-a { color: #1a0dab; text-decoration: underline; }
.lay-canvas .lb-card { border: 1px dashed var(--line-2); }
.lay-canvas .lb-card.is-styled { border: 1px solid var(--line-2); border-radius: 8px; background: #FBFCFE; }
.lay-canvas .lb-h1.is-styled { color: var(--blue); }
.lay-canvas .lb-p.is-styled { color: var(--fg-2); }
.lay-canvas .lb-a.is-styled { justify-content: center; background: var(--green); color: #fff; text-decoration: none; border-radius: 5px; font-weight: 600; }
.lay-canvas.is-measuring .lb:not(.lb-card) { outline-color: var(--blue); }
.lay-canvas.is-measuring .lb-txt { max-width: calc(100% - 52px); }
.lay-canvas .lb-size { display: block; position: absolute; right: 2px; bottom: 1px; font-family: var(--font-mono); font-size: 11px; color: var(--blue); background: rgba(255, 255, 255, .85); padding: 0 2px; border-radius: 3px; }
.lay-canvas .lb-card .lb-size { right: 4px; bottom: 3px; }
.lay-canvas .lb-a .lb-size { display: none; }
.css-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.css-switch { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 4px 2px; font-size: 13px; font-weight: 600; color: var(--fg); cursor: pointer; }
.css-switch:disabled { opacity: .45; cursor: not-allowed; }
.sw-track { position: relative; width: 32px; height: 18px; border-radius: 9px; background: #C7D1DE; transition: background-color .2s; }
.sw-knob { position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.css-switch[aria-checked="true"] .sw-track { background: var(--blue); }
.css-switch[aria-checked="true"] .sw-knob { transform: translateX(14px); }
.css-hint { font-size: 12px; color: var(--fg-3); }

/* 서버 */
.server-r { background: #F5F7FA; border-color: var(--line-2); }
.s-addr { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-2); }
.s-status { margin-top: 4px; font-size: 13px; color: var(--fg-2); }
.s-status.is-ok { color: var(--green); font-weight: 600; }
.s-files { display: flex; gap: 5px; flex-wrap: wrap; margin: 8px 0; }
.file { font-family: var(--font-mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.chip.secure { color: var(--green); border-color: #BFE2D4; background: var(--green-bg); font-family: var(--font-sans); }

/* 받은 자료 */
.src-box { position: relative; border: 1px solid var(--line); border-radius: 6px; padding: 16px 0 5px; background: #fff; transform-origin: center top; }
.css-box { margin-top: 8px; }
.src-tag { position: absolute; top: 2px; left: 8px; font-size: 10.5px; font-weight: 700; color: var(--fg-3); letter-spacing: .04em; }
.src-line { font-family: var(--font-mono); font-size: 12px; line-height: 1.45; padding: 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; color: #2B3D4E; }
.src-line.is-hl { background: var(--blue-bg); color: var(--blue); font-weight: 600; }
.none-note { font-size: 12.5px; color: var(--fg-3); }

/* DOM 스타일 표시 */
.sw { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-sans); font-size: 11.5px; color: var(--fg-2); padding: 0 5px; border-radius: 4px; background: var(--sunk); transform-origin: left center; }
.sw-dot { width: 9px; height: 9px; border-radius: 2px; }
.sw-card { border: 1.5px solid var(--fg-2); border-radius: 3px; }
.sw-h1 { background: var(--blue); }
.sw-a { background: var(--green); }
.n-long { white-space: normal !important; }

@container (max-width: 860px) {
  .ep1-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ep1 .screen-r { grid-column: 1 / -1; order: -1; }
}
@container (max-width: 620px) {
  .ep1-grid { grid-template-columns: 1fr; }
  .ep1 .dns-r { order: 0; } .ep1 .server-r { order: 1; } .ep1 .files-r { order: 2; } .ep1 .dom-r { order: 3; } .ep1 .layout-r { order: 4; }
}
@media (max-width: 760px) { .seg-btn { height: 36px; } }
.seg-sub { margin-left: 5px; font-size: 11.5px; color: var(--fg-3); font-weight: 400; }
.seg-btn[aria-pressed="true"] .seg-sub { color: var(--blue); }
@media (max-width: 760px) { .seg-sub { display: none; } }
