:root {
  color: #17191d;
  background: #f3f4f6;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.62), transparent 28%),
    linear-gradient(245deg, rgba(190, 205, 222, 0.76), transparent 34%),
    linear-gradient(30deg, rgba(217, 226, 235, 0.42), transparent 48%),
    radial-gradient(ellipse at 50% 8%, rgba(255, 255, 255, 0.96), transparent 40rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 248, 250, 0.92) 34%, rgba(236, 240, 244, 0.96) 100%),
    #f3f4f6;
  background-attachment: fixed;
}

.legal-page {
  min-height: 100vh;
  color: #111827;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 246, 250, 0.96)),
    #f3f4f6;
}

.legal-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 clamp(22px, 5vw, 76px);
  border-bottom: 1px solid rgba(203, 213, 225, 0.68);
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.legal-nav > div {
  display: flex;
  align-items: center;
  gap: 18px;
}

.legal-nav a:not(.brand) {
  color: #5f6872;
  font-size: 13px;
  font-weight: 760;
}

.legal-hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: end;
  gap: clamp(28px, 7vw, 92px);
  padding: clamp(48px, 8vw, 112px) clamp(22px, 5vw, 76px) clamp(42px, 7vw, 84px);
  border-bottom: 1px solid rgba(203, 213, 225, 0.72);
  background:
    radial-gradient(circle at 78% 10%, rgba(203, 213, 225, 0.42), transparent 24rem),
    linear-gradient(120deg, rgba(255, 255, 255, 0.98), rgba(226, 232, 240, 0.5)),
    #f8fafc;
}

.legal-hero-copy {
  display: grid;
  gap: 18px;
  align-content: start;
}

.legal-hero h1 {
  max-width: 900px;
  margin: 6px 0 0;
  font-size: clamp(56px, 9vw, 126px);
  line-height: 0.88;
}

.legal-intro {
  max-width: 760px;
  margin: 0;
  color: #5f6872;
  font-size: clamp(17px, 1.65vw, 22px);
  line-height: 1.55;
}

.legal-summary {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-left: 2px solid #111827;
  background: rgba(255, 255, 255, 0.48);
}

.legal-summary span,
.legal-index span {
  color: #7a848e;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.legal-summary strong {
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
}

.legal-summary p {
  margin: 0;
  color: #5f6872;
  font-size: 13px;
  line-height: 1.65;
}

.legal-layout {
  width: min(1280px, calc(100% - clamp(32px, 8vw, 128px)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(42px, 7vw, 96px);
  padding: clamp(42px, 7vw, 82px) 0 clamp(58px, 8vw, 110px);
}

.legal-index {
  position: sticky;
  top: 106px;
  display: grid;
  align-content: start;
  gap: 10px;
  height: fit-content;
  padding-top: 4px;
}

.legal-index a {
  color: #68717a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.legal-index a:hover {
  color: #111827;
}

.legal-content {
  min-width: 0;
}

.legal-content section {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 70px);
  padding: 0 0 38px;
  margin-bottom: 38px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.72);
  scroll-margin-top: 98px;
}

.legal-content section:last-child {
  border-bottom: 0;
}

.legal-content h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(20px, 2vw, 28px);
}

.legal-content p,
.legal-content li {
  color: #4b5563;
  font-size: 16px;
  line-height: 1.75;
}

.legal-content p {
  margin: 0;
}

.legal-content p + p {
  margin-top: 14px;
}

.legal-content ul {
  margin: 0;
  padding-left: 20px;
}

.legal-content a {
  color: #111827;
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-back {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 42px;
  margin-top: 18px;
  padding: 0 16px;
  border-radius: 13px;
  color: #fff;
  background: #202832;
  font-size: 13px;
  font-weight: 760;
}

button,
textarea,
select,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  position: relative;
  min-height: 100vh;
  padding: 22px;
  overflow-x: hidden;
  transition: background 760ms ease, color 560ms ease;
}

.site-shell::before,
.site-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.site-shell::before {
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.46), transparent 28rem),
    radial-gradient(circle at 86% 8%, rgba(182, 201, 222, 0.3), transparent 26rem);
  opacity: 0.56;
}

