/* =========================================================
   Share — style.css
   既存のクラス名・ID はすべて維持しています（HTML 変更不要）
   ========================================================= */

:root {
  color-scheme: light;
  --paper: #f3f5f0;
  --surface: #ffffff;
  --surface-2: #f8faf6;
  --ink: #1c322c;
  --muted: #5d6f67;
  --line: #dde5de;
  --line-strong: #c3d3c8;
  --green: #1f5a44;
  --green-hover: #184a38;
  --green-soft: #e5eee7;
  --green-tint: #f0f5f0;
  --danger: #9c3a2f;
  --danger-soft: #fbeeec;
  --focus: #e2b357;
  --shadow: 0 1px 2px rgba(28, 50, 44, .05), 0 8px 28px -12px rgba(28, 50, 44, .14);
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #121a17;
    --surface: #18221e;
    --surface-2: #1d2824;
    --ink: #e3ece6;
    --muted: #9aaca3;
    --line: #2a3832;
    --line-strong: #3a4c44;
    --green: #6fbf98;
    --green-hover: #86cfab;
    --green-soft: #23362d;
    --green-tint: #1b2a23;
    --danger: #ec8e81;
    --danger-soft: #3a2421;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.8 var(--font);
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px max(24px, calc((100% - 1000px) / 2 + 28px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
  font-size: 18px;
  letter-spacing: .02em;
  text-decoration: none;
}
.brand::before {
  content: "↑";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  background: #1f5a44;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

nav, .actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
nav { font-size: 14px; color: var(--muted); }
nav a { color: var(--muted); text-decoration: none; padding: 6px 4px; }
nav a:hover { color: var(--ink); }
nav a[aria-current] { color: var(--ink); font-weight: 650; }
nav form { margin: 0; }
nav > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}
nav > span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
nav button { padding: 7px 14px; min-height: 36px; }

/* ---------- Layout ---------- */
main {
  width: 100%;
  max-width: 1000px;
  margin: 52px auto 88px;
  padding: 0 28px;
  flex: 1;
}

h1 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.4;
  letter-spacing: .01em;
  font-weight: 750;
  margin: 0 0 10px;
  text-wrap: balance;
}
h2 {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}
main > section:not(.card) { margin: 44px 0 28px; }
h3 {
  font-size: 16px;
  line-height: 1.55;
  font-weight: 650;
  margin: 0;
  overflow-wrap: anywhere;
}
p { margin: 0 0 1em; }
main > h1 + .lead, main > h1 + .notice { margin-top: 6px; }
main > h1 + .notice { margin-bottom: 24px; }
.lead {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 8px;
  max-width: 40em;
}
.muted { color: var(--muted); font-size: 13.5px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  margin: 28px 0;
  box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.narrow { max-width: 560px; }
label:first-child { margin-top: 0; }


.description:empty { display: none; }
.card > .button { margin: 4px 0 18px; }
.card > .button + .muted { margin-top: 0; }
.description {
  white-space: normal;
  overflow-wrap: anywhere;
  margin: 20px 0 24px;
  padding: 16px 20px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

a { color: var(--green); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

/* ---------- Forms ---------- */
label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin: 20px 0;
}
input, textarea {
  display: block;
  width: 100%;
  padding: 11px 14px;
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
input:hover, textarea:hover { border-color: var(--muted); }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent);
}
input:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
input[readonly] {
  background: var(--surface-2);
  font-size: 14px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ファイル選択 — 大きなドロップエリア */
input[type=file] {
  position: relative;
  padding: 30px 20px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--green-tint);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
input[type=file]:hover,
input[type=file].is-dragover {
  border-color: var(--green);
  background-color: var(--green-soft);
}
input[type=file]:focus { box-shadow: none; }
input[type=file]::file-selector-button {
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--surface);
  color: var(--green);
  padding: 8px 18px;
  margin: 10px 14px 0 0;
  font: 600 14px/1.4 var(--font);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
input[type=file]:hover::file-selector-button {
  background: var(--green);
  color: var(--surface);
}

/* ---------- Buttons ---------- */
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  appearance: none;
  background: var(--green);
  color: var(--surface);
  font: 650 14px/1.4 var(--font);
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .08s;
}
button:hover, .button:hover { background: var(--green-hover); border-color: var(--green-hover); text-decoration: none; }
button:active, .button:active { transform: translateY(1px); }
button:disabled, button:disabled:hover {
  opacity: .5;
  cursor: wait;
  transform: none;
  background: var(--green);
  border-color: var(--green);
}

.quiet {
  background: var(--surface);
  color: var(--green);
  border-color: var(--line-strong);
}
.quiet:hover { background: var(--green-tint); border-color: var(--green); color: var(--green); }
.quiet:disabled, .quiet:disabled:hover { background: var(--surface); border-color: var(--line-strong); }

.danger {
  background: transparent;
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}
.danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.copy-link.is-copied, #copy-result.is-copied {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input:focus-visible, textarea:focus-visible { outline: none; }

/* ---------- Upload ---------- */
#upload-form > button, #upload-form .actions { margin-top: 8px; }

progress {
  display: block;
  width: 100%;
  height: 10px;
  margin-top: 26px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--green-soft);
  accent-color: var(--green);
  -webkit-appearance: none;
  appearance: none;
}
progress::-webkit-progress-bar { background: var(--green-soft); border-radius: 999px; }
progress::-webkit-progress-value {
  background: var(--green);
  border-radius: 999px;
  transition: width .3s ease;
}
progress::-moz-progress-bar { background: var(--green); border-radius: 999px; }

#upload-status {
  min-height: 1.8em;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
#upload-status:empty { min-height: 0; }

#upload-result {
  margin-top: 22px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--green-tint);
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
  animation: reveal .35s ease both;
}
#upload-result label { margin: 0 0 12px; }
#upload-result button { margin-top: 4px; margin-right: 14px; }
#upload-result a { font-size: 14px; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Notice ---------- */
.notice {
  position: relative;
  background: var(--green-tint);
  border: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
  border-radius: var(--radius-sm);
  padding: 14px 18px 14px 46px;
  font-size: 15px;
}
.notice::before {
  content: "i";
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--green);
  color: var(--surface);
  font: 800 12px/1 Georgia, serif;
}
.notice > :last-child { margin-bottom: 0; }

