:root {
  --bg: #f2f0ec;
  --surface: #fff;
  --surface-2: #f8f7f4;
  --sunken: #efece7;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #6b6860;
  --faint: #716d66;
  --line: #e7e3dc;
  --line-2: #f0ede8;
  --accent: #3b5bdb;
  --accent-soft: #eef1fd;
  --on-ink: #fff;
  --ok: #1f6b48;
  --ok-soft: #e8f6ef;
  --warn: #9a5d00;
  --warn-soft: #fdf3e2;
  --bad: #c13a05;
  --bad-soft: #fdece5;
  --rainbow: linear-gradient(
    90deg,
    #2b4c8c,
    #1f8a9a,
    #3c8a55,
    #c8962e,
    #d0603a,
    #b5395c,
    #6b49a8
  );
  --sans:
    "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui,
    sans-serif;
  --r: 20px;
  --r-sm: 12px;
  --sidebar: 248px;
  --shadow: 0 1px 2px #18181b0a, 0 4px 16px -6px #18181b14;
  --shadow-lg: 0 2px 6px #18181b0d, 0 20px 40px -18px #18181b38;
  --focus: #3b5bdb;
  --stat-bg: #fff;
  --bar-bg: #ffffffeb;
  --stage: #fff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121317;
    --surface: #1b1d23;
    --surface-2: #22252c;
    --sunken: #262a32;
    --ink: #f2f2f4;
    --ink-2: #d0d0d6;
    --muted: #a6a8b0;
    --faint: #9193a0;
    --line: #2f333c;
    --line-2: #272a32;
    --accent: #8ea6ff;
    --accent-soft: #252c44;
    --on-ink: #121317;
    --ok: #6fd1a0;
    --ok-soft: #1c3328;
    --warn: #e6b45c;
    --warn-soft: #3a2e17;
    --bad: #ff9a73;
    --bad-soft: #3b231a;
    --shadow: 0 1px 2px #0006, 0 6px 20px -8px #00000080;
    --shadow-lg: 0 20px 40px -18px #000000b3;
    --focus: #8ea6ff;
    --stat-bg: #1b1d23;
    --bar-bg: #1b1d23eb;
    --stage: #22252c;
  }
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html,
body {
  max-width: 100%;
  overflow-x: clip;
}
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.15px;
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}
button,
select,
input,
textarea {
  touch-action: manipulation;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 10px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
svg {
  display: block;
}
a {
  color: var(--accent);
}
.muted {
  color: var(--muted);
}
.hint {
  color: var(--muted);
  margin: 6px 0;
  font-size: 12.5px;
  line-height: 1.5;
}
.hint.bad,
.bad {
  color: var(--bad);
}
.hint.center {
  text-align: center;
  margin: 18px 0;
}
.pad {
  padding: 16px 18px;
}
.sidebar {
  width: var(--sidebar);
  z-index: 40;
  padding: calc(22px + env(safe-area-inset-top)) 14px 16px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  flex-direction: column;
  gap: 12px;
  display: flex;
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
}
.brand {
  text-align: left;
  cursor: pointer;
  background: 0 0;
  border: 0;
  border-radius: 14px;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin: 0 0 2px;
  padding: 2px 8px 14px;
  display: flex;
}
.brand:hover .brand-name {
  text-underline-offset: 3px;
  text-decoration: underline;
}
.brand > span:last-child {
  display: block;
}
.brand-logo {
  border-radius: 50%;
  flex: none;
  width: 44px;
  height: 44px;
  box-shadow: 0 1px 4px #00000047;
}
.about-logo {
  border-radius: 50%;
  width: 112px;
  height: 112px;
  margin: 2px auto 10px;
  display: block;
  box-shadow: 0 2px 10px #00000047;
}
.brand-ver {
  background: var(--sunken);
  color: var(--muted);
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: 1px;
  border-radius: 999px;
  margin-left: 4px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
}
.page-heading .eyebrow {
  display: none;
}
@media (max-width: 900px) {
  .page-heading .eyebrow {
    display: block;
  }
}
.brand-name {
  letter-spacing: -0.4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  display: block;
}
.brand-sub {
  color: var(--muted);
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 500;
  display: block;
}
.side-nav {
  flex-direction: column;
  gap: 2px;
  display: flex;
}
.nav-group {
  color: var(--faint);
  letter-spacing: 0.2px;
  margin: 16px 12px 6px;
  font-size: 11px;
  font-weight: 700;
}
.nav-group:first-child {
  margin-top: 0;
}
.side-nav button {
  width: 100%;
  min-height: 44px;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
  background: 0 0;
  border: 0;
  border-radius: 13px;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
}
.side-nav button svg,
.bottom-bar svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7px;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  width: 20px;
  height: 20px;
}
.side-nav button:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.side-nav button.on {
  background: var(--ink);
  color: var(--on-ink);
}
.sync-panel {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  margin-top: auto;
  padding: 12px 14px;
  font-size: 12.5px;
}
.sync-panel b {
  font-size: 13px;
}
.sync-panel .hint {
  margin: 4px 0 8px;
}
.scrim {
  z-index: 35;
  background: #0a0a0e73;
  display: none;
  position: fixed;
  inset: 0;
}
.main {
  margin-left: var(--sidebar);
  min-height: 100vh;
}
.topbar {
  z-index: 20;
  padding: calc(14px + env(safe-area-inset-top)) 28px 12px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  gap: 12px;
  display: flex;
  position: sticky;
  top: 0;
}
.menu-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  width: 44px;
  height: 44px;
  box-shadow: var(--shadow);
  cursor: pointer;
  border-radius: 14px;
  place-items: center;
  display: none;
}
.menu-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.8px;
  stroke-linecap: round;
}
.page-heading {
  flex: 1;
  min-width: 0;
}
.eyebrow {
  color: var(--faint);
  letter-spacing: 0.3px;
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
}
.page-heading h1 {
  letter-spacing: -0.8px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}
