:root {
  color-scheme: light;
  --ink: #152031;
  --muted: #637083;
  --line: #dce3ea;
  --canvas: #f5f7f9;
  --panel: #ffffff;
  --blue: #1769aa;
  --blue-dark: #0e4776;
  --teal: #16877d;
  --danger: #b34f4f;
  font-family: "Inter", "Noto Sans SC", "Noto Sans JP", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.site-header { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 5vw, 76px); background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.brand img { border-radius: 9px; }
.brand strong, .brand small { display: block; line-height: 1.1; }
.brand strong { font-size: 17px; font-weight: 700; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.secure-note { color: var(--teal); font-size: 12px; font-weight: 600; }
.language-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.language-select { color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 7px 28px 7px 10px; }
.workspace { width: min(1050px, calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 470px); gap: clamp(32px, 7vw, 110px); align-items: center; padding: clamp(52px, 10vh, 110px) 0 70px; }
.intro { align-self: start; padding-top: clamp(10px, 7vh, 82px); }
.eyebrow, .section-kicker { margin: 0 0 13px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .17em; }
h1 { max-width: 520px; margin: 0; font-size: clamp(31px, 4vw, 48px); line-height: 1.15; letter-spacing: 0; }
.lead { max-width: 500px; margin: 22px 0 28px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.trust-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.trust-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(22,135,125,.12); }
.tool-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 27px; box-shadow: 0 18px 45px rgba(21,32,49,.08); }
.panel-heading, .download-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
h2, h3 { margin: 0; letter-spacing: 0; }
h2 { font-size: 25px; }
h3 { font-size: 20px; }
.sectl-mark { opacity: .75; margin-top: 5px; }
.method-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 24px 0 18px; padding: 4px; background: #f0f3f6; border-radius: 7px; }
.method-tab { border: 0; border-radius: 5px; padding: 10px 8px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 650; }
.method-tab.is-active { color: var(--blue-dark); background: #fff; box-shadow: 0 1px 4px rgba(21,32,49,.12); }
.method-view { min-height: 286px; }
.hidden { display: none !important; }
.camera-frame { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #1d2735; border-radius: 7px; }
#camera { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s ease; }
#camera.is-live { opacity: 1; }
.camera-guide { position: absolute; inset: 17% 20%; border: 1px solid rgba(255,255,255,.65); border-radius: 10px; box-shadow: 0 0 0 999px rgba(11,18,28,.28); pointer-events: none; }
.camera-guide span::before, .camera-guide span::after { content: ""; position: absolute; width: 22px; height: 22px; border-color: #83e5d6; border-style: solid; }
.camera-guide span::before { left: -2px; top: -2px; border-width: 3px 0 0 3px; border-radius: 7px 0 0 0; }
.camera-guide span::after { right: -2px; bottom: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 7px 0; }
.camera-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; padding: 30px; color: rgba(255,255,255,.87); text-align: center; }
.camera-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,.52); border-radius: 50%; font-size: 27px; transform: rotate(90deg); }
.camera-placeholder p { margin: 0; font-size: 13px; line-height: 1.6; }
.primary-button { width: 100%; min-height: 43px; margin-top: 15px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: 6px; font-weight: 700; }
.primary-button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.primary-button:disabled { cursor: wait; opacity: .6; }
.helper { min-height: 20px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.field-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.code-entry { display: grid; grid-template-columns: 1fr 110px; gap: 9px; }
.code-entry .primary-button { width: auto; margin: 0; }
#session-code { width: 100%; min-height: 43px; padding: 9px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; outline: none; letter-spacing: .11em; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; }
#session-code:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,170,.14); }
.status { margin-top: 22px; padding: 11px 13px; border-left: 3px solid var(--line); background: #f7f9fb; color: var(--muted); font-size: 13px; line-height: 1.5; }
.status[data-tone="success"] { border-color: var(--teal); color: #16685f; background: #eef9f7; }
.status[data-tone="error"] { border-color: var(--danger); color: #8d3d3d; background: #fff3f3; }
.downloads { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.file-count { color: var(--muted); font-size: 12px; }
.download-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.download-button { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 53px; padding: 9px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; text-align: left; }
.download-button:hover { border-color: var(--blue); background: #f6fbff; }
.download-button strong, .download-button small { display: block; line-height: 1.25; }
.download-button small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.file-icon { display: grid; place-items: center; width: 29px; height: 29px; color: #fff; background: #23834d; border-radius: 4px; font-size: 13px; font-weight: 800; }
.file-icon.csv { background: #496a9a; }
.local-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.site-footer { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 20px 30px; color: #8b97a6; font-size: 11px; }
.footer-separator { color: #c3ccd5; }
@media (max-width: 780px) {
  .site-header { height: 68px; padding: 0 20px; }
  .secure-note { display: none; }
  .workspace { display: block; width: min(100% - 30px, 500px); padding: 34px 0 45px; }
  .intro { padding: 0; margin-bottom: 30px; }
  h1 { font-size: 31px; }
  .lead { margin: 15px 0 18px; font-size: 15px; }
  .tool-panel { padding: 20px; }
  .site-footer { padding-bottom: 22px; }
}
@media (max-width: 420px) {
  .header-actions { gap: 8px; }
  .language-select { padding-left: 7px; padding-right: 22px; }
  .tool-panel { padding: 16px; }
  .code-entry, .download-actions { grid-template-columns: 1fr; }
  .code-entry .primary-button { width: 100%; }
}