.site-shell::after {
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.42) 52%, rgba(235, 240, 245, 0.6) 100%);
  opacity: 0.5;
}

.site-shell > * {
  position: relative;
  z-index: 1;
}

.nav {
  position: sticky;
  top: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1280px, 100%);
  height: 62px;
  margin: 0 auto;
  padding: 8px 10px 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.12)),
    rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.56), 0 18px 52px rgba(31, 38, 46, 0.05);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.brand {
  font-size: 20px;
  font-weight: 820;
  letter-spacing: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
  min-width: 0;
}

.brand-muted {
  color: #7a848e;
  font-weight: 400;
  text-transform: none;
}

h1 .brand-muted {
  color: #8a949e;
  font-weight: 400;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
}

.nav-links {
  gap: 30px;
  color: #69737e;
  font-size: 14px;
  font-weight: 650;
}

.nav-actions {
  gap: 8px;
}

.nav-action,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 760;
}

.nav-action {
  padding: 0 18px;
  color: white;
  background: linear-gradient(145deg, #171c22, #2e3740);
  box-shadow: 0 12px 28px rgba(23, 28, 34, 0.16);
}

.theme-toggle {
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #46515b;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.28)),
    rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.82), 0 10px 22px rgba(31, 38, 46, 0.06);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.hero {
  width: min(1180px, 100%);
  margin: 82px auto 28px;
}

.hero-copy {
  display: grid;
  justify-items: center;
  text-align: center;
  user-select: none;
}

.eyebrow {
  margin: 0;
  color: #737d87;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 1000px;
  margin: 18px auto 18px;
  font-size: clamp(48px, 8vw, 118px);
  line-height: 0.9;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-text {
  max-width: 760px;
  margin: 0 auto;
  color: #5f6872;
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.52;
}

.tool-wrap {
  width: min(1280px, 100%);
  margin: 34px auto 0;
  scroll-margin-top: 104px;
}

.tool-panel {
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.36)),
    rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.9),
    inset 0 -1px rgba(255, 255, 255, 0.34),
    0 32px 110px rgba(31, 38, 46, 0.14);
  backdrop-filter: blur(34px) saturate(155%);
  -webkit-backdrop-filter: blur(34px) saturate(155%);
}

.tool-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.72), transparent 26rem),
    linear-gradient(120deg, rgba(255, 255, 255, 0.5), transparent 28%, rgba(255, 255, 255, 0.22) 58%, transparent);
  opacity: 0.7;
}

.tool-panel > * {
  position: relative;
  z-index: 1;
}

.tool-header,
.control-strip,
.tool-footer {
  padding-left: 22px;
  padding-right: 22px;
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  border-bottom: 1px solid rgba(224, 231, 237, 0.62);
}

.tool-header p {
  margin: 0 0 5px;
  color: #78828c;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.tool-header h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.tool-header > span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e2e7ec;
  border-radius: 999px;
  color: #5f6973;
  background: #f8fafb;
  font-size: 13px;
  font-weight: 720;
}

.mode-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(224, 231, 237, 0.62);
  background: rgba(251, 252, 253, 0.34);
}

.mode-tabs button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(215, 224, 231, 0.76);
  border-radius: 13px;
  color: #66717b;
  background: rgba(255, 255, 255, 0.52);
  font-size: 13px;
  font-weight: 760;
}

.mode-tabs button.selected {
  color: #fff;
  border-color: rgba(23, 28, 34, 0.1);
  background: #202832;
  box-shadow: 0 12px 24px rgba(31, 38, 46, 0.1);
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-top: 1px solid rgba(224, 231, 237, 0.62);
  border-bottom: 1px solid rgba(224, 231, 237, 0.62);
  background: rgba(251, 252, 253, 0.38);
}

.mode-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.mode-shell > span {
  color: #6d7781;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.mode-bar {
  --active-index: 1;
  --item-count: 4;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--item-count), minmax(0, 1fr));
  gap: 0;
  max-width: 100%;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 17px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18)),
    rgba(238, 242, 245, 0.44);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  overflow: hidden;
}

