:root {
  color-scheme: light;
  font-family: "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: #252933;
  background: #fff;
  font-size: 16px;
  line-height: 1.65;
  --muted: #59616d;
  --line: #e4e6eb;
  --field: #f5f6f8;
  --accent: #4d55be;
  --accent-hover: #3b43a8;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(100% - 48px, 1080px); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--line); }
.brand { padding-block: 17px; font: 700 13px/1.4 system-ui, sans-serif; }
main { padding-block: 35px 64px; }
h1 { margin: 0 0 12px; font-size: clamp(22px, 2.7vw, 32px); line-height: 1.4; }
p { margin: 0 0 12px; overflow-wrap: anywhere; }
.hint, details { font-size: 13px; color: var(--muted); }
a { color: var(--accent-hover); text-underline-offset: 3px; }
a, button { overflow-wrap: anywhere; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--accent-hover); }
.secondary { background: #fff; border-color: #cbd0da; color: #252933; }
.secondary:hover { background: var(--field); }
.quiet { background: transparent; color: var(--muted); }
.quiet:hover { background: var(--field); }
button:disabled { background: #eef0f3; color: var(--muted); cursor: not-allowed; }
:focus-visible, .file-choice input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 3px; }
.file-choice { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.file-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-choice input:disabled + label { opacity: .55; cursor: not-allowed; }
#selected-file { overflow-wrap: anywhere; }
.recommendations { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 8px; font-size: 13px; }
details summary { display: list-item; width: fit-content; padding-block: 10px; min-height: 44px; cursor: pointer; }
details p { max-width: 70ch; }
.action-bar { display: flex; justify-content: flex-end; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.studio-workspace { display: grid; grid-template-columns: minmax(0, 2.35fr) minmax(170px, 1fr); align-items: start; gap: clamp(24px, 5vw, 68px); }
.studio-controls { min-width: 0; }
.embedded-studio .masthead { display: none; }
.embedded-studio .studio-workspace { grid-template-columns: minmax(0, 1fr); padding-block: 24px; }
#photo-preview-row { margin-top: 12px; }
.result-info { min-width: 0; }
.url-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin: 20px 0 6px; }
.url-row input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--field); color: inherit; font: inherit; font-size: 13px; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.preview-label { margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.phone { width: min(100%, 274px); padding: 7px; border: 1px solid #373b57; border-radius: 23px; background: #252943; box-shadow: 0 8px 24px #25294317; }
.phone canvas, .phone video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #252943; border-radius: 16px; }
.feedback { margin-top: 16px; }
.generation-progress { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
progress { display: block; width: 100%; height: 8px; accent-color: var(--accent); }
#progress-number { min-width: 3em; color: var(--accent-hover); text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
#status { margin: 0; font-size: 13px; color: var(--muted); }
#status[data-error="true"] { color: #a12231; }
@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  main { padding-block: 26px 40px; }
  .studio-workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 430px) {
  .url-row { grid-template-columns: minmax(0, 1fr); }
  .action-bar button { width: 100%; }
}
