:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #eef2ff;
  --text: #111827;
  --muted: #64748b;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  min-height: 44px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.94rem;
}

nav a:hover {
  color: var(--primary);
}

.hero {
  padding: 76px 0 34px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.14), transparent 30%);
}

.hero-grid,
.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.hero-grid > *,
.tool-grid > *,
.cards > *,
.contact-grid > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  margin: 0 0 18px;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  margin: 0 0 10px;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.hero-copy {
  font-size: 1.16rem;
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 26px;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: 0.18s ease;
  min-height: 44px;
}

.button.primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.button.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--text);
  background: #e2e8f0;
}

.button.secondary:hover {
  background: #cbd5e1;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.trust-row span {
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-card,
.panel,
.card,
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 26px;
}

.check-list {
  padding: 0;
  list-style: none;
  display: grid;
  gap: 13px;
  color: var(--muted);
}

.check-list li {
  padding-left: 28px;
  position: relative;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 900;
}


.tool-section {
  padding: 36px 0;
}

.panel {
  padding: 26px;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  margin: 0;
}

.center {
  text-align: center;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 5px;
  background: #f1f5f9;
  border-radius: 999px;
  margin-bottom: 18px;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.tab {
  border: 0;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
}

.tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.form {
  display: grid;
  gap: 16px;
}

.field-group {
  display: none;
  gap: 12px;
}

.field-group.active {
  display: grid;
}

label {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
  font-size: 0.93rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 13px;
  font: inherit;
  background: #fff;
  color: var(--text);
}

input[type="color"] {
  min-height: 44px;
  padding: 6px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(37, 99, 235, 0.16);
  border-color: var(--primary);
}

.two-col,
.three-col,
.print-grid {
  display: grid;
  gap: 12px;
}

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

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

.details-card,
.style-box,
.mini-panel,
.result-box {
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 18px;
  padding: 14px;
}

.details-card summary {
  font-weight: 900;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.helper {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 10px 0 0;
}

.preview-panel {
  position: sticky;
  top: 82px;
}

.qr-card {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 22px;
  display: grid;
  place-items: center;
  min-height: 342px;
  text-align: center;
}

.qr-output {
  width: 256px;
  min-height: 256px;
  display: grid;
  place-items: center;
  background: white;
  border-radius: 18px;
}

.qr-output img,
.qr-output canvas {
  border-radius: 12px;
  max-width: 100%;
  height: auto;
}

.qr-label {
  margin: 14px 0 0;
  font-weight: 900;
}

.status {
  margin: 14px 0;
  border-radius: 14px;
  padding: 12px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 800;
}

.status.warn {
  background: #fffbeb;
  color: #92400e;
}

.status.error {
  background: #fef2f2;
  color: #991b1b;
}

.mini-panel {
  margin-top: 16px;
}

.mini-panel h3 {
  margin-bottom: 10px;
}

.mini-panel textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
}

.print-section,
.content-section,
.faq-section {
  padding: 30px 0;
}

.print-grid {
  grid-template-columns: 1.2fr 0.8fr auto;
  align-items: end;
}

.print-grid.simplified {
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: stretch;
}

.recommended-size-card {
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, #eff6ff, #ffffff);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  gap: 2px;
  align-content: center;
}

.recommend-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.recommended-size-card strong {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.recommended-size-card small {
  color: var(--muted);
  font-weight: 700;
}

.result-box {
  margin-top: 16px;
  color: var(--muted);
}

.result-box strong {
  color: var(--text);
}

.result-good {
  border-color: rgba(16, 185, 129, 0.45);
  background: #ecfdf5;
}

.result-warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: #fffbeb;
}

.result-bad {
  border-color: rgba(239, 68, 68, 0.45);
  background: #fef2f2;
}

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

.card {
  padding: 22px;
}

.card p,
.faq p {
  color: var(--muted);
  margin: 0;
}

.faq {
  display: grid;
  gap: 12px;
  max-width: 880px;
  margin: 0 auto;
}

.faq details {
  padding: 18px 20px;
}

.faq summary {
  font-weight: 900;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.faq p {
  margin-top: 12px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--muted);
  margin-top: 30px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.footer a {
  margin-left: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 920px) {
  .hero-grid,
  .tool-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
  }

  .print-grid,
  .print-grid.simplified,
  .three-col {
    grid-template-columns: 1fr;
  }

  nav {
    display: none;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1160px);
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .panel,
  .hero-card {
    padding: 20px;
  }

  .qr-output {
    width: 220px;
    min-height: 220px;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer a {
    margin-left: 0;
    margin-right: 14px;
  }
}


.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.contact-card {
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 18px;
  padding: 18px;
}

.contact-card p,
.contact-card li {
  color: var(--muted);
}

.notice-box {
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: #eff6ff;
  border-radius: 18px;
  padding: 16px;
  color: var(--muted);
  margin: 18px 0;
}

.policy-content h2 {
  margin-top: 30px;
}

.policy-content p,
.policy-content li {
  color: var(--muted);
}

.policy-content ul {
  padding-left: 22px;
}

.contact-list {
  padding-left: 20px;
}

@media (max-width: 920px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.notice-box a,
.policy-content a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}


.text-link {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-hero {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.guide-card-grid .card h3 a {
  color: var(--text);
}

.guide-card-grid .card h3 a:hover,
.article-content a:hover {
  color: var(--primary);
}

.article-content {
  max-width: 920px;
  margin: 0 auto;
}

.article-content h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.article-content h2 {
  margin-top: 34px;
}

.article-content p,
.article-content li {
  color: var(--muted);
}

.article-content section p {
  margin: 0 0 14px;
}

.toc {
  display: block;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
  margin: 22px 0 6px;
  color: var(--text);
}

.toc ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.toc a,
.article-content a {
  color: var(--primary);
  font-weight: 800;
}

.guide-cta {
  color: var(--muted);
}

.guide-next {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

@media (max-width: 620px) {
  .article-content h1 {
    font-size: 2.05rem;
  }
}