.liquid-indicator {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / var(--item-count));
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.98),
    inset 0 -1px rgba(255, 255, 255, 0.44),
    0 10px 24px rgba(26, 34, 43, 0.12);
  transform: translateX(calc(var(--active-index) * 100%));
  transition: transform 520ms cubic-bezier(0.2, 0.9, 0.18, 1);
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
}

.mode-bar button,
.action-row button,
.action-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 12px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 760;
}

.mode-bar button {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 0 10px;
  color: #65707b;
  background: transparent;
  transition: color 260ms ease;
}

.mode-bar button.selected {
  color: #14191f;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.action-row button,
.action-row a {
  padding: 0 12px;
  color: #34404a;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.42)),
    rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.86), 0 9px 20px rgba(31, 38, 46, 0.05);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.action-row .primary-button {
  color: #fff;
  background: linear-gradient(145deg, rgba(20, 25, 31, 0.96), rgba(54, 64, 74, 0.92));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.18), 0 14px 30px rgba(23, 28, 34, 0.18);
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.46fr);
  grid-template-areas:
    "input input"
    "preview settings";
  border-bottom: 1px solid rgba(224, 231, 237, 0.62);
  background: rgba(255, 255, 255, 0.22);
}

.editor-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 520px;
  padding: 20px 22px 22px;
  background: rgba(255, 255, 255, 0.3);
}

.input-card {
  grid-area: input;
  min-height: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(224, 231, 237, 0.62);
}

.preview-card {
  grid-area: preview;
  grid-template-rows: auto auto 1fr;
}

.tool-footer {
  grid-area: settings;
  border-left: 1px solid rgba(224, 231, 237, 0.62);
}

.editor-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding-bottom: 14px;
}

.editor-card h3 {
  margin: 0;
  font-size: 16px;
}

.editor-card span {
  color: #7a848e;
  font-size: 12px;
  font-weight: 700;
}

textarea {
  width: 100%;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  outline: 0;
  color: #20262d;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.48)),
    rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.86), 0 12px 30px rgba(31, 38, 46, 0.05);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  overflow-x: auto;
  overflow-y: hidden;
  resize: none;
  font-size: 15.5px;
  line-height: 54px;
  white-space: nowrap;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hub-grid label,
.preset-control {
  display: grid;
  gap: 7px;
  color: #66717b;
  font-size: 12px;
  font-weight: 760;
}

.hub-grid label:last-child {
  grid-column: 1 / -1;
}

.hub-grid input,
.preset-control select {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(215, 224, 231, 0.92);
  border-radius: 13px;
  color: #20262d;
  background: rgba(255, 255, 255, 0.66);
}

.identify-panel {
  display: grid;
  gap: 14px;
}

.identify-panel[hidden],
.single-panel[hidden],
.hub-panel[hidden] {
  display: none;
}

.identify-actions,
.identify-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.identify-upload,
.identify-actions button,
.identify-result-actions button,
.identify-result-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(215, 224, 231, 0.92);
  border-radius: 12px;
  color: #34404a;
  background: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 760;
}

#identify-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.identify-dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 132px;
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.86);
  border-radius: 18px;
  color: #34404a;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.34)),
    rgba(248, 250, 252, 0.54);
  text-align: center;
  cursor: copy;
}

.identify-dropzone strong {
  color: #20262d;
  font-size: 15px;
}

.identify-dropzone span {
  max-width: 360px;
  color: #7a848e;
  font-size: 12.5px;
  line-height: 1.45;
}

.identify-dropzone:focus,
.identify-dropzone.is-dragging {
  border-color: rgba(17, 24, 39, 0.5);
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.06);
  outline: 0;
}

.identify-dropzone.is-dragging {
  background: rgba(255, 255, 255, 0.84);
}

#scanner-video {
  width: min(100%, 520px);
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(215, 224, 231, 0.92);
  border-radius: 16px;
  background: #111827;
}

