/* Inch / centimeter: a compact measuring desk. Shared partials load after this file. */
.tn-ic-page { width: 100%; max-width: 1180px; min-width: 0; margin-inline: auto; }
.tn-ic-page .tn-ic-display-ad { display: flow-root; width: 100%; max-width: 900px; min-height: 90px; margin-inline: auto; background: transparent; }
.tn-ic-page .tn-ic-display-ad--top { margin: 54px auto 20px; }
.tn-ic-page .tn-ic-display-ad--below { margin: 24px auto 28px; }
.tn-ic-tool {
  --ic-ink: #1a1208; --ic-muted: #5a4a30; --ic-line: #b8a888; --ic-soft: #ddd4be;
  --ic-paper: #faf6ee; --ic-wash: #f5efdf; --ic-button: #ede6d4; --ic-hover: #dfd4bb; --ic-accent: #c44a00;
  --ic-primary: #1a1208; --ic-primary-hover: #43321d; --ic-primary-text: #faf6ee;
  --ic-sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", system-ui, sans-serif;
  min-width: 0; width: 100%; color: var(--ic-ink); -webkit-text-fill-color: var(--ic-ink);
  font: 14px/1.55 var(--ic-sans); -webkit-font-smoothing: antialiased; color-scheme: light;
}
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-d="dark"], [data-scheme="auto"][data-l="dark"]) .tn-ic-tool,
html:is([data-scheme="dark"], [data-scheme="inverse"], .theme-dark) body:not([data-scheme="light"]) .tn-ic-tool {
  --ic-ink: #efe6d2; --ic-muted: #c3b492; --ic-line: #826744; --ic-soft: #574a37;
  --ic-paper: #241d12; --ic-wash: #322a1a; --ic-button: #2f2115; --ic-hover: #3a2a1b; --ic-accent: #f19b60;
  --ic-primary: #6a3b1f; --ic-primary-hover: #824826; --ic-primary-text: #f7ead1; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-ic-tool, html[data-scheme="auto"] body:not([data-scheme="light"]) .tn-ic-tool {
    --ic-ink: #efe6d2; --ic-muted: #c3b492; --ic-line: #826744; --ic-soft: #574a37;
    --ic-paper: #241d12; --ic-wash: #322a1a; --ic-button: #2f2115; --ic-hover: #3a2a1b; --ic-accent: #f19b60;
    --ic-primary: #6a3b1f; --ic-primary-hover: #824826; --ic-primary-text: #f7ead1; color-scheme: dark;
  }
}
.tn-ic-tool, .tn-ic-tool * { box-sizing: border-box; }
.tn-ic-tool [hidden] { display: none !important; }
.tn-ic-tool :is(h2,h3,p,fieldset,legend,dl,dt,dd,label,figure) { margin: 0; padding: 0; }
.tn-ic-tool :is(h2,h3) { color: var(--ic-ink); -webkit-text-fill-color: var(--ic-ink); font: 700 16px/1.4 var(--ic-sans); text-wrap: balance; }
.tn-ic-tool p { text-wrap: pretty; }
.tn-ic-tool button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; min-height: 40px; margin: 0; padding: 10px 13px; border: 1px solid var(--ic-line); border-radius: 0; box-shadow: none; background: var(--ic-button); color: var(--ic-ink); -webkit-text-fill-color: var(--ic-ink); font: 700 12px/1 var(--ic-sans); text-transform: none; letter-spacing: 0; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.tn-ic-tool button:hover:not(:disabled) { background: var(--ic-hover); box-shadow: none; transform: none; }
.tn-ic-tool button:disabled { opacity: .5; cursor: not-allowed; }
.tn-ic-tool :is(button,input,select):focus { box-shadow: none; }
.tn-ic-tool :is(button,input,select):focus:not(:focus-visible) { outline: none; }
.tn-ic-tool :is(button,input,select):focus-visible { outline: 2px solid var(--ic-accent); outline-offset: 2px; }
.tn-ic-tool select { min-width: 0; min-height: 40px; margin: 0; padding: 8px 28px 8px 10px; border: 1px solid var(--ic-line); border-radius: 0; background-color: var(--ic-paper); color: var(--ic-ink); -webkit-text-fill-color: var(--ic-ink); font: 600 13px/1.4 var(--ic-sans); box-shadow: none; }
.tn-ic-tool .tn-single-converter { display: grid; grid-template-columns: minmax(0,1fr) 64px minmax(0,1fr); align-items: stretch; }
.tn-ic-tool :is(.tn-source-window,.tn-result-window) { display: flex; flex-direction: column; min-width: 0; padding: 18px; border: 1px solid var(--ic-line); border-top: 3px double var(--ic-line); background: var(--ic-paper); }
.tn-ic-tool .tn-result-window { background: var(--ic-wash); }
.tn-ic-tool .tn-center-swap { display: grid; place-items: center; min-width: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.tn-ic-tool #ic-swap { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; flex-direction: column; font: 400 27px/1 var(--ic-sans); }
.tn-ic-tool #ic-swap:hover { color: var(--ic-accent); -webkit-text-fill-color: var(--ic-accent); background: transparent; }
.tn-ic-tool .tn-ic-window-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.tn-ic-tool .tn-ic-window-head > span { color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font-size: 12px; }
.tn-ic-tool #ic-value { width: 100%; min-width: 0; height: 82px; margin: 0; padding: 10px 14px; border: 1px solid var(--ic-line); border-radius: 0; background: var(--ic-paper); color: var(--ic-ink); -webkit-text-fill-color: var(--ic-ink); font: 600 clamp(28px,3.6vw,44px)/1.2 var(--ic-sans); font-variant-numeric: lining-nums tabular-nums; box-shadow: none; }
.tn-ic-tool #ic-value::placeholder { color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font-weight: 400; opacity: .35; }
.tn-ic-tool .tn-source-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tn-ic-tool .tn-source-chip { display: inline-grid; place-items: center; padding: 4px 8px; background: var(--ic-wash); border: 1px solid var(--ic-soft); font: 600 13px/1.4 var(--ic-sans); font-variant-numeric: lining-nums tabular-nums; }
.tn-ic-tool .tn-source-chip[aria-pressed="true"] { border-color: var(--ic-accent); color: var(--ic-accent); -webkit-text-fill-color: var(--ic-accent); background: var(--ic-wash); }
.tn-ic-tool .tn-command-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }
.tn-ic-tool #ic-copy { background: var(--ic-primary); border-color: var(--ic-primary); color: var(--ic-primary-text); -webkit-text-fill-color: var(--ic-primary-text); }
.tn-ic-tool #ic-copy:hover:not(:disabled) { background: var(--ic-primary-hover); border-color: var(--ic-primary-hover); }
.tn-ic-tool .tn-status-line { display: grid; place-items: center; min-height: 40px; padding: 0; color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font-size: 12px; }
.tn-ic-tool #ic-error { margin-top: 8px; color: var(--ic-accent); -webkit-text-fill-color: var(--ic-accent); font-size: 12px; }
.tn-ic-tool #ic-result { display: block; min-width: 0; margin: 0; color: var(--ic-ink); -webkit-text-fill-color: var(--ic-ink); font: 800 clamp(34px,4.3vw,56px)/1.12 var(--ic-sans); font-variant-numeric: lining-nums tabular-nums; letter-spacing: normal; overflow-wrap: anywhere; }
.tn-ic-tool #ic-target-unit { color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font: 600 15px/1.4 var(--ic-sans); }
.tn-ic-tool #ic-formula { margin-top: 13px; color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font-size: 13px; font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.tn-ic-tool .tn-pane-result { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.tn-ic-tool .tn-ic-ruler { position: relative; height: 22px; margin: auto 0 12px; border-bottom: 1px solid var(--ic-line); background: repeating-linear-gradient(90deg,var(--ic-line) 0 1px,transparent 1px 10px) left bottom / 100% 7px no-repeat, repeating-linear-gradient(90deg,var(--ic-line) 0 1px,transparent 1px 50px) left bottom / 100% 15px no-repeat; }
.tn-ic-tool .tn-ic-screen-preview { position: relative; display: grid; place-items: center; width: min(100%,250px); aspect-ratio: 16 / 9; margin: 12px auto; border: 2px solid var(--ic-ink); background: repeating-linear-gradient(0deg,transparent 0 19px,var(--ic-soft) 19px 20px), repeating-linear-gradient(90deg,transparent 0 19px,var(--ic-soft) 19px 20px),var(--ic-paper); color: var(--ic-ink); -webkit-text-fill-color: var(--ic-ink); }
.tn-ic-tool :is(#ic-mm,#ic-screen-width,#ic-screen-height) { font: 800 18px/1.4 var(--ic-sans); font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.tn-ic-tool .tn-ic-window-head > :first-child { font-weight: 700; }
.tn-ic-tool .tn-ic-swap-label { font: 700 10px/1.4 var(--ic-sans); white-space: nowrap; }
.tn-ic-tool .tn-ic-tip { margin-top: 9px; color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font-size: 12px; line-height: 1.6; }
.tn-ic-tool #ic-error:empty, .tn-ic-tool #ic-status:empty { display: none; }
.tn-ic-tool #ic-value[aria-invalid="true"] { border-color: var(--ic-accent); }
.tn-ic-tool .tn-ic-quick-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tn-ic-tool .tn-ic-quick-row > span { flex: 0 0 100%; font-size: 11px; color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); }
.tn-ic-tool .tn-ic-quick-row button { flex: 1 1 42px; padding: 9px 7px; background: transparent; border-color: var(--ic-soft); font: 600 13px/1 var(--ic-sans); font-variant-numeric: lining-nums tabular-nums; }
.tn-ic-tool .tn-ic-quick-row button:hover { background: var(--ic-button); border-color: var(--ic-line); }
.tn-ic-tool .tn-ic-command-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.tn-ic-tool .tn-ic-command-row label, .tn-ic-tool .tn-ic-screen-controls > label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.tn-ic-tool .tn-ic-command-row #ic-reset { margin-left: auto; }
.tn-ic-tool .tn-ic-standard { color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font: 600 12px/1.4 var(--ic-sans); font-variant-numeric: lining-nums tabular-nums; }
.tn-ic-tool .tn-ic-result-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.tn-ic-tool .tn-ic-result-footer > span { min-width: 0; color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font-size: 12px; }
.tn-ic-tool .tn-ic-result-footer b { margin-left: 5px; color: var(--ic-ink); -webkit-text-fill-color: var(--ic-ink); }
.tn-ic-tool #ic-copy { flex: 0 0 auto; }
.tn-ic-tool .tn-ic-screen { margin-top: 22px; border-top: 3px double var(--ic-line); border-bottom: 1px solid var(--ic-line); }
.tn-ic-tool .tn-ic-screen > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px 0; cursor: pointer; list-style: none; color: var(--ic-ink); -webkit-text-fill-color: var(--ic-ink); font: 700 14px/1.5 var(--ic-sans); }
.tn-ic-tool .tn-ic-screen > summary::-webkit-details-marker { display: none; }
.tn-ic-tool .tn-ic-screen > summary::after { content: "+"; font: 400 24px/1 var(--ic-sans); }
.tn-ic-tool .tn-ic-screen[open] > summary::after { content: "−"; }
.tn-ic-tool .tn-ic-screen > summary:focus-visible { outline: 2px solid var(--ic-accent); outline-offset: 2px; }
.tn-ic-tool .tn-ic-screen-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,.65fr); align-items: center; gap: 24px; padding: 6px 0 18px; }
.tn-ic-tool .tn-ic-screen-controls > p { margin-top: 10px; color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font-size: 12px; }
.tn-ic-tool .tn-ic-screen-measures { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 14px; }
.tn-ic-tool .tn-ic-screen-measures > div { border-top: 1px solid var(--ic-soft); padding-top: 9px; }
.tn-ic-tool .tn-ic-screen-measures dt { color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font-size: 11px; }
.tn-ic-tool .tn-ic-screen-measures dd { margin-top: 3px; }
.tn-ic-tool .tn-ic-screen-measures dd::after { content: " cm"; color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font-size: 12px; font-weight: 600; }
.tn-ic-tool .tn-ic-screen-preview { overflow: hidden; }
.tn-ic-tool .tn-ic-screen-diagonal { position: absolute; inset: 0; background: linear-gradient(to top right,transparent calc(50% - .6px),var(--ic-accent) 50%,transparent calc(50% + .6px)); }
.tn-ic-tool .tn-ic-screen-caption { position: relative; padding: 5px 9px; background: var(--ic-paper); color: var(--ic-muted); -webkit-text-fill-color: var(--ic-muted); font-size: 10px; }
.tn-ic-page .tn-ic-reference-table { width: 100%; margin-top: 14px; border-collapse: collapse; font: 13px/1.6 -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", system-ui, sans-serif; font-variant-numeric: lining-nums tabular-nums; }
.tn-ic-page .tn-ic-reference-table :is(th,td) { padding: 7px 10px; text-align: right; border-bottom: 1px solid currentColor; }
.tn-ic-page .tn-ic-reference-table th { font-weight: 600; }
@media (max-width: 720px) {
  .tn-ic-page { padding-inline: 5px; }
  .tn-ic-page .tn-ic-display-ad--top { margin-top: 48px; }
  .tn-ic-tool .tn-single-converter { grid-template-columns: minmax(0,1fr); }
  .tn-ic-tool :is(.tn-source-window,.tn-result-window) { min-height: 0; padding: 14px; }
  .tn-ic-tool .tn-center-swap { height: 40px; }
  .tn-ic-tool #ic-swap { height: 40px; font-size: 24px; }
  .tn-ic-tool .tn-ic-window-head { margin-bottom: 5px; }
  .tn-ic-tool #ic-value { height: 68px; font-size: 34px; }
  .tn-ic-tool #ic-result { font-size: 43px; }
  .tn-ic-tool .tn-command-row { margin-top: 0; padding-top: 12px; }
  .tn-ic-tool .tn-pane-result { flex: 0 1 auto; }
  .tn-ic-tool .tn-ic-ruler { margin-top: 16px; }
  .tn-ic-tool .tn-ic-screen-body { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .tn-ic-tool .tn-ic-screen-preview { width: min(100%,240px); margin: 5px auto; }
  .tn-ic-tool .tn-ic-screen { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) { .tn-ic-tool :is(button,input,select) { transition: none; scroll-behavior: auto; } }
