/* 사이트 공통 틀 (그레이 레일): 회색 바탕 위에 떠 있는 둥근 큰 패널 + 왼쪽 검은 아이콘 메뉴.
   각 도구 페이지의 뉴모피즘 변수를 '테두리 선' 모양으로 바꿔 홈 화면과 같은 느낌으로 맞춰요.
   <html>에 data-tool="card|shape|compress|page"를 달면 그 도구 색이 강조색이 돼요. */
:root[data-theme="light"] {
  --base: #ececec; --hi: #f6f6f6; --lo: #d2d2d2; --ink: #1f1f1f; --muted: #7a7a7a; --stage: #e2e2e2;
  --accent: #1f1f1f; --accent-deep: #1f1f1f; --accent-ink: #ffffff;
  --font: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --raise: 0 0 0 1.5px #d6d6d6;
  --raise-sm: 0 0 0 1.5px #d2d2d2;
  --press: inset 0 0 0 1.5px #d0d0d0;
  --line: #d6d6d6; --btn: #f5f5f5; --tool: #7F9CDB;
  color-scheme: light;
}
:root[data-tool="card"] { --tool: #E8893A; }
:root[data-tool="shape"] { --tool: #6F8FD6; }
:root[data-tool="compress"] { --tool: #DE6F7B; }

body { background: #c9c9c9; font-family: var(--font); }

/* 떠 있는 패널 */
.shell { min-height: 100vh; padding: 40px; display: flex; }
.device { flex: 1; max-width: 1560px; margin: 0 auto; display: grid; grid-template-columns: 110px minmax(0, 1fr); min-height: calc(100vh - 80px);
  background: var(--base); border-radius: 40px; box-shadow: 0 40px 80px -20px rgba(0,0,0,.28); }
.screen { min-width: 0; }
.screen > .wrap { padding-top: 34px; }

/* 왼쪽 검은 아이콘 메뉴 */
.rail { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 0; }
.rail svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail .logo { width: 52px; height: 52px; border-radius: 50%; background: #1f1f1f; color: #fff; display: grid; place-items: center; font: 700 20px Poppins, "Noto Sans KR", sans-serif; text-decoration: none; }
.rail nav { background: #1f1f1f; border-radius: 99px; padding: 10px; display: grid; gap: 10px; margin-top: 10px; }
.rail nav a { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; text-decoration: none; position: relative; }
.rail nav a:hover { background: #3a3a3a; }
.rail nav a[aria-current="page"] { background: #fff; color: #1f1f1f; }
.rail nav a::after { content: attr(data-label); position: absolute; left: 58px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: #1f1f1f; color: #fff; font-size: 13px; font-weight: 500; padding: 5px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5; }
.rail nav a:hover::after, .rail nav a:focus-visible::after { opacity: 1; }
.rail .bottom { margin-top: auto; width: 52px; height: 52px; border-radius: 50%; background: #1f1f1f; color: #fff; display: grid; place-items: center; }
.homebar { display: none !important; }

/* 페이지 안: 테두리 선 모양으로 */
h1 .outline { -webkit-text-stroke: 0 !important; color: var(--tool) !important; }
.step, .card, article, .guide { border-radius: 30px !important; }
button, .filebtn, .btn { background: var(--btn); }
button:hover, .filebtn:hover, .btn:hover { box-shadow: 0 0 0 1.5px #b9b9b9; }
button:active, .btn:active { box-shadow: 0 0 0 2px #1f1f1f; }
button[aria-pressed="true"], .shape[aria-pressed="true"], .toggle[aria-pressed="true"], .chip[aria-pressed="true"] { background: #fff; box-shadow: inset 0 0 0 2px var(--tool) !important; color: var(--ink) !important; }
.shape[aria-pressed="true"] svg * { stroke: var(--tool) !important; fill: color-mix(in srgb, var(--tool) 16%, transparent) !important; }
.shape[aria-pressed="true"]::after, .toggle[aria-pressed="true"]::after, .chip[aria-pressed="true"]::after { background: var(--tool) !important; }
.num { background: var(--tool); color: #fff !important; box-shadow: none !important; }
.primary { background: #1f1f1f !important; color: #fff !important; box-shadow: none !important; border-radius: 22px; }
.primary:hover { background: #333 !important; }
input[type="range"]::-webkit-slider-thumb { background: var(--tool) !important; box-shadow: 0 0 0 4px #fff, 0 2px 6px rgba(0,0,0,.2) !important; }
input[type="range"]::-moz-range-thumb { background: var(--tool) !important; }
input[type="range"] { background: #e2e2e2; }
.bar i { background: var(--tool); }
.ad .slot { box-shadow: none; }
.ad.empty .slot { border: 2px dashed #cfcfcf; }
#toast { background: #1f1f1f !important; color: #fff !important; }
a { color: inherit; }

/* 휴대폰·좁은 화면: 메뉴를 위로 */
@media (max-width: 760px) {
  .shell { padding: 10px; }
  .device { grid-template-columns: 1fr; min-height: calc(100vh - 20px); border-radius: 30px; }
  .rail { flex-direction: row; padding: 16px 16px 0; gap: 10px; }
  .rail .logo { width: 44px; height: 44px; font-size: 17px; }
  .rail nav { margin: 0 0 0 auto; display: flex; padding: 6px; gap: 6px; }
  .rail nav a { width: 38px; height: 38px; }
  .rail nav a::after { display: none; }
  .rail svg { width: 18px; height: 18px; }
  .rail .bottom { display: none; }
  .screen > .wrap { padding-top: 14px; }
}
.rail { position: sticky; top: 40px; height: calc(100vh - 80px); align-self: start; }
@media (max-width: 760px) { .rail { position: static; height: auto; } }