.sync-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 999px;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
}
.sync-chip:before {
  content: "";
  background: var(--ok);
  border-radius: 50%;
  width: 7px;
  height: 7px;
}
.sync-chip.need:before {
  background: #e08a00;
}
.content {
  max-width: 1080px;
  padding: 6px 28px 60px;
}
.bottom-bar {
  display: none;
}
@media (max-width: 900px) {
  .sidebar {
    box-shadow: var(--shadow-lg);
    width: min(300px, 86vw);
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
    transform: translate(-102%);
  }
  body.drawer-open .sidebar {
    transform: none;
  }
  body.drawer-open .scrim {
    display: block;
  }
  .main {
    margin-left: 0;
  }
  .menu-btn {
    display: grid;
  }
  .topbar {
    padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .content {
    padding: 4px 14px calc(110px + env(safe-area-inset-bottom));
  }
  .bottom-bar {
    z-index: 30;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    background: var(--bar-bg);
    -webkit-backdrop-filter: saturate(1.5) blur(16px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    border-radius: 24px;
    gap: 2px;
    padding: 6px;
    display: flex;
    position: fixed;
  }
  .bottom-bar button {
    min-height: 54px;
    color: var(--ink-2);
    cursor: pointer;
    background: 0 0;
    border: 0;
    border-radius: 18px;
    flex-direction: column;
    flex: 1;
    justify-content: center;
    align-items: center;
    gap: 3px;
    padding: 8px 2px;
    font-size: 10.5px;
    font-weight: 700;
    display: flex;
  }
  .bottom-bar button.on {
    background: var(--ink);
    color: var(--on-ink);
  }
}
.input {
  border-radius: var(--r-sm);
  background: var(--sunken);
  border: 1px solid #0000;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
}
.input:focus {
  background: var(--surface);
  border-color: var(--line);
}
.input::placeholder {
  color: var(--faint);
}
textarea.input {
  resize: vertical;
  min-height: 84px;
}
select.input {
  appearance: auto;
}
.field {
  gap: 5px;
  display: grid;
}
.flabel {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
}
.fhint {
  color: var(--muted);
  font-size: 12px;
}
.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 46px;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  border-radius: 14px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  font-size: 14.5px;
  font-weight: 700;
  transition:
    background 0.12s,
    transform 50ms;
  display: inline-flex;
}
.btn svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9px;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 18px;
  height: 18px;
}
.btn:active {
  transform: translateY(1px);
}
.btn:hover {
  background: var(--surface-2);
}
.btn.primary {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
}
.btn.primary:hover {
  background: var(--ink);
  filter: brightness(1.2);
}
.btn.outline {
  background: 0 0;
}
.btn.danger {
  color: var(--bad);
  border-color: var(--bad);
  background: 0 0;
}
.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}
.chip {
  white-space: nowrap;
  background: var(--sunken);
  min-height: 36px;
  color: var(--ink);
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 700;
}
.chip:hover {
  filter: brightness(0.97);
}
.chip.danger {
  color: var(--bad);
}
.chip.primary {
  background: var(--ink);
  color: var(--on-ink);
}
.icon-btn {
  cursor: pointer;
  background: 0 0;
  border: 0;
  border-radius: 12px;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  display: grid;
}
.icon-btn svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9px;
  stroke-linecap: round;
  width: 20px;
  height: 20px;
}
.stack {
  gap: 12px;
  display: grid;
}
.row {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  display: grid;
}
.row2 {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  display: grid;
}
.bar {
  align-items: center;
  gap: 8px;
  display: flex;
}
.bar .input {
  flex: 1;
}
.opts {
  border: 0;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  display: flex;
}
.opts legend {
  color: var(--ink-2);
  margin-bottom: 4px;
  padding: 0;
  font-size: 12.5px;
  font-weight: 700;
}
.opts label {
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: 14.5px;
  display: inline-flex;
}
.opts input {
  width: 20px;
  height: 20px;
  accent-color: var(--ink);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  gap: 12px;
  margin: 0 0 16px;
  padding: 18px;
  display: grid;
}
.panel h2,
.card h2 {
  letter-spacing: -0.5px;
  font-size: 19px;
  font-weight: 800;
}
.hero {
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: 26px;
  margin-bottom: 18px;
  padding: 26px 26px 20px;
}
.hero-kicker {
  letter-spacing: 1.6px;
  background: var(--rainbow);
  color: #0000;
  -webkit-background-clip: text;
  background-clip: text;
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}
.hero h2 {
  letter-spacing: -1.4px;
  margin: 6px 0;
  font-size: clamp(25px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.15;
}
.lede {
  color: var(--muted);
  max-width: 600px;
  margin: 0 0 16px;
  font-size: 14px;
}
.palette {
  background: var(--sunken);
  border-radius: 16px;
  height: 84px;
  margin: 0 0 8px;
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #0000000d;
}
.palette i {
  flex: 1 1 0;
  min-width: 0;
  transition: flex-grow 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.palette i:hover {
  flex-grow: 7;
}
.palette-caption {
  color: var(--muted);
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 16px;
  font-size: 11.5px;
  display: flex;
}
.stats {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  display: grid;
}
.stat {
  --c: #3b5bdb;
  background: color-mix(in srgb, var(--c) 9%, var(--stat-bg));
  border-radius: 16px;
  min-width: 0;
  padding: 14px 15px;
}
.stat b {
  letter-spacing: -1px;
  color: var(--c);
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  display: block;
}
.stat span {
  color: var(--ink-2);
  margin-top: 7px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  display: block;
}
.stat:first-child {
  --c: #2b4c8c;
}
.stat:nth-child(2) {
  --c: #1f8a9a;
}
.stat:nth-child(3) {
  --c: #3c8a55;
}
.stat:nth-child(4) {
  --c: #b0700f;
}
.stat:nth-child(5) {
  --c: #b5395c;
}
.stat:nth-child(6) {
  --c: #6b49a8;
}
@media (prefers-color-scheme: dark) {
  .stat:first-child {
    --c: #8eb0ff;
  }
  .stat:nth-child(2) {
    --c: #5fd0e0;
  }
  .stat:nth-child(3) {
    --c: #78d79a;
  }
  .stat:nth-child(4) {
    --c: #f0b550;
  }
  .stat:nth-child(5) {
    --c: #ff8fb0;
  }
  .stat:nth-child(6) {
    --c: #b79cff;
  }
}
@media (max-width: 900px) {
  .hero {
    border-radius: 22px;
    padding: 20px 16px 16px;
  }
  .palette {
    height: 64px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat {
    padding: 11px 12px;
  }
  .stat b {
    font-size: 24px;
  }
  .stat span {
    font-size: 10.8px;
  }
}
.start {
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-lg);
}
.start h2 {
  font-size: 21px;
}
.start ol {
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}
.start .step-n {
  background: var(--ink);
  width: 26px;
  height: 26px;
  color: var(--on-ink);
  border-radius: 50%;
  place-items: center;
  margin-right: 8px;
  font-size: 13px;
  font-weight: 800;
  display: inline-grid;
}
.start-actions {
  flex-wrap: wrap;
  gap: 8px;
  display: flex;
}
.list-head {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 6px 0 4px;
  display: flex;
}
.sort-bar {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 6px;
  display: flex;
}
.sort-lab {
  color: var(--muted);
  margin-right: 2px;
  font-size: 12px;
  font-weight: 700;
}
.sort-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 999px;
  min-height: 36px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
}
.sort-chip.on {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
}
.count {
  color: var(--muted);
  margin: 4px 2px 10px;
  font-size: 12.5px;
}
.grp-h {
  letter-spacing: -0.3px;
  align-items: center;
  gap: 8px;
  margin: 22px 2px 10px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
}
.grp-dot {
  background: var(--muted);
  border-radius: 50%;
  width: 12px;
  height: 12px;
  box-shadow: inset 0 0 0 1px #0000001f;
}
.grp-n {
  color: var(--muted);
  background: var(--sunken);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 11.5px;
  font-weight: 700;
}
.grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  display: grid;
}
@media (min-width: 901px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (min-width: 1180px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.card-body {
  gap: 3px;
  padding: 12px 14px 14px;
  display: grid;
}
.ink-brand,
.brand-line {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.name {
  letter-spacing: -0.3px;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.3;
}
.meta {
  color: var(--muted);
  font-size: 12.5px;
}
.card.clickable {
  cursor: pointer;
  flex-direction: column;
  transition:
    box-shadow 0.15s,
    transform 0.15s;
  display: flex;
}
.card.clickable:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}
.card.clickable .card-body {
  flex-direction: column;
  flex: 1;
  display: flex;
}
.name-btn {
  all: unset;
  cursor: pointer;
  letter-spacing: -0.3px;
  border-radius: 6px;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.3;
}
.name-btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.actions {
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: auto;
  padding-top: 10px;
  display: grid;
}
.actions .chip {
  width: 100%;
  min-height: 30px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 700;
}
.actions .chip.wide {
  grid-column: 1/-1;
  min-height: 32px;
}
@media (max-width: 900px) {
  .actions {
    gap: 4px;
  }
  .actions .chip {
    padding: 0 1px;
    font-size: 11.5px;
  }
  .card-body {
    padding: 10px 11px 12px;
  }
  .name,
  .name-btn {
    font-size: 14.5px;
  }
}
.pen-card .pen-foot {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  display: flex;
}
.pen-stage {
  background: radial-gradient(120% 120% at 50% 0%, var(--stage), var(--sunken));
  place-items: center;
  height: 150px;
  padding: 0 18px;
  display: grid;
  position: relative;
}
.pen-card[data-state="filled"] .pen-stage {
  background: radial-gradient(
    120% 140% at 85% 50%,
    color-mix(in srgb, var(--c-ink) 24%, var(--stage)),
    var(--surface-2) 70%
  );
}
.pen-stage.has-photo {
  background: var(--stage);
}
.pen-stage.has-photo .pen-art {
  display: none;
}
.pen-art {
  filter: drop-shadow(0 6px 8px #0000002e);
  width: 100%;
  max-width: 230px;
  height: auto;
}
.nib-badge {
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 800;
  position: absolute;
  top: 10px;
  left: 12px;
}
.photo-badge {
  z-index: 1;
  font-size: 11px;
  position: absolute;
  top: 10px;
  right: 12px;
}
.cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
}
.state-pill {
  background: var(--sunken);
  color: var(--muted);
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
}
.state-pill:before {
  content: "";
  background: currentColor;
  border-radius: 50%;
  width: 6px;
  height: 6px;
}
.state-pill.filled {
  background: var(--ok-soft);
  color: var(--ok);
}
.state-pill.uncertain {
  background: var(--warn-soft);
  color: var(--warn);
}
.pen-ink {
  color: var(--ink-2);
  align-items: center;
  gap: 7px;
  font-size: 13px;
  display: flex;
}
.pen-ink b {
  font-weight: 700;
}
.pen-none {
  color: var(--muted);
}
.dot {
  border: 1px solid var(--line);
  border-radius: 50%;
  flex: none;
  width: 12px;
  height: 12px;
  display: inline-block;
}
.ink-tile {
  aspect-ratio: 4/3;
  background-color: var(--c-ink);
  justify-content: space-between;
  align-items: flex-end;
  gap: 6px;
  padding: 10px;
  display: flex;
  position: relative;
  overflow: hidden;
}
.ink-tile:after {
  content: "";
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 20% 10%, #ffffff4d, #0000 55%),
    linear-gradient(#0000 55%, #00000038);
  position: absolute;
  inset: 0;
}
.ink-tile.has-photo:after {
  background: linear-gradient(#0000 60%, #00000047);
}
[data-fx="sheen"] .ink-tile:before {
  content: "";
  z-index: 1;
  mix-blend-mode: screen;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    #0000 35%,
    #dc3c5a80 50%,
    #ffc85a59 58%,
    #0000 70%
  );
  position: absolute;
  inset: 0;
}
[data-fx="shimmer"] .ink-tile:before {
  content: "";
  z-index: 1;
  opacity: 0.75;
  pointer-events: none;
  background-image:
    radial-gradient(#ffffffe6 1px, #0000 1.6px),
    radial-gradient(#ffe6a0cc 1px, #0000 1.6px);
  background-position:
    0 0,
    7px 9px;
  background-size:
    14px 14px,
    22px 22px;
  position: absolute;
  inset: 0;
}
.ink-hue,
.ink-fx {
  z-index: 2;
  color: #fff;
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
  text-overflow: ellipsis;
  background: #0006;
  border-radius: 999px;
  max-width: 100%;
  padding: 3px 9px;
  font-size: 10.8px;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}
.ink-fx {
  color: #18181b;
  background: #ffffffeb;
}
.tag {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  margin-left: 8px;
  padding: 1px 9px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-block;
}
.empty-box {
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r);
  justify-items: center;
  gap: 12px;
  padding: 34px 18px;
  display: grid;
}
.empty-box .empty-ic svg {
  width: 120px;
  height: auto;
}
.empty-box p {
  max-width: 36ch;
}
.shortcut {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  width: 100%;
  box-shadow: var(--shadow);
  cursor: pointer;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px 16px;
  font-size: 14.5px;
  display: flex;
}
.shortcut b {
  font-weight: 800;
}
.shortcut small {
  color: var(--muted);
  margin-top: 1px;
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.seg {
  background: var(--sunken);
  border-radius: 16px;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  display: grid;
}
.seg button {
  cursor: pointer;
  min-height: 42px;
  color: var(--muted);
  background: 0 0;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
}
.seg button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.reco {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}
@media (min-width: 901px) {
  .reco {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.reco-row {
  gap: 14px;
  padding: 16px 18px;
  display: flex;
}
.rank {
  background: var(--sunken);
  width: 32px;
  height: 32px;
  color: var(--muted);
  border-radius: 50%;
  flex: none;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  display: grid;
}
.reco-row[data-rank="1"] .rank {
  background: var(--ink);
  color: var(--on-ink);
}
.reco-row:has(.reco-lead) {
  align-items: center;
}
.reco-lead {
  flex: none;
  place-items: center;
  width: 72px;
  display: grid;
  position: relative;
}
.swatch {
  all: unset;
  cursor: zoom-in;
  border-radius: 14px;
  line-height: 0;
  transition: transform 0.15s;
  display: block;
}
.swatch:hover {
  transform: scale(1.06);
}
.swatch:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.drop-svg {
  filter: drop-shadow(0 4px 5px #00000038);
  display: block;
}
.rank.on-drop {
  border: 2px solid var(--surface);
  width: 26px;
  height: 26px;
  font-size: 13px;
  position: absolute;
  top: -4px;
  left: -8px;
  box-shadow: 0 1px 4px #00000040;
}
.reco-lead.wide {
  width: 104px;
}
.pen-thumb {
  all: unset;
  cursor: zoom-in;
  background: radial-gradient(120% 120% at 50% 0%, var(--stage), var(--sunken));
  width: 96px;
  height: 72px;
  box-shadow:
    inset 0 0 0 1px var(--line),
    var(--shadow);
  border-radius: 16px;
  place-items: center;
  transition: transform 0.15s;
  display: grid;
  position: relative;
  overflow: hidden;
}
.pen-thumb:hover {
  transform: scale(1.05);
}
.pen-thumb:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.pen-thumb img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.pen-thumb .pen-art {
  filter: drop-shadow(0 3px 4px #0003);
  width: 86%;
  height: auto;
}
.zoom-pen {
  background: radial-gradient(120% 120% at 50% 0%, var(--stage), var(--sunken));
  border-radius: 16px;
  place-items: center;
  padding: 28px 12px;
  display: grid;
}
.zoom-pen .pen-art {
  width: 100%;
  max-width: 340px;
  height: auto;
}
.base-card {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--r);
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  display: grid;
}
.base-top {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  display: grid;
}
.base-main {
  gap: 4px;
  min-width: 0;
  display: grid;
}
.base-name {
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 15px;
  display: flex;
}
.base-name .lbl,
.base-line .lbl {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
}
.base-line {
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 14px;
  display: flex;
}
.base-toggle {
  white-space: nowrap;
  align-self: start;
}
.base-drop {
  all: unset;
  cursor: zoom-in;
  line-height: 0;
  display: block;
}
.base-drop:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.base-card .pen-thumb {
  width: 84px;
  height: 64px;
}
.base-media {
  align-items: center;
  gap: 8px;
  display: flex;
}
.cur-drop {
  all: unset;
  cursor: zoom-in;
  border-radius: 12px;
  line-height: 0;
  transition: transform 0.15s;
  display: block;
}
.cur-drop:hover {
  transform: scale(1.07);
}
.cur-drop:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.user-pens {
  flex-wrap: wrap;
  gap: 8px;
  display: flex;
}
.user-pen {
  all: unset;
  cursor: zoom-in;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 14px;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  font-size: 13.5px;
  display: inline-flex;
}
.user-pen:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.user-thumb {
  background: radial-gradient(120% 120% at 50% 0%, var(--stage), var(--sunken));
  border-radius: 10px;
  place-items: center;
  width: 56px;
  height: 42px;
  display: grid;
  position: relative;
  overflow: hidden;
}
.user-thumb img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.user-thumb .pen-art {
  width: 86%;
  height: auto;
}
.ink-missing {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 12px;
  gap: 6px;
  padding: 10px 12px;
  font-size: 13.5px;
  display: grid;
}
.ink-missing p {
  margin: 0;
}
.base-detail {
  border-top: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  gap: 6px;
  padding-top: 10px;
  display: grid;
}
.base-detail h3 {
  color: var(--ink-2);
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}
.base-all {
  font-size: 12.5px;
}
.wash-hint {
  background: var(--warn-soft);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent);
  border-radius: 12px;
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
}
.sumview {
  gap: 6px;
  min-height: 56px;
  padding-right: 64px;
  font-size: 14px;
  display: grid;
  position: relative;
}
.chips-row {
  flex-wrap: wrap;
  gap: 5px;
  display: flex;
}
.mchip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}
.mini-photo {
  all: unset;
  cursor: zoom-in;
  width: 56px;
  height: 56px;
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 12px;
  position: absolute;
  top: 0;
  right: 0;
  overflow: hidden;
}
.mini-photo img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}
.mini-photo:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.mine {
  background: var(--surface-2);
  border-radius: 10px;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  padding: 6px 10px;
  font-size: 12.8px;
  display: flex;
}
.mine .link-btn {
  font-size: 12.8px;
}
.delta {
  border-radius: 999px;
  margin-left: 8px;
  padding: 1px 8px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-block;
}
.delta.up {
  background: var(--ok-soft);
  color: var(--ok);
}
.delta.down {
  background: var(--warn-soft);
  color: var(--warn);
}
@media (max-width: 520px) {
  .base-media {
    flex-direction: column;
    gap: 6px;
  }
  .base-card .base-media .pen-thumb {
    width: 72px;
    height: 54px;
  }
  .user-thumb {
    width: 48px;
    height: 36px;
  }
  .base-top {
    grid-template-columns: auto 1fr;
  }
  .base-toggle {
    grid-column: 1/-1;
    justify-self: start;
  }
}
.zoom-drop {
  background: var(--sunken);
  border-radius: 16px;
  place-items: center;
  padding: 24px;
  display: grid;
}
.reco-main {
  flex: 1;
  gap: 6px;
  min-width: 0;
  display: grid;
}
.reco-card-info {
  background: var(--sunken);
  border-radius: 12px;
  padding: 9px 11px;
  gap: 7px;
  display: grid;
  font-size: 12.5px;
}
.reco-card-line {
  align-items: flex-start;
  gap: 7px;
  display: flex;
}
.reco-card-line > b {
  flex: none;
  min-width: 66px;
  color: var(--muted);
}
.reco-card-warning {
  color: var(--warn);
}
.reco-ink-traits {
  flex-wrap: wrap;
  gap: 4px;
  display: flex;
}
.reco-ink-traits .tag {
  min-height: 22px;
  padding: 2px 8px;
  font-size: 11.5px;
}
.swap-pen {
  margin: 0;
  font-size: 16px;
}
.swap-line {
  background: var(--sunken);
  border-radius: 14px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  display: flex;
}
.swap-arrow {
  color: var(--muted);
  font-weight: 800;
}
.swap-from,
.swap-to {
  align-items: center;
  gap: 6px;
  display: inline-flex;
}
.swap-line .dot {
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: inline-block;
  box-shadow: inset 0 0 0 1px #00000040;
}
.fld {
  gap: 6px;
  font-size: 13.5px;
  display: grid;
}
.seg-fs {
  border: 0;
  gap: 6px;
  margin: 0;
  padding: 0;
  display: grid;
}
.seg-fs legend {
  margin-bottom: 4px;
  padding: 0;
  font-size: 13.5px;
}
.radio {
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.45;
  display: flex;
}
.radio input {
  margin-top: 3px;
}
.facts-plan {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 14px;
  gap: 10px;
  padding: 12px;
  display: grid;
}
.facts-list {
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}
.fact {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 12px;
  gap: 6px;
  padding: 10px 12px;
  display: grid;
}
.fact.same,
.fact.blocked {
  opacity: 0.75;
}
.fact-head {
  cursor: pointer;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  display: flex;
}
.fact-head input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
}
.fact-head .dot {
  vertical-align: -2px;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: inline-block;
  box-shadow: inset 0 0 0 1px #00000040;
}
.fact-meta {
  flex-wrap: wrap;
  gap: 4px 6px;
  display: flex;
}
.fact-meta .tag {
  margin-left: 0;
}
.tag.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.fact-ev {
  border-left: 3px solid var(--line);
  color: var(--muted);
  word-break: break-word;
  margin: 0;
  padding: 6px 10px;
  font-size: 12.5px;
  line-height: 1.5;
}
.facts-done {
  background: var(--ok-soft);
  color: var(--ink);
  border-radius: 14px;
  gap: 8px;
  padding: 12px;
  display: grid;
}
.facts-done p {
  margin: 0;
}
.reco-click {
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.reco-click:hover {
  box-shadow: var(--shadow-lg);
}
.bar-score {
  background: var(--sunken);
  height: 8px;
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.bar-score span {
  background: var(--faint);
  border-radius: 99px;
  height: 100%;
  display: block;
  box-shadow: inset 0 0 0 1px #80808066;
}
.score {
  color: var(--muted);
  font-size: 12.5px;
}
.score b {
  color: var(--ink);
  font-size: 15px;
}
.why,
.warn {
  gap: 3px;
  margin: 2px 0;
  padding: 0;
  font-size: 12.8px;
  list-style: none;
  display: grid;
}
.why li,
.warn li {
  padding-left: 20px;
  position: relative;
}
.why {
  color: var(--ok);
}
.why li:before {
  content: "✓";
  font-weight: 800;
  position: absolute;
  left: 2px;
}
.warn {
  color: var(--warn);
}
.warn li:before {
  content: "!";
  font-weight: 900;
  position: absolute;
  left: 6px;
}
.log {
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}
.log-title {
  font-size: 14.5px;
}
.test-photo {
  background: var(--sunken);
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
  display: block;
  overflow: hidden;
}
.test-photo img {
  object-fit: cover;
  width: 100%;
  max-height: 200px;
  display: block;
}
.dt {
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  margin: 0;
  font-size: 14px;
  display: grid;
}
.dt dt {
  color: var(--muted);
  padding-top: 2px;
  font-size: 12.5px;
  font-weight: 700;
}
.dt dd {
  overflow-wrap: anywhere;
  min-width: 0;
  margin: 0;
}
.pre {
  white-space: pre-line;
}
.dt-h {
  color: var(--ink-2);
  margin: 4px 0 6px;
  font-size: 13px;
  font-weight: 800;
}
.dt-list {
  gap: 4px;
  margin: 0 0 6px;
  padding: 0;
  font-size: 13.5px;
  list-style: none;
  display: grid;
}
.dt-list li {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  display: flex;
}
.dt-list small {
  color: var(--muted);
}
.dt-list b {
  font-variant-numeric: tabular-nums;
}
.dt-actions {
  flex-wrap: wrap;
  gap: 8px;
  display: flex;
}
.dt-actions .btn {
  flex: auto;
}
.dt-swatch {
  border-radius: 12px;
  height: 44px;
  box-shadow: inset 0 0 0 1px #00000014;
}
.plain-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.plain-list .list-row {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}
.plain-list .list-row small {
  display: block;
}
.now-box {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--r);
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 14px;
  padding: 14px 16px;
  display: flex;
}
.now-box .lbl {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.now-box .pen-ink {
  font-size: 14.5px;
}
.tag.cur {
  background: var(--ok-soft);
  color: var(--ok);
}
button.stat {
  text-align: left;
  cursor: pointer;
  width: 100%;
  font: inherit;
  border: 0;
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}
button.stat:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
button.stat:active {
  transform: none;
}
.sec {
  letter-spacing: -0.4px;
  margin: 22px 0 10px;
  font-size: 17px;
  font-weight: 800;
}
.plan {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.plan th,
.plan td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
}
.plan td:not(:first-child),
.plan th:not(:first-child) {
  text-align: right;
}
.plan-list {
  color: var(--muted);
  margin: 6px 0 0;
  padding-left: 20px;
  font-size: 13px;
}
details summary {
  cursor: pointer;
  min-height: 32px;
  font-weight: 700;
}
.usage-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  display: grid;
}
.usage-stat {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 14px 16px;
}
.usage-stat b {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  display: block;
}
.usage-stat span {
  color: var(--muted);
  margin-top: 6px;
  font-size: 12px;
  display: block;
}
.ai-card {
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}
.ai-card > summary {
  cursor: pointer;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  list-style: none;
  display: flex;
}
.ai-card > summary::-webkit-details-marker {
  display: none;
}
.ai-card > summary b {
  font-size: 14.5px;
  font-weight: 800;
}
.ai-card > summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.ai-ic {
  background: var(--sunken);
  border-radius: 12px;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 19px;
  display: grid;
}
.ai-body {
  gap: 10px;
  padding: 4px 16px 16px;
  display: grid;
}
.ai-steps {
  color: var(--ink-2);
  gap: 4px;
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  display: grid;
}
.ai-note {
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 12px;
}
.ai-msg {
  white-space: pre-line;
  font-size: 13px;
}
.ai-msg.ok {
  color: var(--ok);
}
.ai-msg.bad {
  color: var(--bad);
}
.ai-result {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}
.banner {
  background: var(--warn-soft);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--warn) 25%, var(--line));
  border-radius: var(--r);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  font-size: 13.5px;
  display: flex;
}
.banner .chip {
  background: var(--ink);
  color: var(--on-ink);
}
.notice {
  background: var(--sunken);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
}
.toast {
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  color: #fff;
  z-index: 60;
  max-width: 92vw;
  box-shadow: var(--shadow-lg);
  background: #2f9e6f;
  border-radius: 14px;
  align-items: center;
  gap: 8px;
  padding: 11px 18px 11px 14px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  position: fixed;
  transform: translate(-50%);
}
.toast svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  width: 18px;
  height: 18px;
}
@media (min-width: 901px) {
  .toast {
    bottom: 28px;
    left: calc(50% + 124px);
  }
}
.sheet-back {
  z-index: 50;
  background: #0a0a0e80;
  justify-content: center;
  align-items: flex-end;
  display: flex;
  position: fixed;
  inset: 0;
}
.sheet {
  background: var(--bg);
  border-radius: 26px 26px 0 0;
  outline: 0;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  display: flex;
  box-shadow: 0 -10px 40px #00000040;
}
.sheet-head {
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  align-items: center;
  padding: 8px 8px 8px 22px;
  display: flex;
}
.sheet-head h2 {
  font-size: 17px;
  font-weight: 800;
}
.sheet-body {
  padding: 16px 20px calc(22px + env(safe-area-inset-bottom));
  gap: 14px;
  display: grid;
  overflow: auto;
}
.results {
  gap: 8px;
  max-height: 48vh;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  overflow: auto;
}
.result {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  border-radius: 14px;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
}
.result:hover {
  border-color: var(--ink);
}
.nibs {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  font-size: 14px;
  display: flex;
}
.color-row {
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 8px;
  display: grid;
}
.color-pick {
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  border-radius: 12px;
  width: 52px;
  height: 46px;
  padding: 2px;
}
.color-actions {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  display: flex;
}
.color-actions .chip {
  min-height: 34px;
}
.color-crop-preview {
  background: #252525;
  border-radius: 12px;
  line-height: 0;
  margin: 0 auto;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  width: max-content;
}
.color-crop-preview img {
  display: block;
  height: auto;
  max-height: 320px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}
.color-crop-grid {
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  inset: 0;
  pointer-events: none;
  position: absolute;
}
.color-crop-cell {
  background: #00000020;
  border: 1px solid #ffffffb8;
  border-radius: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  min-height: 0;
  min-width: 0;
  padding: 4px;
  text-shadow: 0 1px 3px #000;
}
.color-crop-cell.selected {
  background: #ffffff35;
  box-shadow: inset 0 0 0 2px #fff;
}
.color-crop-selectors {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(44px, 1fr));
  margin: 0 auto;
  max-width: 220px;
  width: 100%;
}
.color-crop-selector {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
}
.color-crop-selector.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.color-match-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  font-size: 12.5px;
  gap: 6px;
  padding: 10px 12px;
}
.color-match-box > b {
  font-size: 12px;
}
.color-match-box .plain-list .list-row small {
  font-size: 11.5px;
}
.chip.disabled,
.chip:disabled {
  opacity: 0.5;
  pointer-events: none;
}
.link-btn {
  all: unset;
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
}
.link-btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.brand-item {
  grid-template-columns: 1fr;
  gap: 10px;
  display: grid;
}
@media (min-width: 520px) {
  .brand-item {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}
.url-form {
  gap: 8px;
  display: grid;
}
.photo-prev {
  background: var(--sunken);
  border-radius: 16px;
  place-items: center;
  min-height: 170px;
  max-height: 46vh;
  display: grid;
  overflow: hidden;
}
.photo-prev img {
  object-fit: contain;
  max-width: 100%;
  max-height: 46vh;
  display: block;
}
.fatal {
  gap: 12px;
  max-width: 520px;
  margin: 20vh auto;
  padding: 0 20px;
  display: grid;
}
@media (min-width: 901px) {
  .sheet-back {
    align-items: center;
  }
  .sheet {
    border-radius: 26px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet {
    animation: 0.22s ease-out up;
  }
  .sheet-back {
    animation: 0.18s ease-out fade;
  }
  .toast {
    animation: 0.2s ease-out pop;
  }
  @keyframes up {
    0% {
      opacity: 0;
      transform: translateY(24px);
    }
  }
  @keyframes fade {
    0% {
      opacity: 0;
    }
  }
  @keyframes pop {
    0% {
      opacity: 0;
      transform: translate(-50%, 8px);
    }
  }
}
@media (max-width: 900px) {
  .pen-stage {
    height: 112px;
    padding: 0 10px;
  }
  .nib-badge {
    top: 8px;
    left: 8px;
  }
  .pen-ink {
    font-size: 12.5px;
  }
  .pen-card .pen-foot {
    margin-top: 4px;
  }
}
#pilPrint {
  display: none;
}
@media print {
  @page {
    margin: 14mm;
  }
  body.pil-printing {
    background: #fff !important;
  }
  body.pil-printing > :not(#pilPrint) {
    display: none !important;
  }
  body.pil-printing #pilPrint {
    color: #000;
    font:
      10.5pt/1.45 -apple-system,
      BlinkMacSystemFont,
      Apple SD Gothic Neo,
      Malgun Gothic,
      Noto Sans KR,
      sans-serif;
    display: block !important;
  }
  #pilPrint .pp-head h1 {
    margin: 0 0 2pt;
    font-size: 18pt;
  }
  #pilPrint .pp-head p {
    color: #444;
    margin: 0 0 14pt;
  }
  #pilPrint h2 {
    break-after: avoid;
    margin: 16pt 0 6pt;
    font-size: 13pt;
  }
  #pilPrint h2 small {
    color: #555;
    font-size: 9.5pt;
    font-weight: 400;
  }
  #pilPrint table {
    border-collapse: collapse;
    width: 100%;
    font-size: 9.5pt;
  }
  #pilPrint th,
  #pilPrint td {
    text-align: left;
    vertical-align: top;
    overflow-wrap: break-word;
    word-break: normal;
    border-bottom: 0.5pt solid #bbb;
    padding: 3pt 5pt;
  }
  #pilPrint th {
    -webkit-print-color-adjust: exact;
    -moz-print-color-adjust: exact;
    print-color-adjust: exact;
    background: #eee;
    border-bottom: 1pt solid #000;
  }
  #pilPrint thead {
    display: table-header-group;
  }
  #pilPrint tr {
    break-inside: avoid;
  }
  #pilPrint .pp-none {
    color: #666;
  }
}
.tag.evidence {
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}
.tag.evidence.high {
  background: var(--ok-soft);
  color: var(--ok);
}
.tag.evidence.medium {
  background: var(--warn-soft);
  color: var(--warn);
}
.tag.evidence.low {
  background: var(--sunken);
  color: var(--muted);
}
.color-pair-review .plain-list .list-row {
  flex-wrap: wrap;
  min-width: 0;
}
.color-pair-review .link-btn {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 520px) {
  .color-pair-review .plain-list .list-row {
    column-gap: 6px;
    row-gap: 4px;
  }
}
.test-paper-summary {
  margin: 12px 0;
}
.test-summary-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}
.test-summary-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
}
.test-summary-item b {
  overflow-wrap: anywhere;
}
.test-summary-bar {
  background: var(--sunken);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}
