/* REDDESK Family Disc — ivory / charcoal, deep red only for primary CTAs. */
:root {
  --ivory: #fbf8f2;
  --paper: #ffffff;
  --charcoal: #2b2a28;
  --muted: #5d5a55;
  --line: #ddd6ca;
  --red: #8f1d21;
  --red-dark: #6f1518;
  --ok: #1f6b3a;
  --warn: #8a5a00;
  --err: #a1261f;
  --focus: #1a5fb4;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
}
a { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.4; }
h2 { font-size: 1.3rem; margin: 0 0 .75rem; }
.small { font-size: .875rem; color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dev-banner { background: #3a3a3a; color: #fff; text-align: center; padding: .4rem 1rem; font-size: .85rem; }
.site-header { padding: .75rem 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.brand { text-decoration: none; color: var(--charcoal); display: inline-flex; flex-direction: column; }
.brand-main { font-weight: 700; letter-spacing: .02em; }
.brand-sub { font-size: .8rem; color: var(--muted); }
main { max-width: 760px; margin: 0 auto; padding: 0 16px 3rem; }
.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 16px; text-align: center; font-size: .875rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: center; }
.site-footer a { color: var(--muted); display: inline-block; min-height: 44px; line-height: 44px; }

.hero { padding: 2rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.5rem, 5vw, 2.1rem); margin: 0 0 1rem; }
.lead { font-size: 1.05rem; }
.price-pills { list-style: none; padding: 0; margin: 1rem 0 .25rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.price-pills li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem 1rem; display: flex; gap: .75rem; align-items: baseline; }
.pill-label { font-weight: 700; }
.pill-price { font-size: 1.4rem; font-weight: 700; }
.price-note { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.cta-group { display: flex; flex-direction: column; gap: .75rem; margin: 1.25rem 0 .75rem; }
@media (min-width: 640px) { .cta-group { flex-direction: row; flex-wrap: wrap; } }

.section { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.section.narrow { max-width: 560px; border-top: 0; }
.steps { padding-left: 1.25rem; }
.steps li { margin-bottom: .75rem; }
.steps li span { display: block; color: var(--muted); }
.table { width: 100%; border-collapse: collapse; background: var(--paper); }
.table th, .table td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); }
details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .5rem; padding: 0 1rem; }
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.cta-end { text-align: center; }
.pre-publish, .placeholder { background: #fff4e5; border: 1px dashed var(--warn); padding: .75rem 1rem; border-radius: var(--radius); font-size: .9rem; }
.mock-tag { font-size: .8rem; color: var(--warn); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: .6rem 1.25rem; border-radius: var(--radius);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary { background: var(--paper); color: var(--charcoal); border-color: var(--charcoal); }
.btn-ghost { background: transparent; color: var(--charcoal); border-color: var(--line); }
.btn-large { min-height: 56px; font-size: 1.05rem; }
.btn-small { min-height: 44px; padding: .4rem .9rem; font-size: .9rem; }
.btn[disabled], .btn.is-mock { opacity: .6; cursor: not-allowed; }

.notice { background: var(--paper); border-left: 4px solid var(--charcoal); padding: .75rem 1rem; margin: 1rem 0; border-radius: 4px; }
.notice-error { border-left-color: var(--err); color: var(--err); }
.notice-ok { border-left-color: var(--ok); color: var(--ok); }

/* form */
.form-title { font-size: 1.4rem; margin: 1.25rem 0 .5rem; }
.stepper { list-style: none; display: flex; gap: .25rem; padding: 0; margin: 0 0 1rem; font-size: .8rem; overflow-x: auto; }
.stepper li { flex: 1; text-align: center; padding: .35rem .25rem; border-bottom: 3px solid var(--line); color: var(--muted); white-space: nowrap; }
.stepper li[aria-current="step"] { border-bottom-color: var(--charcoal); color: var(--charcoal); font-weight: 700; }
.global-status { white-space: pre-line; }
.global-status.is-error { color: var(--err); background: #fdecea; padding: .6rem .9rem; border-radius: var(--radius); font-weight: 600; }
.global-status.is-ok { color: var(--ok); background: #e8f4ec; padding: .6rem .9rem; border-radius: var(--radius); }
.global-status.is-info { color: var(--charcoal); background: var(--paper); padding: .6rem .9rem; border-radius: var(--radius); }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1rem; }
.step h2:focus { outline: none; }
.field { margin: 0 0 1.25rem; border: 0; padding: 0; }
fieldset.field legend { font-weight: 700; margin-bottom: .25rem; padding: 0; }
.field > label { display: block; font-weight: 700; margin-bottom: .25rem; }
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.req { font-size: .75rem; color: var(--err); margin-left: .5rem; font-weight: 600; }
input[type="text"], input[type="email"], input[type="url"], input[type="date"], textarea {
  width: 100%; font: inherit; font-size: 16px; padding: .65rem .75rem; min-height: 48px;
  border: 1.5px solid #8d877d; border-radius: 8px; background: #fff; color: var(--charcoal);
}
[aria-invalid="true"] { border-color: var(--err) !important; }
.choice { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .25rem 0; font-weight: 400; cursor: pointer; }
.choice input { width: 22px; height: 22px; flex: none; accent-color: var(--charcoal); }
.help { font-size: .875rem; color: var(--muted); margin: .25rem 0; }
.field-error { color: var(--err); font-weight: 600; font-size: .9rem; margin: .25rem 0 0; }
.field-error:empty { display: none; }
.field-error::before { content: "⚠ "; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; margin-top: 1.5rem; }
.summary { background: var(--ivory); border-radius: var(--radius); padding: .75rem 1rem; margin: 1rem 0; }
.summary h3 { font-size: 1rem; margin: 0 0 .5rem; }
.file-picker { cursor: pointer; }

.upload-list { list-style: none; padding: 0; margin: 1rem 0; }
.upload-item { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; margin-bottom: .75rem; background: #fff; }
.upload-name { font-weight: 600; word-break: break-all; display: flex; gap: .5rem; }
.upload-icon { display: inline-block; width: 1.4em; text-align: center; border-radius: 50%; background: var(--line); }
.is-stored .upload-icon { background: var(--ok); color: #fff; }
.is-failed .upload-icon { background: var(--err); color: #fff; }
.upload-item progress { width: 100%; height: 12px; margin: .4rem 0; accent-color: var(--charcoal); }
.upload-status { margin: .25rem 0; font-size: .9rem; }
.is-stored .upload-status { color: var(--ok); font-weight: 700; }
.upload-error { color: var(--err); font-size: .9rem; margin: .25rem 0; }
.upload-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }

.receipt { font-size: 1.2rem; }
.receipt strong { font-family: ui-monospace, Menlo, monospace; letter-spacing: .05em; }
.status-line { display: flex; gap: .5rem; align-items: flex-start; margin: .25rem 0; }
.status-mark { flex: none; width: 1.4em; text-align: center; border-radius: 50%; color: #fff; }
.status-line.is-ok .status-mark { background: var(--ok); }
.status-line.is-warn .status-mark { background: var(--warn); }
.line-box, .email-box { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1rem; }
.line-box .btn, .email-box .btn { margin: .25rem .5rem .25rem 0; }
.line-message { background: var(--ivory); border: 1px solid var(--line); border-radius: 8px; padding: .75rem; white-space: pre-wrap; word-break: break-all; font-size: .95rem; }
.qr-box { margin-top: 1rem; }
.qr-box img { background: #fff; border: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.new-request { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1rem; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.legal-table th, .legal-table td { border-bottom: 1px solid #ddd; padding: .6em .4em; text-align: left; vertical-align: top; }
.legal-table th { width: 32%; white-space: normal; font-weight: 600; }
.legal h2 { font-size: 1.05rem; margin-top: 1.4em; }
.legal ol, .legal ul { padding-left: 1.4em; }
.legal li { margin: .4em 0; }

/* Family: discs and recording order */
.disc-card { border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1.25rem 0; background: var(--paper); }
.disc-card h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.disc-options { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.disc-options .field { margin: 0; }
.disc-options select { min-height: 44px; }
.disc-meters { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: .75rem 0 .25rem; }
.meter-label { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.meter progress { width: 100%; height: 10px; accent-color: var(--charcoal); }
.meter.is-full .meter-label { color: var(--err); }
.disc-list { margin: .75rem 0; }
.disc-foot { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.overflow-notice { width: 100%; }
.row-head { display: flex; align-items: center; gap: .5rem; }
.row-no { min-width: 2rem; height: 2rem; border-radius: 50%; background: var(--charcoal); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.row-title { display: flex; flex-direction: column; min-width: 0; }
.row-display { overflow-wrap: anywhere; }
.row-meta { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.drag-handle { flex: none; width: 44px; height: 44px; border: 1px dashed var(--line); border-radius: 8px; background: var(--ivory); font-size: 1.3rem; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.upload-item.is-dragging { opacity: .85; box-shadow: 0 6px 18px rgba(0,0,0,.18); border-color: var(--charcoal); }
.upload-name.small { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.row-tools { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .5rem; }
.rename-panel, .move-panel { margin-top: .5rem; padding: .75rem; background: var(--ivory); border-radius: 8px; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.rename-panel { flex-direction: column; align-items: stretch; }
.rename-panel input { width: 100%; }
.move-panel select, .move-panel input { min-height: 44px; }
.add-disc-row { margin: 1rem 0; }
.price-summary { margin: 1rem 0; padding: .75rem 1rem; border-radius: var(--radius); background: #f3efe6; }
.disc-summary { padding-left: 1.2rem; }
@media (max-width: 480px) { .disc-meters { grid-template-columns: 1fr; } }
/* compact rows so 50 videos stay manageable on a phone */
.disc-list .upload-item { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; padding: .5rem .6rem; margin-bottom: .5rem; }
.disc-list .upload-item > * { flex-basis: 100%; margin-top: 0; margin-bottom: 0; }
.disc-list .upload-item > .row-tools, .disc-list .upload-item > .upload-actions { flex-basis: auto; margin: 0; }
.disc-list .upload-item.is-stored > .upload-status { display: none; }
.disc-list .upload-name.small { margin-top: 0; }
.disc-list .row-tools .btn-small, .disc-list .upload-actions .btn-small { padding: .3rem .55rem; min-width: 44px; font-size: .85rem; }
.disc-list .upload-name.small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disc-list .row-head { gap: .4rem; }
.disc-list .drag-handle { width: 40px; height: 44px; }
.disc-list .row-no { min-width: 1.8rem; height: 1.8rem; font-size: .9rem; }
@media (max-width: 480px) { .disc-card { padding: .6rem; margin: 1rem -0.25rem; } .disc-list .row-tools { gap: .2rem; } }
.disc-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; width: 100%; }
.confirmed-note { color: var(--ok); font-weight: 600; margin: 0; }

/* Family: phone UX (preparing box, thumbnails, drag, disc badges, numbering, confirm attention) */
.prep-box { display: flex; gap: .75rem; align-items: flex-start; width: 100%; padding: .85rem; border: 2px solid var(--charcoal); border-radius: var(--radius); background: var(--ivory); }
.prep-box strong { font-size: 1.05rem; }
.prep-box p { margin: .25rem 0; }
.prep-box progress { width: 100%; height: 10px; accent-color: var(--charcoal); }
.prep-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.spinner { flex: none; width: 1.6rem; height: 1.6rem; margin-top: .1rem; border: 3px solid var(--line); border-top-color: var(--charcoal); border-radius: 50%; animation: rdf-spin .8s linear infinite; }
@keyframes rdf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.row-thumb { flex: none; position: relative; width: 64px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--ivory); display: inline-flex; align-items: center; justify-content: center; }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-touch-callout: none; pointer-events: none; }
.row-thumb.is-playable { cursor: pointer; }
.play-mark { position: absolute; right: 2px; bottom: 1px; font-size: .7rem; color: #fff; text-shadow: 0 0 3px rgba(0,0,0,.8); }
.thumb-none { font-size: .7rem; color: var(--muted); }
.preview-box { width: 100%; display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }
.preview-box video { width: 100%; max-height: 50vh; background: #000; border-radius: 6px; }
.disc-list .row-head { width: 100%; }
.disc-list .row-title { flex: 1 1 auto; }
.disc-list .drag-handle { margin-left: auto; font-size: 1.5rem; line-height: 1; }
.disc-list .upload-item { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.disc-list .upload-item input { -webkit-user-select: text; user-select: text; }
.disc-list.is-sorting .upload-item:not(.is-dragging) { transition: transform .1s; }
.upload-item.is-dragging { transform: scale(1.02); background: var(--ivory); position: relative; z-index: 2; }

.disc-title { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; margin-bottom: .25rem; }
.disc-title h3 { margin: 0 .25rem 0 0; }
.disc-badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; background: var(--charcoal); color: #fff; font-weight: 700; font-size: 1rem; }
.disc-badge.is-ok { background: var(--paper); color: var(--charcoal); border: 2px solid var(--charcoal); font-size: .85rem; }
.disc-copies { margin: 0 0 .5rem; font-weight: 600; }
.btn-number { display: inline-flex; flex-direction: column; align-items: flex-start; text-align: left; font-weight: 700; }
.btn-number small { font-weight: 400; font-size: .8rem; }
.btn-confirm.is-attention { outline: 3px solid var(--err); outline-offset: 3px; animation: rdf-pulse 1s ease-in-out 3; }
@keyframes rdf-pulse { 50% { outline-offset: 7px; } }
@media (prefers-reduced-motion: reduce) { .btn-confirm.is-attention { animation: none; } }

/* completion: the order is accepted even when the receipt mail failed */
.done-box { border: 3px solid var(--ok); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; background: var(--paper); }
.done-box h2 { margin-top: 0; color: var(--ok); font-size: 1.5rem; }
.done-box .receipt { font-size: 1.25rem; margin: .5rem 0; }
.receipt-mail { font-weight: 700; margin: 0; }
.receipt-mail.is-warn { color: var(--err); }
