:root {
  color-scheme: dark;
  --bg: #151916;
  --surface: #1d221e;
  --ink: #f0efe5;
  --muted: #a8b0a6;
  --faint: #93a08c;
  --line: #354035;
  --accent: #b6d58a;
  --error: #efb5a5;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.55;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 85% 0%, #26312265, transparent 55%), var(--bg); color: var(--ink); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button, .file-label, .text-action { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, label:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
input:focus-visible + .empty-state .file-label { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
.site-shell { max-width: 940px; margin: auto; padding: 0 32px; }
.site-header { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 28px; font-weight: 650; letter-spacing: -1.2px; }
.brand-mark { font-family: "Arial Hebrew", "Times New Roman", serif; font-size: 40px; line-height: 1; color: var(--accent); margin-top: -4px; }
.brand-id { font-weight: 400; color: var(--accent); }
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 24px; font-size: 12px; color: var(--muted); }
nav span { margin-left: 4px; }
main { max-width: 600px; margin: auto; padding-bottom: 52px; }
.intro { padding: 48px 0 28px; }
h1 { font-size: clamp(34px, 5vw, 46px); line-height: 1.12; letter-spacing: -1.8px; font-weight: 500; margin-bottom: 12px; }
.intro-copy { color: var(--muted); margin: 0; font-size: 14px; }
.checker-card, .registration-record { background: var(--surface); border: 1px solid #3c493b; border-radius: 16px; padding: 26px; }
.checker-card h2, .registration-record h2 { font-size: 15px; font-weight: 500; margin: 0 0 19px; }
.drop-zone { background: #171c18; border: 1px dashed #52614d; border-radius: 10px; position: relative; transition: border-color .18s, background .18s; }
.drop-zone.is-dragover { border-color: var(--accent); background: #2b3727; }
.empty-state { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 16px; }
.upload-icon { color: #a4b198; margin-bottom: 14px; }
.upload-icon svg { width: 33px; height: 33px; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { font-size: 16px; margin-bottom: 19px; }
.button { border: 0; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 46px; font-weight: 600; font-size: 13px; transition: background .18s, color .18s; }
.button-secondary { min-height: 38px; padding: 7px 17px; border: 1px solid #4d5b48; background: #262f24; color: var(--ink); font-size: 12px; font-weight: 500; }
.button-secondary:hover { border-color: var(--accent); background: #303b2c; }
.button-primary { width: 100%; background: var(--accent); color: #172215; margin-top: 20px; justify-content: space-between; padding: 12px 17px; }
.button-primary:hover:enabled { background: #c8e79d; }
.button-primary:disabled { background: #343e31; color: #a4b09e; }
.button-primary.is-loading { background: var(--accent); color: #172215; cursor: wait; }
.button-primary span[aria-hidden=true]:not(.spinner) { font-size: 20px; line-height: 1; }
.file-guidance-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 34px; padding-top: 7px; }
.file-guidance-row p { font-size: 11px; color: var(--faint); margin: 0; }
.text-action { font-size: 11px; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.text-action:hover { color: var(--accent); }
.image-guidance { font-size: 10px; line-height: 1.7; color: var(--faint); margin: 3px 0 0; }
.preview-state { padding: 12px; }
.preview-image-wrap { height: 250px; display: flex; justify-content: center; align-items: center; overflow: hidden; border-radius: 5px; background: #111612; }
.preview-image-wrap img { max-height: 100%; max-width: 100%; object-fit: contain; }
.preview-fallback { text-align: center; color: var(--faint); padding: 15px; }
.preview-fallback > span:first-child { display: block; font-size: 35px; line-height: 1; margin-bottom: 12px; }
.preview-fallback p { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.preview-fallback > span:last-child { font-size: 11px; }
.file-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.file-meta > div { min-width: 0; }
.file-name { font-size: 12px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 10px; color: var(--faint); margin: 2px 0 0; }
.icon-button { font-size: 23px; line-height: 1; background: transparent; border: 0; color: var(--muted); padding: 5px 8px; border-radius: 5px; }
.icon-button:hover { background: #303b2c; color: var(--ink); }
.error-message { font-size: 12px; color: var(--error); margin: 8px 0 0; padding: 10px 12px; border-radius: 6px; background: #492d262b; border: 1px solid #75443865; }
.spinner { width: 16px; height: 16px; border: 2px solid #17221540; border-top-color: #172215; border-radius: 50%; animation: spin .8s linear infinite; }
.progress-region { padding-top: 13px; }
.progress-track { height: 3px; overflow: hidden; border-radius: 3px; background: #3b4636; }
.progress-fill { width: 0; height: 100%; background: var(--accent); transition: width .2s; }
.progress-fill.is-processing { width: 35% !important; animation: progress-scan 1.3s ease-in-out infinite; }
.progress-region p { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.result-panel { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 23px; }
.result-topline { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: var(--accent); }
.result-symbol { background: #b6d58a14; border: 1px solid #b6d58a35; width: 24px; height: 24px; line-height: 22px; text-align: center; border-radius: 50%; font-size: 12px; }
.result-kicker { font-size: 9px; font-weight: 600; letter-spacing: 1.3px; }
.result-panel[data-tone=neutral] .result-topline { color: #adb6ad; }
.result-panel[data-tone=caution] .result-topline { color: #dbc49f; }
.result-panel h3 { font-size: 22px; font-weight: 500; letter-spacing: -.5px; line-height: 1.25; margin-bottom: 9px; outline: 0; }
.result-description { font-size: 12px; line-height: 1.7; color: var(--muted); margin-bottom: 17px; }
.result-details { margin: 0; }
.result-details > div { display: flex; justify-content: space-between; gap: 20px; font-size: 11px; margin: 8px 0; }
.result-details dt { color: var(--faint); }
.result-details dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.id-row { margin-top: 17px; background: #161d17; border: 1px solid #3a4836; border-radius: 7px; padding: 12px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.id-row > div { min-width: 0; }
.detail-label, .receipt-identity dt { color: var(--faint); font-size: 9px; font-weight: 600; letter-spacing: 1.2px; display: block; margin-bottom: 5px; }
#image-id, .receipt-image-id { display: block; font-size: 22px; letter-spacing: .3px; color: var(--accent); overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.copy-button { background: transparent; border: 1px solid #485b3f; color: var(--accent); border-radius: 5px; font-size: 11px; white-space: nowrap; padding: 7px 10px; }
.copy-button:hover { background: #b6d58a12; }
.copy-status { font-size: 10px; color: var(--muted); margin: 5px 0 0; }
.copy-status:empty { display: none; }
.result-date-row { padding: 14px 0 0; }
.result-date-row time { font-size: 13px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.result-record-link { display: inline-flex; gap: 9px; align-items: center; font-size: 12px; color: var(--accent); margin-top: 16px; text-decoration: underline; text-underline-offset: 4px; }
.record-comparison { font-size: 11px; color: var(--muted); line-height: 1.7; margin: 13px 0 0; }
.registration-record { margin-bottom: 22px; background: linear-gradient(135deg, #253021, #1b231c); }
.registration-record #receipt-loading { font-size: 12px; color: var(--muted); margin: 0; }
.receipt-identity { display: grid; grid-template-columns: 1fr 1.5fr; gap: 18px; margin: 0; }
.receipt-identity > div:last-child { grid-column: 1 / -1; }
.receipt-identity dd { font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.receipt-identity .receipt-image-id { font-size: 23px; line-height: 1.25; }
.receipt-identity a, .result-details a { text-decoration: underline; text-underline-offset: 3px; }
.receipt-image-panel { margin: 0 0 23px; }
.receipt-image-frame { display: flex; align-items: center; justify-content: center; overflow: hidden; background: #111612; border-radius: 8px; }
.receipt-image-frame img { display: block; width: auto; height: auto; max-width: 100%; max-height: 600px; object-fit: contain; }
.receipt-image-status { color: var(--muted); font-size: 12px; margin: 0; padding: 24px 12px; text-align: center; background: #111612; border-radius: 8px; }
.receipt-image-panel figcaption { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--faint); font-size: 11px; padding-top: 10px; }
.receipt-image-panel figcaption a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.receipt-image-panel figcaption a span { margin-left: 5px; }
.site-footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 25px; padding: 24px 0 30px; font-size: 10px; color: var(--faint); }
.site-footer > span { white-space: nowrap; }
.site-footer p { margin: 0; max-width: 290px; text-align: right; }
.service-purpose { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.service-purpose h2 { font-size: 23px; font-weight: 500; letter-spacing: -.5px; margin-bottom: 13px; }
.service-purpose p { font-size: 13px; line-height: 1.8; color: var(--muted); margin-bottom: 13px; }
.service-purpose .purpose-limit { font-size: 11px; color: var(--faint); }
.purpose-source { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progress-scan { 0% { transform: translateX(-100%); } 100% { transform: translateX(390%); } }
@media (max-width: 620px) {
  .site-shell { padding: 0 21px; }
  .site-header { min-height: 84px; gap: 15px; }
  .brand { font-size: 25px; gap: 8px; }
  .brand-mark { font-size: 35px; }
  nav { gap: 6px 17px; font-size: 10px; }
  .intro { padding: 34px 0 24px; }
  h1 { font-size: 36px; letter-spacing: -1.5px; }
  .intro-copy { font-size: 13px; }
  .checker-card, .registration-record { padding: 20px; border-radius: 13px; }
  .empty-state { min-height: 215px; }
  .preview-image-wrap { height: 215px; }
  .receipt-identity { grid-template-columns: 1fr; gap: 16px; }
  .receipt-identity > div:last-child { grid-column: auto; }
  .receipt-identity time { font-size: 12px; }
  #image-id { font-size: 19px; }
  .copy-button { font-size: 10px; }
  .site-footer { display: block; }
  .site-footer p { max-width: none; text-align: left; margin-top: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *:before, *:after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .progress-fill.is-processing { width: 100% !important; transform: none; }
}

.receipt-telegram { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.receipt-telegram-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.receipt-telegram-heading h3 { margin: 0; font-size: 14px; font-weight: 500; }
.receipt-telegram-heading a { color: var(--accent); font-size: 12px; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.receipt-telegram-status { margin: 8px 0 12px; color: var(--muted); font-size: 11px; }
.receipt-telegram-embed { display: block; width: 100%; max-width: 100%; min-height: 180px; border: 0; border-radius: 8px; background: transparent; }
.receipt-telegram-note { color: var(--faint); font-size: 10px; margin: 9px 0 0; }
.receipt-telegram .button { margin-top: 12px; }