.test-summary-bar > span {
  background: var(--accent);
  border-radius: inherit;
  display: block;
  height: 100%;
}
.test-paper-comparison {
  margin: 12px 0;
}
.test-comparison-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.test-comparison-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
}
.test-comparison-card .list-row {
  flex-wrap: wrap;
}
.test-comparison-card .log-title b,
.test-comparison-card .plain-list .list-row b {
  overflow-wrap: anywhere;
}
.test-comparison-card .plain-list .list-row {
  align-items: flex-start;
  flex-wrap: wrap;
}
.test-comparison-card .test-summary-bar {
  flex: 1 0 100%;
}
.backup-source-name {
  overflow-wrap: anywhere;
}
.xlsx-import-summary {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.xlsx-import-summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.xlsx-import-summary th,
.xlsx-import-summary td {
  white-space: nowrap;
}
.paper-similar-info {
  display: grid;
  flex: 1 1 180px;
  gap: 3px;
  min-width: 0;
}
.paper-similar-info small {
  overflow-wrap: anywhere;
}
.paper-similar-list .actions {
  flex: 0 1 300px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
  min-width: 0;
  padding-top: 0;
}
@media (max-width: 520px) {
  .paper-profile-card > .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .test-metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 360px) {
  .test-metric-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
.test-monthly-trend {
  margin: 12px 0;
}
.test-trend-grid {
  align-items: end;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 2px;
}
.test-trend-item {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  flex: 0 0 58px;
  gap: 4px;
  justify-items: center;
  padding: 4px;
}
.test-trend-item:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.test-trend-track {
  align-items: end;
  background: var(--sunken);
  border-radius: 8px;
  display: flex;
  height: 96px;
  overflow: hidden;
  width: 24px;
}
.test-trend-track > span {
  background: var(--accent);
  border-radius: 8px 8px 0 0;
  display: block;
  min-height: 8px;
  width: 100%;
}
