/* 레이아웃: 위 도구줄 / 가운데 격자 작업대 / 오른쪽 꾸미기 패널 */
:root {
  --bg: #eef0f2;
  --panel: #ffffff;
  --ink: #1d2327;
  --muted: #667078;
  --line: #d5d9dd;
  --accent: #0b7285;
  --accent-ink: #ffffff;
  --danger: #c92a2a;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { height: 100dvh; }
body {
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 14px/1.45 "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
}
h1 { font-size: 15px; margin: 0; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
h1 .logo { height: 22px; width: auto; display: block; }
h1 span { color: var(--muted); font-weight: 500; }
h2 { font-size: 15px; margin: 0 0 10px; }
h3 { font-size: 13px; margin: 16px 0 6px; }
.ctrl { display: flex; align-items: center; gap: 6px; }
.ctrl input { width: 56px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.ctrl .x, .hint { color: var(--muted); }
.acts { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.steps { margin: 0; padding: 7px 16px; font-size: 13px; color: var(--muted); background: var(--panel); border-bottom: 1px solid var(--line); }
.steps b {
  display: inline-grid; place-items: center; width: 18px; height: 18px; margin: 0 4px 0 12px;
  border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px;
}
.steps b:first-child { margin-left: 0; }

.btn {
  padding: 6px 12px; border: 1px solid var(--accent); border-radius: 7px;
  background: var(--accent); color: var(--accent-ink); font: inherit; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); margin-top: 6px; width: 100%; }
.btn:hover { filter: brightness(0.95); }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

main { flex: 1; min-height: 0; display: flex; }
#stage { position: absolute; inset: 0; display: flex; overflow: auto; padding: 16px; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#panel { width: 300px; flex: none; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); min-height: 0; }
#inspector { flex: 1; overflow: auto; padding: 14px; -webkit-overflow-scrolling: touch; }
#sheetbtn { display: none; }

/* 격자 */
#board {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  touch-action: none; user-select: none; background-color: #fff;
  background-image:
    linear-gradient(to right, #e3e6e9 1px, transparent 1px),
    linear-gradient(to bottom, #e3e6e9 1px, transparent 1px);
  outline: 1px solid #c5cacf; box-shadow: 0 6px 24px rgba(20, 30, 40, 0.12);
}
.rubber { position: absolute; border: 2px dashed var(--accent); background: rgba(11, 114, 133, 0.14); pointer-events: none; }
.rubber.bad { border-color: var(--danger); background: rgba(201, 42, 42, 0.14); }

.block { position: absolute; overflow: hidden; cursor: grab; box-sizing: border-box; }
.block.sel { outline: 2px solid var(--accent); outline-offset: 1px; overflow: visible; z-index: 2; }
.block.sel > .img, .block.sel > .txt, .block.sel > .tl { overflow: hidden; }
.handle { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; cursor: nwse-resize; z-index: 3; }

.txt { height: 100%; display: flex; flex-direction: column; overflow: hidden; line-height: 1.35; word-break: break-all; white-space: pre-wrap; }
.txt .txin { max-width: 100%; }
.txt span { display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.txt .ph { color: #adb5bd; font-weight: 400; background: none; }

.img { width: 100%; overflow: hidden; }
.img img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.img.empty { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #f1f3f5, #f1f3f5 8px, #e9ecef 8px, #e9ecef 16px); color: #868e96; text-align: center; padding: 4px; }
.cbar { display: flex; height: 25%; }
.cbar i { flex: 1; }

.tl { position: relative; width: 100%; height: 100%; overflow: hidden; }
.tl .line { position: absolute; background: currentColor; }
.tl .line.h { left: 6px; right: 6px; top: 50%; height: 2px; transform: translateY(-50%); }
.tl .line.v { top: 6px; bottom: 6px; width: 2px; transform: translateX(-50%); }
.tl .dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid currentColor; transform: translate(-50%, -50%); }
.tl .lab { position: absolute; transform: translateX(-50%); text-align: center; padding: 0 4px; word-break: break-all; overflow: hidden; max-height: 44%; }
.tl .lab.d { font-weight: var(--wb, 700); }
.tl .vlab b { font-weight: var(--wb, 700); }
.tl .vlab { position: absolute; transform: translateY(-50%); word-break: break-all; }
.tl .vlab b, .tl .vlab span { display: block; }

/* 패널 */
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
.rng { display: inline-flex; align-items: center; gap: 6px; }
.rng input[type=range] { width: 110px; }
.rng output { width: 22px; text-align: right; color: var(--muted); }
input[type=color] { width: 40px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: none; }
textarea, #inspector input:not([type]) { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
textarea { resize: vertical; margin-bottom: 8px; }
.seg { display: flex; margin-bottom: 8px; }
.seg button { flex: 1; padding: 5px 0; border: 1px solid var(--line); background: #fff; font: inherit; cursor: pointer; }
.seg button:first-child { border-radius: 6px 0 0 6px; }
.seg button:last-child { border-radius: 0 6px 6px 0; }
.seg button + button { border-left: 0; }
.seg button.on, .tg.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tgs { display: flex; gap: 6px; margin-bottom: 4px; }
.tg { width: 34px; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; cursor: pointer; }
.tg.b { font-weight: 700; } .tg.i { font-style: italic; } .tg.u { text-decoration: underline; }
.btn + .btn { margin-top: 6px; }
#inspector .btn { width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0 6px; }
.help { padding-left: 18px; margin: 0 0 10px; }
.help li { margin-bottom: 6px; }
.note { color: var(--muted); font-size: 12.5px; margin: 6px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px 2px 3px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; }
.chip i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.chip em { font-style: normal; font-variant-numeric: tabular-nums; }
.tlist { display: grid; gap: 6px; margin: 8px 0; }
.tl-row { display: grid; grid-template-columns: 64px 1fr 26px; gap: 4px; }
.tl-row .x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }

/* 팝업 */
#menu {
  position: fixed; z-index: 20; width: 190px; padding: 8px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}
#menu[hidden], #modal[hidden] { display: none; }
#menu .mt { font-weight: 700; margin: 2px 4px 4px; }
#menu .mg { margin: 8px 4px 2px; font-size: 11.5px; color: var(--muted); }
#menu button { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; text-align: left; font: inherit; cursor: pointer; }
#menu button:hover { background: #e6f4f7; }
#modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(15, 20, 25, 0.5); padding: 16px; }
.card { width: min(560px, 100%); max-height: 100%; overflow: auto; padding: 18px; background: var(--panel); border-radius: 12px; }
.card .prev { display: block; max-width: 100%; max-height: 52vh; margin: 10px auto; border: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bar .btn { width: auto; text-decoration: none; }
.bar .btn + .btn { margin-top: 0; }
#toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 40; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 8px 14px; background: var(--ink); color: #fff; border-radius: 8px; transition: opacity .2s, transform .2s;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* 모바일: 격자는 위, 꾸미기 패널은 아래 시트. 시트는 접을 수 있다. */
@media (pointer: coarse) {
  .handle { width: 26px; height: 26px; right: -13px; bottom: -13px; }
  #menu button { padding: 10px 8px; }
}
@media (max-width: 760px) {
  header { gap: 8px 12px; padding: 8px 12px; }
  .acts { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .acts .btn { flex: none; white-space: nowrap; }
  .hint { display: none; }
  .steps { padding: 6px 12px; font-size: 12px; overflow-x: auto; white-space: nowrap; }
  #stage { padding: 10px; }
  main { flex-direction: column; }
  #panel { width: auto; height: 40%; border-left: 0; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  #panel.collapsed { height: 44px; }
  #panel.collapsed #inspector { display: none; }
  #sheetbtn { display: block; flex: none; width: 100%; height: 44px; border: 0; border-bottom: 1px solid var(--line); background: #f6f7f8; font: inherit; font-weight: 600; color: var(--ink); }
  #menu { max-height: 80vh; overflow: auto; }
  input, textarea, .ctrl input { font-size: 16px; }
  .ctrl input { width: 52px; }
}

/* 팔레트, 테마, 템플릿 */
.sw-t { border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; padding: 2px 4px; }
.sw { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 0 0 8px; padding: 6px; background: #f6f7f8; border-radius: 8px; }
.sw[hidden] { display: none; }
.sq { width: 22px; height: 22px; padding: 0; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 50%; cursor: pointer; }
.sep { width: 1px; height: 18px; background: var(--line); margin: 0 2px; }
.chip { background: none; font: inherit; cursor: pointer; }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.theme, .tpl { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; cursor: pointer; }
.theme.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme em, .tpl em { font-style: normal; font-size: 11.5px; }
.tp { display: flex; gap: 3px; align-items: center; justify-content: center; width: 54px; height: 26px; border: 2px solid; border-radius: 6px; }
.tp i { width: 11px; height: 11px; border-radius: 50%; }
.tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mini-wrap { display: grid; place-items: center; width: 100%; height: 68px; }
.mini { position: relative; display: block; border-radius: 3px; }
.mini i { position: absolute; border: 1px solid; border-radius: 2px; }

.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sdemo { display: flex; gap: 5px; height: 28px; align-items: center; padding: 0 4px 3px 0; }
.sdemo i { width: 20px; height: 22px; background: #ecebe7; box-sizing: border-box; }
.styles .theme em { text-align: center; line-height: 1.25; }
.pcbox { display: grid; gap: 8px; margin-top: 12px; padding: 10px; border: 1px dashed var(--line); border-radius: 8px; }
.pcbox strong { font-size: 13px; }
.pcrow { display: flex; gap: 4px; flex-wrap: wrap; }
.pcrow i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.pcbox .bar { margin-top: 0; }
.pcbox .btn { flex: 1; }
.btn:disabled { opacity: .45; cursor: default; }

.missing { padding: 12px 16px; background: #c92a2a; color: #fff; font-weight: 600; }

.zoom { display: flex; gap: 4px; }
.zoom .btn { padding: 6px 10px; min-width: 38px; }
.fsel { max-width: 150px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
@media (max-width: 760px) {
  h1 { font-size: 13px; gap: 6px; }
  h1 .logo { height: 18px; }
  .steps { display: none; }
  header { padding: 6px 10px; }
  #panel { height: 36%; }
}

.stagewrap { position: relative; flex: 1; min-width: 0; min-height: 0; }
.zoom { position: absolute; left: 12px; bottom: 12px; z-index: 5; background: rgba(255,255,255,.92); padding: 4px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
@media (max-width: 760px) { .zoom { margin-left: 0; } }

.addbar { display: flex; align-items: center; gap: 6px; padding: 6px 16px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap; font-size: 13px; color: var(--muted); }
.addbar .btn { flex: none; padding: 5px 10px; font-size: 13px; }
.addbar .btn:disabled { opacity: .4; cursor: default; }
@media (max-width: 760px) { .addbar { padding: 5px 10px; } }
.card .warn { color: var(--danger); font-weight: 600; }

.cropbox { position: relative; overflow: hidden; margin: 10px auto; border: 1px solid var(--line); background: #eee; touch-action: none; cursor: grab; }
.cropbox img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; user-select: none; }
.tl .dot::after { content: ''; position: absolute; inset: -9px; }
.block.sel .tl .dot { cursor: grab; }
.tl-row { grid-template-columns: 64px 1fr 26px; }
.tl-row .pos { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.tl-row .pos input { flex: 1; }
.chip { position: relative; }
.chip input[type=color] { width: 18px; height: 18px; padding: 0; border: 1px solid rgba(0,0,0,.15); border-radius: 50%; background: none; cursor: pointer; }
.chip input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.chip input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.chip input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
.cthm { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 8px 0; }
.cthm label { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; }
.addbar .sp { width: 1px; height: 18px; background: var(--line); margin: 0 4px; flex: none; }

.twrap { position: relative; display: flex; }
.twrap > .theme { width: 100%; }
.tdel { position: absolute; top: 2px; right: 4px; z-index: 2; width: 18px; height: 18px; line-height: 17px; text-align: center; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; cursor: pointer; }
.tname { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }

.lbl { font-size: 12px; color: var(--muted); margin: 6px 0 3px; }

.tgs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.tg.wide { width: auto; padding: 5px 10px; white-space: nowrap; font-weight: 500; }

.img { position: relative; }
.cap { position: absolute; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; box-sizing: border-box; }
.block.bubble { overflow: visible; background: none; }
.block.bubble.sel { outline-offset: 0; }
.deco { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.bsgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 10px; }
.bsgrid button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 4px 6px; cursor: pointer; font: inherit; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bsgrid button.on { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.bsthumb { position: relative; width: 52px; height: 32px; background: #fff; border-radius: 6px; }
.tails { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.tails button { padding: 6px 2px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font: inherit; font-size: 12px; cursor: pointer; }
.tails button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---- 처음 안내 팝업 ---- */
.intro { position: fixed; inset: 0; z-index: 60; background: rgba(20,22,24,.55); display: flex; align-items: center; justify-content: center; padding: 12px; }
.icard { width: min(460px, 100%); height: min(680px, calc(100dvh - 24px)); background: #f3f2ef; border: 3px solid #141414; border-radius: 20px; box-shadow: 8px 8px 0 #141414; display: flex; flex-direction: column; overflow: hidden; color: #141414; }
.ihead { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 6px; font-size: 14px; color: #5a5a55; }
.ihead b { color: #141414; font-weight: 900; margin-right: 4px; }
.ix { border: 0; background: none; font: inherit; color: #5a5a55; cursor: pointer; padding: 6px 4px; text-decoration: underline; }
.itrack { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.itrack::-webkit-scrollbar { display: none; }
.islide { flex: 0 0 100%; scroll-snap-align: center; overflow-y: auto; }
.iin { padding: 8px 22px 16px; display: flex; flex-direction: column; gap: 14px; }
.ik { font-size: 13px; font-weight: 900; letter-spacing: 2px; color: #0a6b7c; }
.ih { margin: 0; font-size: clamp(30px, 9vw, 40px); line-height: 1.1; font-weight: 900; letter-spacing: -1.5px; }
.ih em { font-style: normal; color: #0a6b7c; }
.ibadge { margin: 0; align-self: flex-start; background: #141414; color: #fff; font-weight: 900; font-size: 15px; padding: 8px 12px; border-radius: 9px; }
.irow { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.ichk { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-weight: 900; font-size: 16px; }
.ichk li { display: flex; align-items: center; gap: 8px; }
.ichk li::before { content: ''; width: 12px; height: 12px; border-radius: 3px; background: #0a6b7c; flex: none; }
.isheet { width: 130px; flex: none; background: #fff; border: 3px solid #141414; border-radius: 16px; padding: 9px; box-shadow: 5px 5px 0 #141414; display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 14px; gap: 3px; }
.isheet i { display: block; border: 1.5px solid #141414; border-radius: 3px; background: #fff; position: relative; font-style: normal; }
.isheet .s1 { grid-column: 1/7; background: #141414; color: #fff; font-size: 6px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.isheet .s2 { grid-column: 1/4; grid-row: 2/5; background: repeating-linear-gradient(135deg, #e4e2dd 0 4px, #f3f2ef 4px 8px); }
.isheet .s3 { grid-column: 4/7; grid-row: 2/4; padding: 4px; display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.isheet .s3 b { height: 2.5px; background: #bdbab3; }
.isheet .s3 b:first-child { background: #141414; width: 70%; }
.isheet .s4 { grid-column: 4/7; grid-row: 4/6; background: #ffe98a; font-size: 8px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.isheet .s5 { grid-column: 1/4; grid-row: 5/7; overflow: hidden; display: flex; flex-direction: column; }
.isheet .s5 u { flex: 3; background: repeating-linear-gradient(135deg, #e4e2dd 0 4px, #f3f2ef 4px 8px); }
.isheet .s5 em { flex: 1; display: flex; }
.isheet .s5 s { flex: 1; }
.isheet .s6 { grid-column: 1/7; grid-row: 7/9; display: flex; align-items: center; justify-content: space-around; }
.isheet .s6::before { content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: #141414; }
.isheet .s6 span { width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid #141414; position: relative; }
.istep { margin: 0; padding: 0; list-style: none; border-bottom: 2px solid #141414; }
.istep li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 2px solid #141414; }
.istep .in { width: 38px; height: 38px; border-radius: 50%; background: #0a6b7c; color: #fff; font-weight: 900; font-size: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.istep b { display: block; font-size: 18px; font-weight: 900; letter-spacing: -.5px; }
.istep small, .icards small { display: block; font-size: 13.5px; color: #5a5a55; font-weight: 700; line-height: 1.45; margin-top: 2px; }
.inote { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; }
.icards { display: flex; gap: 10px; }
.icards > div { flex: 1; background: #fff; border: 2.5px solid #141414; border-radius: 12px; padding: 12px; }
.icards b { font-size: 16px; font-weight: 900; }
.iseed { background: #0a6b7c; color: #fff; border: 3px solid #141414; border-radius: 14px; padding: 16px; box-shadow: 6px 6px 0 #141414; display: flex; flex-direction: column; gap: 8px; }
.iseed .ik { color: #fff; opacity: .9; }
.iseed b { font-size: 26px; font-weight: 900; letter-spacing: -1px; }
.iseed p { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; }
.iseed code { align-self: flex-start; background: #fff; color: #141414; padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.ifoot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 16px; gap: 10px; }
.idots { display: flex; gap: 8px; }
.idot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 2px solid #141414; background: transparent; cursor: pointer; }
.idot.on { background: #141414; }
.inav { min-width: 84px; min-height: 44px; border: 2px solid #141414; border-radius: 10px; background: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.inav.pri { background: #0a6b7c; color: #fff; }

#boardbox { flex: none; margin: auto; position: relative; }
.handle { transform: scale(var(--inv, 1)); }
