@font-face {
  font-family: "Noto Sans JP";
  src: url("/fonts/NotoSansJP-Latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  font-family: "Noto Sans JP", system-ui, sans-serif;
  color: #0f1729;
  background: #fff;
  --paper: #fff;
  --muted: #4b5563;
  --line: #e2e8f0;
  --blue: #2563eb;
  --navy: #1e3a8a;
  --mono: Consolas, Monaco, "Courier New", monospace;
  --gradient: linear-gradient(90deg, #2563eb, #4f46e5);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
p { margin: 0; line-height: 1.65; color: var(--muted); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
[id] { scroll-margin-top: 5rem; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: fixed; z-index: 12; top: .5rem; left: .5rem; background: #fff; padding: .7rem 1rem; }
.shell { width: min(80rem, 100%); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }

.site-header {
  position: sticky; top: 0; z-index: 5; background: #fff;
  box-shadow: 0 1px 2px #c7d2fe;
}
.header-inner {
  min-height: 4rem; padding-inline: clamp(1rem, 3vw, 2rem);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .5rem; color: #182344; width: fit-content; font-size: 1rem; white-space: nowrap; }
.brand strong { color: #3347c6; }
.brand-mark { display: inline-grid; gap: 3px; justify-items: center; align-content: center; width: 1.9rem; height: 1.9rem; border-radius: .36rem; background: var(--gradient); }
.brand-mark i { height: 2px; width: .9rem; border-radius: 2px; background: #fff; }
.brand-mark i:nth-child(2) { width: .7rem; }
.brand-mark i:nth-child(3) { width: .5rem; }
.header-nav { display: flex; align-items: center; gap: 2rem; font-size: 1.0625rem; }
.header-nav a, .header-categories summary { color: #222b3d; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
.header-categories { position: relative; }
.header-categories summary { padding: .6rem 1rem .6rem 0; }
.header-categories summary::after, .tool-sidebar summary::after {
  content: ""; display: inline-block; width: .38rem; height: .38rem;
  border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg);
}
.header-categories summary::after { position: absolute; right: 0; top: 45%; }
.header-categories > div {
  position: absolute; top: 100%; left: 0; min-width: 14rem; white-space: nowrap;
  background: #fff; border: 1px solid var(--line); border-radius: .5rem;
  box-shadow: 0 .6rem 1rem #0f17291c; overflow: hidden;
}
.header-categories a { display: block; padding: .7rem .9rem; font-size: .9rem; }
.header-categories a:hover { background: #eff6ff; }
.search-trigger {
  justify-self: end; display: flex; align-items: center; gap: .5rem; min-height: 2.4rem;
  padding: .45rem .75rem; border: 0; border-radius: .4rem; background: #f3f4f6; color: #4b5563; cursor: pointer;
}
.search-trigger kbd { border: 1px solid var(--line); border-radius: .25rem; background: #fff; font: .73rem var(--mono); padding: .2rem .28rem; margin-left: 1.4rem; }
.search-icon { display: inline-block; width: .7rem; height: .7rem; border: 1.5px solid currentColor; border-radius: 100%; position: relative; }
.search-icon::after { content: ""; position: absolute; width: .32rem; height: 1px; background: currentColor; transform: rotate(45deg); right: -.23rem; bottom: -1px; }
.tool-search { width: min(32rem, calc(100% - 2rem)); padding: 1.25rem; border: 1px solid var(--line); border-radius: .7rem; color: inherit; box-shadow: 0 1rem 3rem #0f172935; }
.tool-search::backdrop { background: #0f17295e; }
.search-heading { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.search-heading h2 { font-size: 1.2rem; }
.tool-search input { width: 100%; padding: .65rem .8rem; border: 1px solid #94a3b8; border-radius: .4rem; }
.tool-search ul { list-style: none; padding: 0; margin: .65rem 0 0; }
.tool-search li a { display: block; padding: .5rem .6rem; border-radius: .3rem; }
.tool-search li a:hover { background: #eff6ff; }

.hero {
  min-height: 41.5rem;
  padding-block: 8rem 6rem;
  text-align: center;
  background: linear-gradient(135deg, #dbeafe, #fff 50%, #e0e7ff);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .55rem; padding: .32rem 1rem;
  border: 1px solid #bfdbfe; border-radius: 999px; font-size: .875rem; font-weight: 500;
  color: #304cdb; background: linear-gradient(90deg, #eff6ff, #eef2ff); box-shadow: 0 1px 2px #00000010;
}
.hero-badge span { color: #a6580b; }
.hero h1 { margin-top: 2rem; font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 700; line-height: 1.08; letter-spacing: -.025em; }
.hero h1 span { color: #4f46e5; background: linear-gradient(90deg,#2563eb,#4f46e5,#9333ea); background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { max-width: 42rem; margin: 1.3rem auto 2.5rem; font-size: clamp(1.1rem, 2.05vw, 1.5rem); line-height: 1.35; }
.hero p strong { color: #111827; }
.hero .hero-button { min-height: 3rem; padding-inline: 2rem; box-shadow: 0 .45rem .85rem #3b82f64d; }
.hero-button span { font-size: 1.2em; }
.hero-shortcuts { margin: 4.2rem auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.hero-shortcuts a { display: inline-flex; align-items: center; gap: .45rem; padding: .42rem .85rem; border: 1px solid #d1d5db; border-radius: 999px; font-size: .875rem; color: #172033; background: #fff; box-shadow: 0 1px 2px #00000015; }
.hero-shortcuts a span { color: var(--blue); font: 600 .9rem var(--mono); }
.category-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; min-height: 5.5rem; padding: .8rem 1rem; gap: .65rem 2.75rem; background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.category-strip a { color: var(--navy); font-weight: 600; }
.catalog { padding-block: 5rem; background: linear-gradient(135deg, #f9fafb, #f3f4f6); }
.catalog h2 { margin-bottom: 3rem; text-align: center; color: #202937; font-size: clamp(1.8rem, 4vw, 2.25rem); letter-spacing: -.025em; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 17rem)); gap: 1.5rem; justify-content: center; }
.category-card, .tool-card { display: block; padding: 1.5rem; border: 1px solid var(--line); border-radius: .55rem; background: linear-gradient(135deg, #fff, #f9fafb); color: inherit; box-shadow: 0 1px 2px #00000010; }
.category-card:hover, .tool-card:hover { border-color: #bfdbfe; text-decoration: none; box-shadow: 0 .45rem 1rem #3341551a; }
.category-card:hover h3, .tool-card:hover h3 { color: var(--blue); }
.category-icon {
  display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: .75rem;
  color: var(--blue); background: linear-gradient(135deg, #dbeafe, #e0e7ff); font: 600 1.25rem var(--mono);
}
.category-card h3 { margin-block: 1rem .55rem; font-size: 1.125rem; }
.category-card p, .category-count, .tool-card p { font-size: .9rem; color: var(--muted); }
.category-count { display: block; margin-top: .8rem; }
.category-count strong, .category-count span { color: var(--blue); }
.category-count span { float: right; }
.category-section { padding-block: 3rem; }
.category-section:nth-child(odd) { background: #f9fafb; }
.category-section h2 { font-size: 1.5rem; letter-spacing: -.025em; margin-bottom: 1.25rem; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.tool-card h3 { margin-bottom: .6rem; font-size: 1.08rem; }

.tool-layout { display: grid; grid-template-columns: 18rem minmax(0, 1fr); align-items: start; background: #f3f4f6; }
.tool-sidebar { position: sticky; top: 4rem; overflow-y: auto; height: calc(100vh - 4rem); background: #fff; border-right: 1px solid var(--line); }
.sidebar-title { padding: 1rem 1.25rem; background: #e5e7eb; font-size: .875rem; text-transform: uppercase; color: #334155; }
.tool-sidebar summary { display: flex; align-items: center; gap: .62rem; padding: .8rem 1.25rem; min-height: 3rem; border-bottom: 1px solid #f3f4f6; color: #262c36; font-weight: 500; }
.tool-sidebar summary::after { margin-left: auto; transform: rotate(-45deg); }
.tool-sidebar details[open] summary { color: #174fd1; }
.tool-sidebar details[open] summary::after { transform: rotate(45deg); }
.side-icon { width: 1rem; flex-shrink: 0; text-align: center; font: 600 .8rem var(--mono); white-space: nowrap; }
.sidebar-links { padding: .5rem 0; box-shadow: inset 0 .25rem .55rem #f0f1f4; }
.sidebar-links a, .sidebar-links p { display: block; padding: .58rem 1.7rem; font-size: .96rem; color: #526780; border-left: 4px solid transparent; }
.sidebar-links a[aria-current] { color: #174fd1; border-color: var(--blue); }
.sidebar-links a:hover { background: #f8fafc; }
.tool-page { min-width: 0; min-height: calc(100vh - 4rem); }
.tool-content { width: min(72rem, 100%); padding: 2rem 1.5rem 4rem; margin-inline: auto; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .42rem; margin-bottom: 1.5rem; font-size: .875rem; }
.breadcrumb a { color: #526780; }
.breadcrumb [aria-hidden] { color: #64748b; }
.tool-heading { display: flex; align-items: center; justify-content: space-between; gap: .65rem 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.tool-heading h1 { font-size: 1.875rem; font-weight: 700; color: var(--navy); }
.tool-actions, .run-actions, .result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 18rem); gap: .15rem; border: 0; padding: .22rem; margin: 0 0 1rem; border-radius: .5rem; background: #e5e7eb; }
.mode-tabs label { position: relative; cursor: pointer; }
.mode-tabs input { position: absolute; opacity: 0; }
.mode-tabs span { display: block; padding: .45rem .6rem; border-radius: .35rem; text-align: center; color: #475569; font-weight: 500; }
.url-workbench .mode-tabs span { padding-block: .72rem; }
.mode-tabs input:checked + span { background: #fff; color: #172033; box-shadow: 0 1px 3px #00000020; }
.mode-tabs input:focus-visible + span { outline: 2px solid var(--blue); }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.editor { min-width: 0; }
.editor > label { display: block; margin-bottom: .5rem; color: #334155; font-size: 1.125rem; font-weight: 500; }
[data-tool="base64_codec"] .editor > label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.editor-box { border: 1px solid #9ca3af; min-width: 0; }
.editor + .editor .editor-box { border-left-width: 0; }
.editor-text { display: flex; background: #fff; min-width: 0; }
.editor-gutter { color: #64748b; background: #f0f0f0; padding: .56rem .52rem; font: .9rem/1.5 var(--mono); text-align: right; min-width: 2rem; white-space: pre; overflow: hidden; }
textarea {
  display: block; flex: 1; min-width: 0; width: 100%; height: 376px; padding: .56rem .7rem;
  resize: none; border: 0; background: #fff; color: #111827; font: .9rem/1.5 var(--mono); white-space: pre;
}
textarea:focus-visible { outline-offset: -2px; }
textarea[readonly] { background: #fafbfe; }
.url-workbench textarea { height: 326px; }
.editor-status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .35rem; border-top: 1px solid var(--line); padding: .45rem .7rem; color: #475569; background: #f3f4f6; font: .82rem/1.2 var(--mono); }
.run-bar { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .65rem 1rem; margin-top: 1rem; }
.indent-control, .escape-control { display: inline-flex; align-items: center; gap: .45rem; color: #334155; font-size: .875rem; }
.indent-control input { width: 4.1rem; height: 2.5rem; border: 1px solid #cbd5e1; border-radius: .38rem; background: #fff; color: #334155; padding-inline: .55rem; }
.escape-control input { margin: 0; width: 1rem; height: 1rem; accent-color: var(--blue); }
.status { min-height: 1.55rem; margin-top: .35rem; font-size: .9rem; }
.error { color: #a32231; }
.guide { max-width: 48rem; margin-top: 2rem; }
.guide h2, .document h2 { font-size: 1.5rem; }
.guide h3, .document h2 { margin-top: 1.35rem; }
.guide p, .document p { margin-top: .6rem; }
.guide code { overflow-wrap: anywhere; color: #254081; background: #e7edfa; padding: .08em .25em; border-radius: .18em; }
.document { padding-block: 3rem 4rem; }
.document p { max-width: 48rem; }

.primary, .outline, .consent button {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.5rem;
  padding: .43rem 1.15rem; border: 1px solid transparent; border-radius: 999px; font-weight: 500;
  cursor: pointer; text-decoration: none;
}
.primary, .consent [data-consent-allow] { background: var(--gradient); color: #fff; }
.primary:hover { background: linear-gradient(90deg,#1d4ed8,#4338ca); text-decoration: none; }
.outline, .consent [data-consent-deny] { color: #273142; border-color: #9ca3af; background: #fff; }
.outline:hover:not(:disabled) { background: #eff6ff; }
button:disabled { opacity: .48; cursor: default; }
[data-favorite][aria-pressed="true"] { color: #174fd1; border-color: #93c5fd; background: #eff6ff; }
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer-inner { width: min(80rem, 100%); display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 1.5rem; margin-inline: auto; padding: 2.75rem clamp(1.25rem,4vw,3rem); align-items: start; }
.site-footer h2 { color: #334155; font-size: .85rem; text-transform: uppercase; margin-bottom: .75rem; }
.site-footer-inner > div a { display: block; color: #475569; font-size: .9rem; margin-top: .5rem; }
.site-footer button { padding: 0; border: 0; color: #475569; background: transparent; cursor: pointer; text-align: left; margin-top: .5rem; font-size: .9rem; text-decoration: underline; }
.consent {
  position: fixed; z-index: 10; bottom: 1rem; right: 1rem; width: min(27rem, calc(100% - 2rem));
  padding: 1.15rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff;
  box-shadow: 0 1rem 2.75rem #181c2c28;
}
.consent p { margin-bottom: .65rem; color: inherit; }
.consent div { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .65rem; }

@media (max-width: 63.99rem) {
  .tool-layout { display: block; }
  .tool-sidebar { position: static; height: auto; border: 0; }
  .tool-sidebar nav { display: flex; flex-wrap: wrap; gap: .1rem .5rem; border-bottom: 1px solid var(--line); align-items: start; }
  .sidebar-title { display: none; }
  .tool-sidebar summary { padding: .45rem .75rem; min-height: 2.5rem; border: 0; font-size: .9rem; }
  .sidebar-links a, .sidebar-links p { padding: .5rem .7rem; font-size: .88rem; }
  .editor + .editor .editor-box { border-left-width: 1px; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  textarea, .url-workbench textarea { height: 250px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 42rem) {
  .header-inner { grid-template-columns: 1fr auto; gap: .5rem; }
  .header-nav { display: none; }
  .search-trigger kbd { display: none; }
  .search-trigger { font-size: .86rem; }
  .hero { min-height: 0; padding-block: 4rem; }
  .hero-shortcuts { margin-top: 2rem; }
  .category-strip { min-height: 4rem; gap: .55rem 1rem; }
  .catalog { padding-block: 3rem; }
  .category-grid, .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-content { padding: 1.35rem 1rem 3rem; }
  .site-footer-inner { grid-template-columns: repeat(2, 1fr); }
  .site-footer-inner > .brand { grid-column: 1 / -1; }
}