.identify-result {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(215, 224, 231, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.identify-result[hidden],
#scanner-video[hidden] {
  display: none;
}

.identify-result p {
  margin: 0;
  color: #20262d;
  overflow-wrap: anywhere;
}

textarea:focus,
input:focus {
  border-color: rgba(20, 26, 32, 0.36);
  box-shadow: 0 0 0 4px rgba(20, 26, 32, 0.06);
  outline: 0;
}

.preview-card {
  align-content: stretch;
}

.qr-stage {
  display: grid;
  place-items: center;
  min-height: 390px;
  padding: clamp(10px, 2vw, 22px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.68), transparent 30rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.4)),
    rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.86), 0 12px 30px rgba(31, 38, 46, 0.05);
}

.site-shell.is-transparent .qr-stage {
  background:
    linear-gradient(45deg, rgba(203, 213, 225, 0.32) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(203, 213, 225, 0.32) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(203, 213, 225, 0.32) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(203, 213, 225, 0.32) 75%),
    #f8fafc;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.site-shell.is-transparent .qr-card {
  background: transparent;
}

.site-shell[data-mode="identify"] .editor-grid {
  grid-template-columns: 1fr;
  grid-template-areas: "input";
}

.site-shell[data-mode="identify"] .preview-card,
.site-shell[data-mode="identify"] .tool-footer {
  display: none;
}

.site-shell[data-preset="japanese"] .qr-stage {
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.92), rgba(254, 226, 226, 0.52));
}

.site-shell[data-preset="luxury"] .qr-stage {
  background: linear-gradient(135deg, rgba(251, 247, 237, 0.95), rgba(214, 188, 116, 0.2));
}

.site-shell[data-preset="cyberpunk"] .qr-stage {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(6, 182, 212, 0.2));
}

.site-shell[data-preset="corporate"] .qr-stage {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(219, 234, 254, 0.45));
}

.site-shell[data-preset="event"] .qr-stage {
  background: linear-gradient(135deg, rgba(253, 244, 255, 0.95), rgba(245, 208, 254, 0.35));
}

.site-shell[data-preset="wedding"] .qr-stage {
  background: linear-gradient(135deg, rgba(255, 250, 245, 0.96), rgba(253, 230, 210, 0.48));
}

.qr-card {
  display: grid;
  place-items: center;
  width: min(100%, 380px);
  max-width: 100%;
  aspect-ratio: 1;
  padding: 20px;
  border: 1px solid rgba(218, 226, 233, 0.72);
  border-radius: 0;
  background: #fff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.92), 0 18px 50px rgba(31, 38, 46, 0.08);
}

.qr-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  border-radius: 0;
}

.tool-footer {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 12px;
  padding: 18px 20px 20px;
  align-items: start;
  background: rgba(251, 252, 253, 0.34);
}

.preset-control {
  padding: 12px;
  border: 1px solid rgba(218, 226, 233, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.46);
}