/* ---------- File list ---------- */
.file-list {
  margin: 16px 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.file-list + .muted { margin: 0 2px 6px; }
.file-list ~ .actions:not(:empty) { margin-bottom: 8px; }
.file-list ~ .actions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.file-list ~ .actions a:hover { border-color: var(--green); background: var(--green-tint); }
.file-row {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: background-color .15s;
}
.file-row:last-of-type { border-bottom: 0; }
.file-row h3 a { color: var(--ink); text-decoration: none; }
.file-row h3 a:hover { color: var(--green); text-decoration: underline; }
.file-row:hover { background: var(--surface-2); }
.file-row > div:first-child {
  min-width: 0;
  position: relative;
  padding-left: 52px;
  min-height: 40px;
}
.file-row > div:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background:
    linear-gradient(var(--green), var(--green)) 13px 13px / 12px 2px no-repeat,
    linear-gradient(var(--green), var(--green)) 13px 18px / 12px 2px no-repeat,
    linear-gradient(var(--green), var(--green)) 13px 23px / 8px 2px no-repeat,
    var(--green-soft);
}
.file-row p { margin: 4px 0 0; }
.file-row .actions { flex: none; gap: 8px; }
.file-row .actions form { margin: 0; }
.file-row button, .file-row .button {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 13.5px;
}

.search {
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin: 4px 0 8px;
}
.search input { margin: 0; }
.search button { flex: none; }

.empty {
  margin: 0;
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Details / members ---------- */
details.card { padding-top: 22px; padding-bottom: 22px; }
details.card[open] { padding-bottom: 28px; }
details h3 { margin: 4px 0 0; }
details form + .muted { margin-top: 14px; }
summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
  transition: transform .2s;
  margin-right: 2px;
}
details[open] > summary::before { transform: rotate(45deg) translate(-1px, -1px); }
summary:hover { color: var(--green); }
details[open] > summary { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }

.member + .muted, .member:last-of-type { border-bottom: 0; }
details .member:first-of-type { margin-top: 24px; }
.member > span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 10px;
}
.member {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.member form { margin: 0; }
.member form:last-child {
  flex-basis: 100%;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.member label { flex: 1 1 260px; max-width: 400px; margin: 0; }
.member strong { font-size: 15.5px; }

/* ---------- Footer ---------- */
footer {
  line-height: 1.7;
  width: 100%;
  max-width: 1000px;
  padding: 24px 28px 40px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
[hidden] { display: none !important; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  header {
    padding: 12px 18px;
    gap: 10px;
    flex-wrap: wrap;
  }
  nav { gap: 6px; }
  main { margin-top: 28px; margin-bottom: 56px; padding: 0 16px; }
  .card { padding: 22px 18px; border-radius: 12px; margin: 20px 0; }
  .file-list { margin-left: 0; margin-right: 0; }
  .file-row { align-items: stretch; flex-direction: column; gap: 12px; padding: 16px; }
  .file-row:hover { background: none; }
  .file-row .actions { width: 100%; padding-left: 52px; }
  .actions { gap: 8px; }
  input, textarea { font-size: 16px; }
  input[type=file] { padding: 24px 14px; }
  .search { max-width: none; }
  .brand { font-size: 17px; }
  footer { padding: 20px 16px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
