/* AKARI Store アカウント系ページ（library / thanks）。配色はストア本体 styles.css に揃える */
:root {
  --bg: #faf9f7;
  --card: #ffffff;
  --edge: #e9e4dd;
  --panel: #f4f1ec;
  --text: #1c1917;
  --muted: #7d766e;
  --accent: #ea580c;
  --accent-soft: #fff3ec;
  --free: #15803d;
  --free-soft: #f0fdf4;
  --danger: #b91c1c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", "Helvetica Neue", system-ui, sans-serif;
  line-height: 1.6;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 32px 20px 80px; }
.brand { font-weight: 700; letter-spacing: 0.02em; }
.brand a { color: var(--text); text-decoration: none; }
.brand .accent { color: var(--accent); }
h1 { font-size: 22px; margin: 18px 0 6px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.card {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 16px;
}
.card h2 { font-size: 15px; margin: 0 0 12px; }
.row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 0; border-top: 1px solid var(--edge);
}
.row:first-of-type { border-top: 0; }
.row-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-main { min-width: 0; }
.thumb {
  flex: none; width: 96px; height: 54px; border-radius: 8px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--edge); display: block;
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph {
  display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;
  color: var(--muted); font-size: 11px; font-weight: 700;
}
.thumb-link { flex: none; display: block; text-decoration: none; color: inherit; }
.row .btn { white-space: nowrap; flex: none; }
.row-actions { display: flex; gap: 8px; flex: none; align-items: center; }
a.name-link { display: inline-block; color: inherit; text-decoration: none; }
a.name-link:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 560px) { .row { flex-wrap: wrap; } }
.row .meta { color: var(--muted); font-size: 12px; }
.row .name { font-weight: 600; font-size: 14px; }
.badge {
  display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: var(--panel); color: var(--muted); vertical-align: 1px;
}
.badge.paid { background: var(--free-soft); color: var(--free); }
.badge.refunded { background: #fef2f2; color: var(--danger); }
button, .btn {
  appearance: none; border: 1px solid var(--edge); background: var(--card);
  color: var(--text); border-radius: 8px; padding: 7px 14px; font-size: 13px;
  cursor: pointer; text-decoration: none; display: inline-block; font-family: inherit;
}
button:hover, .btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary, button.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-primary:hover { opacity: 0.9; color: #fff; }
button.link-danger { border: 0; background: none; color: var(--danger); font-size: 12px; padding: 4px; }
input[type="email"], input[type="text"], textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--edge); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: var(--card); color: var(--text);
}
textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.check-row { display: flex; align-items: center; gap: 9px; margin: 12px 0; font-size: 13px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.stack { display: grid; gap: 10px; }
.stack label:not(.check-row) { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.actions { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.actions .grow { flex: 1 1 220px; }
form.inline { display: flex; gap: 8px; }
form.inline input { flex: 1; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }
.note { font-size: 12px; color: var(--muted); }
.note code {
  padding: 2px 7px; background: var(--panel); border: 1px solid var(--edge); border-radius: 6px;
  color: var(--text); font-family: ui-monospace, Menlo, monospace; font-size: 11.5px;
}
.connect-cli-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; }
.connect-copy-btn {
  padding: 3px 10px; border: 1px solid var(--edge); border-radius: 999px; background: var(--card);
  color: var(--muted); font-size: 10.5px; font-weight: 700; line-height: 1.5; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: color .15s, border-color .15s, background .15s;
}
.connect-copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.connect-copy-btn.done { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.notice {
  background: var(--accent-soft); border: 1px solid #fcd9c4; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; margin: 0 0 16px;
}
.empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
.token-plain {
  font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--panel);
  padding: 8px 10px; border-radius: 8px; word-break: break-all; margin: 8px 0;
}
.footer { margin-top: 28px; font-size: 12px; color: var(--muted); }
.footer a { color: var(--muted); }
@media (max-width: 560px) {
  form.inline, .inline { flex-direction: column; }
  form.inline button, .inline button, .actions button { width: 100%; }
}