.tool-footer p {
  margin: 0;
  color: #65707a;
  font-size: 12px;
  line-height: 1.5;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.color-metric,
.shape-metric,
.logo-metric {
  grid-column: 1 / -1;
}

.metric {
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(218, 226, 233, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 10px 24px rgba(31, 38, 46, 0.035);
}

.metric span,
.metric label {
  color: #66717b;
  font-size: 12px;
  font-weight: 760;
}

.input-metric,
.color-metric {
  display: grid;
  gap: 8px;
}

.input-metric input {
  width: 100%;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(215, 224, 231, 0.92);
  border-radius: 11px;
  color: #20262d;
  background: rgba(255, 255, 255, 0.66);
}

.color-metric {
  gap: 10px;
}

.color-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.color-choice,
.gradient-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  gap: 10px;
  padding: 5px 6px 5px 12px;
  border: 1px solid rgba(215, 224, 231, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.gradient-toggle {
  justify-content: flex-start;
}

.transparent-toggle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(215, 224, 231, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.transparent-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #111827;
}

.gradient-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #111827;
}

.accent-choice {
  opacity: 0.46;
}

.color-metric:has(#gradient:checked) .accent-choice {
  opacity: 1;
}

.logo-metric {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
}

.shape-metric {
  display: grid;
  gap: 10px;
}

.shape-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.shape-controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.shape-controls select {
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(215, 224, 231, 0.92);
  border-radius: 11px;
  color: #20262d;
  background: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

.logo-metric input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.logo-upload,
.logo-metric button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(215, 224, 231, 0.92);
  border-radius: 11px;
  color: #20262d;
  background: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.logo-metric button[hidden] {
  display: none;
}

input[type="color"] {
  width: 30px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(215, 224, 231, 0.92);
  border-radius: 10px;
  background: transparent;
  overflow: hidden;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 9px;
}

input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 9px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.button[aria-disabled="true"],
.action-row a[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.page-footer {
  width: calc(100% + 44px);
  margin: 56px -22px -22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  background: #050607;
}

.page-footer-inner {
  width: min(1280px, calc(100% - 44px));
  min-height: 300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 0.76fr) minmax(520px, 1.6fr);
  align-items: start;
  justify-content: space-between;
  gap: clamp(44px, 9vw, 120px);
  padding: 58px 0 38px;
}

.footer-identity {
  display: grid;
  gap: 18px;
  align-content: start;
}

.footer-logo-link {
  display: inline-flex;
  width: fit-content;
}

.footer-logo {
  display: block;
  width: min(190px, 72vw);
  height: auto;
  object-fit: contain;
}

.page-footer p {
  margin: 0;
  color: #8a949e;
  font-size: 13px;
  line-height: 1.7;
  text-align: left;
}

.footer-identity p {
  max-width: 260px;
}

.footer-email {
  width: fit-content;
  color: #d7dde4;
  font-size: 12.5px;
  font-weight: 720;
}

.footer-email:hover {
  color: #f8fafc;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-identity small {
  margin-top: 42px;
  color: #68717a;
  font-size: 11px;
  line-height: 1.5;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: clamp(22px, 3vw, 46px);
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
  font-style: normal;
}

.footer-column span {
  margin-bottom: 5px;
  color: #d7dde4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.footer-column a {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  color: #8a949e;
  font-size: 12.5px;
  font-weight: 650;
}

.footer-column a:hover {
  color: #f8fafc;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-status {
  grid-column: 1 / -1;
  max-width: 560px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 1100px) {
  .legal-hero {
    grid-template-columns: 1fr;
  }

  .legal-summary {
    max-width: 680px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-index {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 0 22px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.72);
  }

  .legal-index span {
    grid-column: 1 / -1;
  }

  .page-footer-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-identity p {
    max-width: 420px;
  }

  .footer-identity small {
    margin-top: 12px;
  }

  .footer-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.site-shell[data-theme="dark"] {
  color: #eef3f7;
  background: #0f1318;
}

.site-shell[data-theme="dark"]::before {
  background: none;
  opacity: 0;
}

.site-shell[data-theme="dark"]::after {
  background: none;
  opacity: 0;
}

.site-shell[data-theme="dark"] .nav,
.site-shell[data-theme="dark"] .tool-panel {
  border-color: rgba(180, 194, 208, 0.16);
  background: #171c22;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.24);
}

.site-shell[data-theme="dark"] .tool-panel::before {
  background: none;
  opacity: 0;
}

.site-shell[data-theme="dark"] .brand,
.site-shell[data-theme="dark"] h1,
.site-shell[data-theme="dark"] h2,
.site-shell[data-theme="dark"] h3,
.site-shell[data-theme="dark"] .mode-bar button.selected {
  color: #f4f7fa;
}

.site-shell[data-theme="dark"] .brand-muted {
  color: #8d98a4;
}

.site-shell[data-theme="dark"] .eyebrow,
.site-shell[data-theme="dark"] .hero-text,
.site-shell[data-theme="dark"] .nav-links,
.site-shell[data-theme="dark"] .tool-header p,
.site-shell[data-theme="dark"] .tool-header > span,
.site-shell[data-theme="dark"] .mode-shell > span,
.site-shell[data-theme="dark"] .editor-card span,
.site-shell[data-theme="dark"] .metric span,
.site-shell[data-theme="dark"] .metric label,
.site-shell[data-theme="dark"] .tool-footer p {
  color: #9aa6b2;
}

.site-shell[data-theme="dark"] .tool-header,
.site-shell[data-theme="dark"] .control-strip,
.site-shell[data-theme="dark"] .editor-grid,
.site-shell[data-theme="dark"] .input-card,
.site-shell[data-theme="dark"] .preview-card,
.site-shell[data-theme="dark"] .tool-footer {
  border-color: rgba(255, 255, 255, 0.1);
}

.site-shell[data-theme="dark"] .control-strip,
.site-shell[data-theme="dark"] .editor-grid,
.site-shell[data-theme="dark"] .tool-footer,
.site-shell[data-theme="dark"] .editor-card {
  background: #171c22;
}

.site-shell[data-theme="dark"] textarea,
.site-shell[data-theme="dark"] .qr-stage,
.site-shell[data-theme="dark"] .metric,
.site-shell[data-theme="dark"] .mode-bar,
.site-shell[data-theme="dark"] .input-metric input,
.site-shell[data-theme="dark"] .shape-controls select,
.site-shell[data-theme="dark"] .color-choice,
.site-shell[data-theme="dark"] .gradient-toggle,
.site-shell[data-theme="dark"] .logo-upload,
.site-shell[data-theme="dark"] .logo-metric button,
.site-shell[data-theme="dark"] input[type="color"] {
  border-color: rgba(180, 194, 208, 0.14);
  color: #eef3f7;
  background: #11161b;
  box-shadow: none;
}

.site-shell[data-theme="dark"] .liquid-indicator {
  border-color: rgba(180, 194, 208, 0.18);
  background: #252d36;
  box-shadow: none;
}

.site-shell[data-theme="dark"] .mode-bar button {
  color: #9facb7;
}

.site-shell[data-theme="dark"] .theme-toggle,
.site-shell[data-theme="dark"] .action-row button,
.site-shell[data-theme="dark"] .action-row a,
.site-shell[data-theme="dark"] .mode-tabs button,
.site-shell[data-theme="dark"] .hub-grid input,
.site-shell[data-theme="dark"] .preset-control,
.site-shell[data-theme="dark"] .preset-control select,
.site-shell[data-theme="dark"] .identify-dropzone,
.site-shell[data-theme="dark"] .identify-upload,
.site-shell[data-theme="dark"] .identify-actions button,
.site-shell[data-theme="dark"] .identify-result,
.site-shell[data-theme="dark"] .identify-result-actions button,
.site-shell[data-theme="dark"] .identify-result-actions a {
  color: #dbe4ec;
  border-color: rgba(180, 194, 208, 0.16);
  background: #1c232b;
  box-shadow: none;
}

.site-shell[data-theme="dark"] .nav-action,
.site-shell[data-theme="dark"] .action-row .primary-button,
.site-shell[data-theme="dark"] .mode-tabs button.selected {
  color: #f4f7fa;
  background: #2d3640;
  box-shadow: none;
}

.site-shell[data-theme="dark"] .identify-result p {
  color: #eef3f7;
}

.site-shell[data-theme="dark"] .identify-dropzone strong {
  color: #eef3f7;
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .hero {
    margin-top: 56px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 86px);
  }

  .control-strip {
    grid-template-columns: 1fr;
  }

  .tool-footer {
    align-items: start;
  }

}

@media (max-width: 1360px) {
  .control-strip {
    grid-template-columns: 1fr;
  }

  .mode-shell,
  .mode-bar {
    width: 100%;
  }

  .mode-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .action-row {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .legal-nav {
    min-height: 66px;
    padding: 0 18px;
  }

  .legal-nav > div {
    gap: 12px;
  }

  .legal-hero {
    padding: 34px 18px 32px;
  }

  .legal-hero h1 {
    font-size: clamp(48px, 16vw, 74px);
  }

  .legal-summary {
    padding: 18px;
  }

  .legal-layout {
    width: calc(100% - 36px);
    padding: 24px 0 58px;
    gap: 28px;
  }

  .legal-index {
    grid-template-columns: 1fr 1fr;
    gap: 9px 14px;
  }

  .legal-content section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 28px 0;
  }

  .site-shell {
    padding: 12px;
  }

  .tool-panel {
    display: grid;
  }

  .tool-header {
    order: 1;
  }

  .editor-grid {
    order: 2;
  }

  .control-strip {
    border-top: 1px solid rgba(224, 231, 237, 0.62);
  }

  .page-footer {
    width: calc(100% + 24px);
    margin: 42px -12px -12px;
  }

  .page-footer-inner {
    width: calc(100% - 24px);
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 42px 0 34px;
  }

  .footer-identity p {
    max-width: 420px;
  }

  .footer-identity small {
    margin-top: 12px;
  }

  .footer-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }

  .nav {
    top: 12px;
    height: auto;
    min-height: 58px;
    border-radius: 20px;
    gap: 12px;
    padding: 8px 10px 8px 14px;
  }

  .brand {
    font-size: 17px;
  }

  .nav-action {
    display: none;
  }

  .tool-header,
  .mode-tabs,
  .control-strip,
  .tool-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mode-tabs {
    overflow-x: auto;
  }

  .tool-header {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .mode-shell,
  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .mode-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .mode-bar button {
    min-width: 0;
    padding: 0 8px;
    font-size: 12px;
  }

  .action-row a,
  .action-row button {
    width: 100%;
  }

  .editor-card {
    min-height: 0;
    padding: 16px 14px;
  }

  .hub-grid,
  .shape-controls {
    grid-template-columns: 1fr;
  }

  .hub-grid label:last-child {
    grid-column: auto;
  }

  .editor-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "input"
      "preview"
      "settings";
  }

  .preview-card {
    border-bottom: 1px solid rgba(224, 231, 237, 0.62);
  }

  .tool-footer {
    border-left: 0;
  }

  textarea {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    overflow-x: auto;
    overflow-y: hidden;
    resize: none;
    white-space: nowrap;
  }

  .qr-stage {
    min-height: 0;
  }

  .qr-card {
    width: min(100%, 320px);
    padding: 14px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric {
    min-height: 0;
    padding: 10px;
    border-radius: 14px;
  }

  .input-metric {
    gap: 7px;
  }

  .input-metric input {
    min-height: 36px;
  }

  .color-metric {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 9px;
  }

  .color-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .transparent-toggle {
    grid-column: 1 / -1;
  }

  .color-choice,
  .gradient-toggle,
  .transparent-toggle {
    min-height: 42px;
    padding: 6px 8px 6px 11px;
  }

  .logo-metric {
    grid-column: 1 / -1;
    min-height: 50px;
    grid-template-columns: 1fr auto auto;
  }

  .color-metric > span {
    align-self: auto;
  }

  .color-metric label {
    justify-content: space-between;
  }

  input[type="color"] {
    width: 36px;
    height: 30px;
    border-radius: 10px;
  }
}

@media (max-width: 420px) {
  .site-shell {
    padding: 10px;
  }

  .hero {
    margin: 46px auto 22px;
  }

  h1 {
    font-size: clamp(38px, 15vw, 58px);
    line-height: 0.96;
  }

  .hero-text {
    font-size: 15px;
  }

  .tool-wrap {
    margin-top: 24px;
  }

  .tool-panel {
    border-radius: 22px;
  }

  .tool-header h2 {
    font-size: 24px;
  }

  .tool-header > span {
    max-width: 100%;
    white-space: normal;
  }

  .control-strip {
    gap: 12px;
  }

  .mode-bar {
    padding: 4px;
  }

  .mode-bar button {
    min-height: 36px;
    padding: 0 5px;
    font-size: 11px;
  }

  .liquid-indicator {
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / var(--item-count));
  }

  .qr-card {
    width: min(100%, 280px);
    padding: 12px;
  }

  .page-footer {
    width: calc(100% + 20px);
    margin: 36px -10px -10px;
  }

  .page-footer-inner {
    width: calc(100% - 20px);
  }

  .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-status,
  .footer-column:last-of-type {
    grid-column: 1 / -1;
  }
}
