@charset "UTF-8";

:root {
  color-scheme: dark;
  --bg: #101114;
  --surface: #202225;
  --stage: #17181c;
  --line: #34363c;
  --muted: #b4b8c2;
  --ink: #fff;
  --blue: #0a84ff;
  --blue-text: #071b33;
  --error: #ffaaa8;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
}

button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 2px solid #83c0ff; outline-offset: 4px; }

.shell {
  width: min(100%, 1088px);
  margin-inline: auto;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.masthead, .section-head, .preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.masthead { min-height: 44px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 750;
  font-size: 1.15rem;
  letter-spacing: .12em;
}
.brand-mark {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--blue);
  border-radius: 6px;
}
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  right: 3px;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
}
.brand-mark::before { width: 10px; bottom: 7px; }
.brand-mark::after { width: 6px; bottom: 3px; }

.privacy, .counter, .photo-count {
  color: var(--muted);
  font-size: .875rem;
}
.privacy { display: inline-flex; align-items: center; gap: 6px; text-align: right; }
.privacy span { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); }

h1, h2, p { margin: 0; }
h1 {
  margin-top: 22px;
  letter-spacing: -.055em;
  font-size: clamp(1.95rem, 5vw, 3.25rem);
  font-weight: 690;
  line-height: 1.15;
}
.intro { margin-top: 9px; color: var(--muted); }
h2 { font-size: 1.02rem; letter-spacing: -.018em; font-weight: 680; }

.workspace { display: grid; gap: 22px; margin-top: 28px; align-items: start; }
.section-head { min-height: 44px; margin-bottom: 8px; }

.stage {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: clamp(220px, 58vw, 310px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--stage);
}
.stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(62svh, 640px);
  object-fit: contain;
}
.empty { display: grid; justify-items: center; gap: 15px; padding: 22px; text-align: center; }
.empty p { color: var(--muted); font-size: .92rem; }
.photo-icon {
  position: relative;
  width: 47px;
  height: 39px;
  overflow: hidden;
  border: 1.5px solid #646a78;
  border-radius: 9px;
}
.photo-icon::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.photo-icon i {
  position: absolute;
  top: 20px;
  left: 5px;
  width: 28px;
  height: 28px;
  transform: rotate(45deg);
  border-top: 1.5px solid #646a78;
  border-left: 1.5px solid #646a78;
  border-radius: 3px;
}
.rendering {
  position: absolute;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 30px;
  background: #14161dee;
  font-size: .875rem;
}
.preview-meta {
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: .875rem;
  overflow-wrap: anywhere;
}
.numeric { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #2d3037;
  color: var(--ink);
  font-weight: 650;
  font-size: .95rem;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { background: var(--blue); color: var(--blue-text); }
.button:hover { border-color: #b4c8e0; }
.button:disabled { opacity: .55; cursor: default; }
.button.compact { padding-inline: 12px; font-size: .875rem; }
.button.wide { width: 100%; }

.photo-count { margin-inline-start: 4px; }
.photo-help, .helpline, .message { color: var(--muted); font-size: .875rem; }
.message { margin-top: 9px; overflow-wrap: anywhere; }
.message.error { color: var(--error); }
.photo-list {
  display: grid;
  gap: 6px;
  max-height: 240px;
  margin: 10px 0 0;
  padding: 2px 4px 2px 2px;
  overflow: auto;
  list-style: none;
}
.photo-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 4px; }
.photo-button {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--stage);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.photo-button[aria-pressed="true"] { border-color: var(--blue); background: #1a2636; }
.photo-index, .photo-time { font-size: .8125rem; color: var(--muted); }
.photo-name { display: block; overflow-wrap: anywhere; font-size: .875rem; }
.photo-time { display: block; }
.remove {
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.25rem;
}
.remove:hover { background: var(--surface); color: var(--ink); }

.panel {
  display: grid;
  gap: 12px;
  margin-top: 15px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
#batch-fields, .date-group { display: grid; gap: 9px; }
#batch-fields { gap: 13px; }
.date-group p { font-weight: 650; font-size: .92rem; }
.date-time { display: flex; flex-wrap: wrap; gap: 8px; }
.date-time label {
  flex: 1 1 114px;
  min-width: 0;
  color: var(--muted);
  font-size: .875rem;
}
input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--stage);
  color: var(--ink);
  font-size: 1rem;
  text-align: left;
}
input::-webkit-date-and-time-value { text-align: left; }
.panel .message { margin-top: 0; }
.actions, .batch-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.actions > * { flex: 1 1 125px; }
.footer { margin-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.footer summary { padding-block: 12px; cursor: pointer; }
.footer p { max-width: 48ch; padding-bottom: 8px; }

@media (min-width: 820px) {
  .shell { padding-inline: 28px; }
  .workspace { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 30px; }
  .stage { min-height: 350px; }
}
