@font-face { font-family: Manrope; src: url('/assets/manrope.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
:root {
  color-scheme: light;
  font-family: Manrope, system-ui, sans-serif;
  --paper: #f4f0fb;
  --white: #fffdff;
  --ink: #241838;
  --muted: #5f536d;
  --accent: #69439c;
  --line: #d8cbe7;
  --lime: #e0f89e;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
a { color: inherit; }
:focus-visible { outline: 3px solid #8256bd; outline-offset: 3px; }
::selection { color: #241838; background: #ddcbf3; }
.wrap { width: min(69rem, calc(100% - 3rem)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 3; padding: .7rem 1rem; background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--line); background: #fbf8ff; }
.masthead .wrap { min-height: 4.1rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding-block: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; text-decoration: none; }
.brand img { flex: none; }
.more { font-size: .875rem; font-weight: 750; text-underline-offset: .22em; }
.intro { padding: clamp(2rem, 5vw, 3.65rem) 0 clamp(1.35rem, 3.5vw, 2rem); }
.intro h1 { margin: 0; max-width: 22ch; font-size: clamp(2.35rem, 5.5vw, 4.5rem); line-height: 1.01; font-weight: 800; letter-spacing: -.04em; }
.intro h1 span { color: var(--accent); }
.intro p { max-width: 55ch; margin: .85rem 0 0; color: var(--muted); font-size: 1.06rem; line-height: 1.55; }

.workbench { display: grid; grid-template-columns: 1fr .94fr; align-items: stretch; border-radius: 1.15rem; background: var(--white); border: 1px solid var(--line); box-shadow: 0 10px 26px #3d265b0e; }
.source, .readout { min-width: 0; padding: clamp(1rem, 3vw, 1.65rem); }
.workbench h2 { margin: 0; font-size: 1.16rem; font-weight: 800; line-height: 1.35; }
.drop { display: grid; justify-items: center; align-content: center; min-height: 14rem; margin-top: .95rem; padding: 1.2rem .8rem; border: 1.5px dashed #9377af; border-radius: .75rem; background: #f7f2fc; text-align: center; }
.drop[data-over] { background: #ebdff7; border-color: #7750ad; }
.picture-mark { position: relative; width: 2.05rem; height: 1.64rem; display: block; border: 1.75px solid #704bad; border-radius: .35rem; }
.picture-mark::before { content: ''; position: absolute; width: .31rem; aspect-ratio: 1; top: .31rem; left: .38rem; border-radius: 50%; background: #704bad; }
.picture-mark::after { content: ''; position: absolute; inset: .42rem .25rem .23rem; background: #a383cf; clip-path: polygon(0 100%, 34% 45%, 51% 65%, 72% 12%, 100% 100%); }
.drop-title { margin: .65rem 0 0; font-size: 1.06rem; font-weight: 800; }
.paste-hint { margin: .27rem 0 .82rem; color: var(--muted); font-size: .9375rem; line-height: 1.4; }
.button { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; padding: .55rem .9rem; border: 1px solid transparent; border-radius: .52rem; text-decoration: none; font-weight: 800; line-height: 1.25; }
.choose { color: #fff; background: #69439c; }
.choose:hover { background: #56347f; }
.source-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .42rem; }
.source-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; column-gap: .65rem; margin-top: .34rem; }
.source-meta p { margin: .35rem 0; color: var(--muted); font-size: .875rem; }
.text-button { min-height: 2.75rem; padding: .48rem .62rem; border: 0; border-radius: .35rem; color: #593487; background: transparent; font-size: .875rem; font-weight: 800; text-decoration: underline; text-underline-offset: .22em; }
.text-button:hover { background: #eae0f6; }
.problem { margin: .25rem 0 0; padding: .6rem .8rem; border-radius: .45rem; background: #fff1f1; color: #7d2c46; font-size: .92rem; line-height: 1.5; }
.privacy { margin: .72rem 0 0; color: var(--muted); font-size: .875rem; }

.readout { border-radius: 0 1.08rem 1.08rem 0; color: #fbf7ff; background: #2f1e47; }
.readout :focus-visible { outline-color: var(--lime); }
.readout-head { display: flex; position: relative; align-items: center; justify-content: space-between; gap: .5rem; min-height: 1.57rem; }
.reset { position: absolute; right: -.4rem; top: 50%; transform: translateY(-50%); color: #eee3fc; }
.reset:hover { background: #4b3565; }
.view { position: relative; display: grid; place-items: center; min-height: 13.8rem; margin-top: .95rem; padding: 1rem; overflow: hidden; border: 1px solid #6c5587; border-radius: .75rem; background: #3b2856; }
.preview { width: 100%; }
.view img { display: block; width: 100%; height: 11.6rem; object-fit: contain; }
.scanner { display: grid; place-items: center; width: min(100%, 13rem); height: 11.6rem; }
.finder { position: relative; width: 7.1rem; aspect-ratio: 1; color: #c8aaff; }
.finder i { position: absolute; width: 26%; height: 26%; border: solid currentColor; border-width: 2px 0 0 2px; border-top-left-radius: .48rem; }
.finder i:nth-child(2) { right: 0; transform: rotate(90deg); }
.finder i:nth-child(3) { right: 0; bottom: 0; transform: rotate(180deg); }
.finder i:nth-child(4) { bottom: 0; transform: rotate(270deg); }
.finder span { position: absolute; top: 50%; inset-inline: 16%; height: 2px; border-radius: 2px; background: #a287ca; }
.readout[data-state='reading'] .finder span { animation: scan 850ms ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(-1.45rem); } to { transform: translateY(1.45rem); } }
.readout-status { margin: .78rem 0 .15rem; color: #e0d1f0; font-size: .9rem; line-height: 1.45; }
.readout[data-state='found'] .readout-status { color: var(--lime); font-weight: 800; }
.result { margin-top: .8rem; }
.result label { display: block; margin-bottom: .36rem; color: #f4eaff; font-size: .875rem; font-weight: 800; }
.result textarea { display: block; width: 100%; min-height: 4em; max-height: 14rem; resize: vertical; border: 1px solid #9077b1; border-radius: .48rem; padding: .6rem .7rem; color: #fff; background: #21162f; line-height: 1.45; overflow-wrap: anywhere; }
.result-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.copy { color: var(--ink); background: var(--lime); }
.copy:hover { background: #edffc0; }
.open { color: #faefff; border-color: #9b81b9; }
.open:hover { background: #4b3565; }
.host { margin: .6rem 0 0; color: #e1d3ef; font-size: .875rem; line-height: 1.4; overflow-wrap: anywhere; }

.guide { display: grid; grid-template-columns: 1fr .94fr; gap: clamp(1.5rem, 6vw, 4.7rem); margin-top: clamp(2rem, 5vw, 3.8rem); padding: 1.8rem 0 2.1rem; border-top: 1px solid var(--line); }
.guide h2 { margin: 0; max-width: 22ch; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.13; letter-spacing: -.025em; }
.guide ol { margin: .95rem 0 0; padding-inline-start: 1.5rem; }
.guide li { padding-inline-start: .27rem; }
.guide li + li { margin-top: .55rem; }
.guide h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.guide p, .guide li { color: var(--muted); line-height: 1.6; }
.guide p { margin: .3rem 0 0; }
.guide p + h3 { margin-top: 1rem; }
.footer { margin-top: 2rem; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding-block: 1rem; color: var(--muted); font-size: .875rem; }
.footer a { text-underline-offset: .22em; }
.footer a:first-child { font-weight: 800; }
@media (max-width: 42rem) {
  .wrap { width: calc(100% - 1.75rem); }
  .workbench, .guide { grid-template-columns: 1fr; }
  .intro h1 span { display: block; }
  .readout { border-radius: 0 0 1.08rem 1.08rem; }
  .drop { min-height: 11.5rem; }
  .view { min-height: 10.75rem; padding: .7rem; }
  .view img, .scanner { height: 9.2rem; }
  .finder { width: 5.7rem; }
  .guide { padding-top: 1.3rem; }
}
@media (max-width: 24rem) {
  .masthead .wrap { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .readout[data-state='reading'] .finder span { animation: none; }
}
