:root {
  --ink: #111;
  --muted: #333;
  --paper: #fff;
  --page: #f3f3f3;
  --orange: #f75900;
  --orange-2: #d94c00;
  --line: #e6e6e6;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, "Nirmala UI", "Noto Sans", sans-serif;
  background: var(--page);
  color: var(--muted);
  font-weight: 400;
}
.frame {
  min-height: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--paper);
}
.brand {
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand img { height: 46px; width: auto; display: block; }
#app {
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}
h1 {
  font-size: 1.65rem;
  line-height: 1.25;
  margin: 12px 0 12px;
  color: #000;
  font-weight: 500;
}
.stack { display: flex; flex-direction: column; gap: 12px; }
button.big {
  appearance: none;
  border: 0;
  width: 100%;
  min-height: 76px;
  padding: 16px 18px;
  border-radius: 0;
  background: var(--orange);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
button.big.job {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.job-title {
  display: block;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.2;
}
button.big small {
  display: block;
  margin-top: 0;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.35;
  opacity: 0.95;
}
.memory {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #333;
}
body[data-screen="home"],
body[data-screen="home"] .frame {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
body[data-screen="home"] .frame {
  display: flex;
  flex-direction: column;
}
body[data-screen="home"] .brand {
  flex: none;
  padding: 8px 12px 6px;
}
body[data-screen="home"] .brand img { height: 32px; }
body[data-screen="home"] #app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px 12px calc(6px + env(safe-area-inset-bottom));
}
body[data-screen="home"] .bar { flex: none; margin-bottom: 2px; }
body[data-screen="home"] button.ghost { min-height: 36px; font-size: 0.95rem; }
body[data-screen="home"] .purpose {
  flex: none;
  font-size: 0.9rem;
  line-height: 1.25;
  margin: 2px 0 6px;
}
body[data-screen="home"] .stack {
  flex: 1;
  min-height: 0;
  gap: 6px;
}
body[data-screen="home"] button.big.job {
  flex: 1 1 0;
  min-height: 0;
  padding: 6px 12px;
  gap: 2px;
}
body[data-screen="home"] .job-title {
  font-size: clamp(1rem, 2.7dvh, 1.28rem);
}
body[data-screen="home"] button.big.job small {
  font-size: clamp(0.75rem, 1.85dvh, 0.92rem);
  line-height: 1.2;
}
body[data-screen="home"] .memory {
  flex: none;
  margin: 6px 0 0;
  font-size: 0.75rem;
  line-height: 1.25;
}
body[data-screen="home"] a.quiet {
  flex: none;
  margin-top: 4px;
  font-size: 0.82rem;
}
.quiet-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex: none;
}
.quiet-row a.quiet {
  width: auto;
  margin-top: 8px;
}
body[data-screen="home"] .quiet-row {
  margin-top: 2px;
}
body[data-screen="home"] .quiet-row a.quiet {
  margin-top: 0;
}
body[data-screen="warehouse"],
body[data-screen="warehouse"] .frame {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
body[data-screen="warehouse"] .frame {
  display: flex;
  flex-direction: column;
}
body[data-screen="warehouse"] .brand {
  flex: none;
  padding: 8px 12px 4px;
}
body[data-screen="warehouse"] .brand img { height: 32px; }
body[data-screen="warehouse"] #app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 4px 12px calc(8px + env(safe-area-inset-bottom));
}
body[data-screen="warehouse"] h1 {
  flex: none;
  font-size: 1.05rem;
  line-height: 1.2;
  margin: 0 0 4px;
}
body[data-screen="warehouse"] .stack {
  flex: 1;
  min-height: 0;
  gap: 4px;
}
body[data-screen="warehouse"] button.big {
  flex: 1 1 0;
  min-height: 0;
  padding: 2px 14px;
  font-size: clamp(0.95rem, 2.6dvh, 1.2rem);
}
video.preview {
  display: block;
  width: 100%;
  max-height: 38vh;
  background: #111;
  object-fit: cover;
}
img.still, video.clip {
  display: block;
  width: 100%;
  max-height: 42vh;
  background: #111;
  object-fit: contain;
}
body[data-screen="job"],
body[data-screen="job"] .frame {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
body[data-screen="job"] .frame {
  display: flex;
  flex-direction: column;
}
body[data-screen="job"] .brand {
  flex: none;
  padding: 8px 12px 6px;
}
body[data-screen="job"] .brand img { height: 32px; }
body[data-screen="job"] #app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
body[data-screen="job"] h1 {
  flex: none;
  font-size: 1.35rem;
  margin: 6px 0 4px;
}
body[data-screen="job"] .instruction {
  flex: none;
  margin: 0 0 4px;
  font-size: 0.95rem;
  line-height: 1.3;
}
body[data-screen="job"] .place,
body[data-screen="job"] .note,
body[data-screen="job"] .status { flex: none; margin-top: 4px; margin-bottom: 4px; }
body[data-screen="job"] .stack { flex: none; gap: 6px; }
body[data-screen="job"] .actions { display: flex; gap: 6px; }
body[data-screen="job"] .actions > button { flex: 1; min-width: 0; }
body[data-screen="job"] button.big,
body[data-screen="job"] button.ghost {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 1.05rem;
}
body[data-screen="job"] button.big:disabled {
  min-height: 36px;
  padding: 6px 12px;
}
body[data-screen="job"] img.still,
body[data-screen="job"] video.preview,
body[data-screen="job"] video.clip {
  flex: 1 1 auto;
  min-height: 72px;
  max-height: none;
  width: 100%;
  object-fit: contain;
}
button[hidden] { display: none !important; }
body[data-screen="home"] .continues {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}
body[data-screen="home"] button.big.cont {
  min-height: 0;
  padding: 8px 12px;
}
body[data-screen="home"] button.big.cont small {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.25;
}
.status {
  min-height: 1.3rem;
  margin: 8px 0;
  font-weight: 500;
  color: #111;
}
button.big:disabled, button.ghost:disabled, button.big.idle { opacity: 0.45; }
button.big:active { background: var(--orange-2); }
button.big.on { background: #111; }
button.ghost.on { background: #111; color: #fff; border-color: #111; }
button.ghost {
  appearance: none;
  border: 1px solid var(--orange);
  background: #fff;
  color: var(--orange);
  min-height: 52px;
  border-radius: 0;
  font-size: 1.05rem;
  font-weight: 500;
  width: 100%;
  cursor: pointer;
}
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.bar span {
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
}
.place {
  display: inline-block;
  background: #111;
  color: #fff;
  font-weight: 500;
  border-radius: 0;
  padding: 4px 10px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.note {
  font-size: 1rem;
  line-height: 1.4;
  margin: 8px 0 16px;
  color: #666;
}
.instruction {
  font-size: 1.15rem;
  line-height: 1.45;
  margin: 0 0 16px;
  color: var(--muted);
}
.purpose {
  font-size: 1.15rem;
  line-height: 1.45;
  margin: 4px 0 16px;
  font-weight: 400;
  color: #000;
}
a.quiet {
  display: block;
  margin-top: 28px;
  text-align: center;
  color: #333;
  font-size: 0.9rem;
  font-weight: 500;
}
h2 {
  font-size: 0.95rem;
  margin: 22px 0 8px;
  color: #000;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.linkrow {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.linkrow span { flex: 1; min-width: 0; }
.linkrow b { color: #000; font-weight: 500; }
.linkrow small {
  display: block;
  color: #777;
  font-size: 0.75rem;
  word-break: break-all;
}
button.copy {
  appearance: none;
  border: 1px solid var(--orange);
  background: #fff;
  color: var(--orange);
  border-radius: 0;
  min-height: 40px;
  padding: 0 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  cursor: pointer;
}
