/*
 * daysmart.co.jp / Signet のデザイントークンに合わせたスタイル。
 * コーポレートサイトがダーク固定なので、こちらもダーク固定にしている。
 */

:root {
  --bg: #0b0a09;
  --text: #f5f1ed;
  --muted: #ab9f95;
  --dim: #857a70;

  --ember: #ff8a3d;
  --ember-soft: #ffc48a;
  --ember-deep: #f2560f;
  --ember-grad: linear-gradient(to right, #ffc48a 0%, #ff8a3d 50%, #f2560f 100%);

  --surface: rgba(50, 42, 37, 0.4);
  --panel: rgba(32, 29, 25, 0.8);
  --raise: rgba(75, 64, 56, 0.22);
  --border: rgba(73, 63, 57, 0.6);
  --border-strong: rgba(103, 90, 80, 0.8);
  --grid: rgba(75, 64, 56, 0.55);

  --radius: 16px;
  --radius-sm: 10px;
  --pill: 9999px;
  --header-h: 72px;
  --wrap: 768px;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Zen Kaku Gothic New', 'Instrument Sans', ui-sans-serif, system-ui,
    'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  font-size: 16px;
  line-height: 2;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- ヘッダー ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(11, 10, 9, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand span {
  font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.who {
  font-size: 12.5px;
  color: var(--dim);
  line-height: 1.4;
  text-align: right;
}

/* ---------- ヒーロー ---------- */

.hero {
  position: relative;
  padding: 56px 0 40px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

/* グリッド線とエンバーの光。コーポレートサイトの背景処理に合わせている。 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(120% 100% at 20% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(120% 100% at 20% 0%, #000 0%, transparent 75%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 78% at 12% 0%, rgba(255, 196, 138, 0.1), transparent 62%),
    radial-gradient(52% 70% at 92% 20%, rgba(242, 86, 15, 0.09), transparent 66%);
  pointer-events: none;
}

.hero > * {
  position: relative;
}

/* ---------- 見出し ---------- */

.label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--ember);
}

.label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: linear-gradient(to right, var(--ember), transparent);
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.sub {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.9;
}

/* ---------- カード ---------- */

main {
  padding-bottom: 72px;
}

section.card {
  margin-top: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---------- ドロップゾーン ---------- */

.drop {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--raise);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.drop:hover,
.drop:focus-visible,
.drop.over {
  border-color: var(--ember);
  background: rgba(242, 89, 13, 0.08);
  color: var(--text);
  outline: none;
}

.drop strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- ファイル一覧 ---------- */

.files {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.files:empty {
  margin: 0;
}

.files li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.6;
}

.files .name {
  overflow-wrap: anywhere;
}

.files .size {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.files .state {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.files .state.done {
  color: var(--ember);
}

.files .state.error {
  color: #ff7a6b;
}

.files .bar {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.files a {
  color: var(--ember);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 138, 61, 0.4);
}

.files a:hover {
  border-bottom-color: var(--ember);
}

/* ---------- 進捗バー ---------- */

.bar {
  height: 4px;
  background: rgba(75, 64, 56, 0.5);
  border-radius: var(--pill);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ember-grad);
  border-radius: var(--pill);
  transition: width 0.2s ease-out;
}

/* ---------- フォーム ---------- */

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--dim);
}

input[type='text'],
input[type='password'],
input[type='number'],
input[type='email'],
input[type='tel'],
select {
  width: 100%;
  padding: 11px 13px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  background: rgba(11, 10, 9, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}

input::placeholder {
  color: var(--dim);
  opacity: 0.7;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--ember);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

/* ---------- ボタン ---------- */

button {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  padding: 12px 22px;
  color: var(--bg);
  background: var(--ember-grad);
  border: 1px solid transparent;
  border-radius: var(--pill);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
}

button:hover:not(:disabled) {
  opacity: 0.88;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

button.ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}

button.ghost:hover:not(:disabled) {
  background: var(--raise);
  border-color: var(--muted);
  opacity: 1;
}

button.small {
  padding: 10px 16px;
  font-size: 12.5px;
}

button.link {
  padding: 0;
  color: var(--dim);
  background: none;
  border: none;
  border-radius: 0;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

button.link:hover:not(:disabled) {
  color: var(--text);
  opacity: 1;
}

/* ---------- レイアウト補助 ---------- */

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.grow {
  flex: 1;
  min-width: 0;
}

.copy-field {
  display: flex;
  gap: 8px;
}

.copy-field input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.notice {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--dim);
}

.error {
  margin-top: 14px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: #ffb3a8;
  background: rgba(255, 90, 70, 0.08);
  border-left: 2px solid #ff7a6b;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.hidden {
  display: none !important;
}

.meta {
  display: flex;
  gap: 8px 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--dim);
}

.warn {
  margin-top: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
  background: rgba(242, 89, 13, 0.08);
  border-left: 2px solid var(--ember);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

footer {
  margin-top: 28px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--dim);
  text-align: center;
}

a {
  color: var(--ember);
}

::selection {
  background: rgba(255, 138, 61, 0.3);
}

@media (max-width: 520px) {
  .hero {
    padding: 40px 0 32px;
  }
  section.card {
    padding: 20px 16px;
  }
}

/* ---------- 共有URL＋QRコード ---------- */

.share {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.share-main {
  flex: 1;
  min-width: 260px;
}

.qr {
  margin: 0;
  text-align: center;
  flex-shrink: 0;
}

.qr svg {
  display: block;
  width: 132px;
  height: 132px;
  /* 読み取りやすさのため、QRだけは白地のまま出す */
  background: #fff;
  border-radius: 8px;
  padding: 6px;
}

.qr figcaption {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--dim);
}

/* ---------- 同意チェック ---------- */

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  cursor: pointer;
}

.check input[type='checkbox'] {
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
  flex-shrink: 0;
  accent-color: var(--ember);
  cursor: pointer;
}

/* ---------- 規約・ポリシー本文 ---------- */

.doc {
  font-size: 14.5px;
  line-height: 2;
  color: var(--muted);
}

.doc h2 {
  margin: 36px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 16px;
  color: var(--text);
}

.doc > p:first-child {
  margin-top: 0;
}

.doc h3 {
  margin: 24px 0 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.doc ol,
.doc ul {
  margin: 0 0 16px;
  padding-left: 1.6em;
}

.doc li {
  margin-bottom: 6px;
}

.doc ul ul,
.doc ol ul {
  margin-top: 6px;
}

.doc strong {
  color: var(--text);
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 13.5px;
}

.doc th,
.doc td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  line-height: 1.8;
}

.doc th {
  width: 1%;
  white-space: nowrap;
  color: var(--text);
  background: var(--raise);
  font-weight: 500;
}

.doc code {
  padding: 2px 6px;
  background: var(--raise);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: var(--text);
}

.doc hr {
  margin: 32px 0 16px;
  border: 0;
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .doc table,
  .doc tbody,
  .doc tr,
  .doc th,
  .doc td {
    display: block;
    width: auto;
  }
  .doc tr {
    margin-bottom: 12px;
  }
  .doc th {
    white-space: normal;
    border-bottom: 0;
  }
  .doc td {
    border-top: 0;
  }
}

/* ---------- ダウンロード履歴 ---------- */

.scroll-x {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

table.events {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.6;
}

table.events th,
table.events td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

table.events th {
  color: var(--dim);
  font-weight: 500;
  border-bottom-color: var(--border-strong);
}

table.events td {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

table.events tr:last-child td {
  border-bottom: 0;
}

table.events td.wrap-any {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 22em;
}

/* ---------- サービス紹介 ---------- */

.about h2 {
  font-size: 19px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px 28px;
  margin-bottom: 28px;
}

.feature h3 {
  margin: 0 0 6px;
  padding-left: 14px;
  position: relative;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
}

.feature h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--ember-grad);
}

.feature p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--muted);
}

table.spec {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
  font-size: 13px;
}

table.spec th,
table.spec td {
  padding: 10px 0;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  line-height: 1.8;
}

table.spec th {
  width: 11em;
  padding-right: 16px;
  color: var(--dim);
  font-weight: 500;
  white-space: nowrap;
}

table.spec td {
  color: var(--muted);
}

@media (max-width: 480px) {
  table.spec th,
  table.spec td {
    display: block;
    width: auto;
    padding: 0;
  }
  table.spec th {
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  table.spec td {
    padding-bottom: 12px;
    border-top: 0;
  }
}

/* ---------- 運営画面 ---------- */

.wrap.wide {
  max-width: 1100px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
}

.stat-label {
  font-size: 12px;
  color: var(--dim);
}

a.dl {
  font-size: 12.5px;
  color: var(--ember);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 138, 61, 0.4);
}

a.dl:hover {
  border-bottom-color: var(--ember);
}
