/* 白ベース + 薄いオレンジのライン */
:root {
  --bg: #ffffff;
  --soft: #fff8f1;        /* 見出し行・面のごく薄いオレンジ */
  --soft-2: #fff1e3;
  --line: #f7dcc2;        /* 基本のライン */
  --line-strong: #f1b98a;
  --accent: #ee7d22;      /* ボタン・強調 */
  --accent-dark: #cf6512;
  --text: #2a2622;
  --muted: #7a716a;
  --ok: #2e9b5a;
  --danger: #d2463d;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(120, 70, 20, .06), 0 4px 16px rgba(120, 70, 20, .05);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.7 var(--font); letter-spacing: .01em;
  border-top: 4px solid var(--accent);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { line-height: 1.35; margin: 0; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
img, video { max-width: 100%; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; word-break: break-all; }
[hidden] { display: none !important; }

/* ---- ヘッダー ---- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { white-space: nowrap; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--accent) url("icon.svg") center / 100% no-repeat; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav a, .nav button.link { color: var(--text); white-space: nowrap; }
.nav button.link { font-size: 14px; }
.nav a.btn { color: #fff; }
.inline { display: inline; margin: 0; }

.main { flex: 1; padding-top: 28px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 18px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { color: var(--muted); }
.doc { max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.doc-body { border: 1px solid var(--line); border-radius: 14px; padding: 26px 30px; line-height: 1.9; overflow-wrap: anywhere; }
.doc-body .gap { height: .8em; }
.file-info dt.report { margin-top: 22px; font-size: 12px; }
.file-info dt.report a { color: var(--muted); text-decoration: underline; }

/* ---- ボタン ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-line { background: #fff; color: var(--accent-dark); border-color: var(--line-strong); }
.btn-line:hover { background: var(--soft); border-color: var(--accent); }
.btn-danger { color: var(--danger); border-color: #efc0bc; }
.btn-danger:hover { background: #fff3f2; border-color: var(--danger); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); cursor: pointer; }
button.link:hover { text-decoration: underline; }

/* ---- 面 ---- */
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.panel-pad { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.count { display: inline-block; min-width: 26px; padding: 0 8px; margin-left: 6px; border-radius: 99px; background: var(--soft-2); color: var(--accent-dark); font-size: 12px; text-align: center; line-height: 22px; vertical-align: 2px; }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }
.search { display: flex; gap: 8px; }
.search input { width: 260px; }

/* ---- フォーム ---- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #4a433d; }
.form small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--text); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 12px; min-height: 40px; width: 100%;
}
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(238, 125, 34, .15); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--accent); margin: 0; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; }
.check input[type=password] { flex: 1; min-height: 34px; padding: 4px 10px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-size: 13px; font-weight: 600; padding: 0 4px; color: #4a433d; }
.alert { background: #fff3f2; border: 1px solid #f3c6c2; color: #a2322b; border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.saved { color: var(--ok); font-size: 13px; margin-left: 8px; }

/* ---- トップ ---- */
.hero {
  position: relative; display: grid; grid-template-columns: 1fr 460px; align-items: end; gap: 12px;
  min-height: 500px; padding: 0 40px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background:
    radial-gradient(circle at 78% 42%, rgba(255, 255, 255, .95) 0, rgba(255, 255, 255, 0) 210px),
    radial-gradient(rgba(238, 125, 34, .13) 1.6px, transparent 1.8px) 0 0 / 22px 22px,
    linear-gradient(160deg, #fff 0%, #fff6ec 55%, #ffe6cc 100%);
}
.hero-text { align-self: center; padding: 44px 0; position: relative; z-index: 2; }
.hero-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent-dark); background: #fff; border: 1px solid var(--line-strong); border-radius: 99px; padding: 3px 12px; margin-bottom: 14px; }
.hero h1 { font-size: 40px; line-height: 1.3; letter-spacing: .03em; }
.hero h1, .lead { word-break: auto-phrase; }
.lead { margin-top: 16px; color: #5a524b; font-size: 16px; }
.hero-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.hero-art { position: relative; height: 100%; min-height: 500px; display: flex; align-items: flex-end; justify-content: center; }
.chara { position: relative; z-index: 1; width: 430px; height: auto; max-height: 560px; object-fit: contain; object-position: bottom; display: block; margin-bottom: -2px; animation: float 4.5s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.bubble {
  position: absolute; z-index: 3; top: 40px; left: -46px; max-width: 280px; word-break: auto-phrase;
  background: #fff; border: 2px solid var(--line-strong); border-radius: 18px; padding: 10px 16px;
  font-weight: 700; font-size: 15px; color: #5a3a24; box-shadow: 0 6px 18px rgba(200, 110, 40, .14);
}
.bubble::after { content: ""; position: absolute; right: 26px; bottom: -11px; width: 18px; height: 18px; background: #fff; border-right: 2px solid var(--line-strong); border-bottom: 2px solid var(--line-strong); transform: rotate(45deg); }
.deco { position: absolute; z-index: 0; border-radius: 14px; background: #fff; border: 2px solid var(--line-strong); box-shadow: 0 6px 16px rgba(200, 110, 40, .1); }
.deco::after { content: ""; position: absolute; inset: 30% 30% auto 30%; height: 3px; border-radius: 3px; background: var(--line-strong); box-shadow: 0 8px 0 var(--line), 0 16px 0 var(--line); }
.deco-1 { width: 58px; height: 72px; right: 6px; top: 64px; transform: rotate(12deg); animation: float 5.5s ease-in-out infinite .6s; }
.deco-2 { width: 46px; height: 58px; left: 4px; bottom: 120px; transform: rotate(-14deg); animation: float 6s ease-in-out infinite 1.2s; }
.deco-3 { width: 34px; height: 34px; right: 40px; bottom: 170px; border-radius: 50%; background: var(--accent); border-color: var(--accent); }
.deco-3::after { inset: 9px; height: auto; background: none; box-shadow: none; border: 3px solid #fff; border-right: 0; border-bottom: 0; transform: rotate(45deg) translate(2px, 2px); border-radius: 0; }
@media (prefers-reduced-motion: reduce) { .chara, .deco { animation: none; } }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { border: 1px solid var(--line); border-top: 3px solid var(--line-strong); border-radius: var(--radius); padding: 14px 18px; background: #fff; font-size: 13px; color: var(--muted); }
.feature b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.sp-only { display: none; }
.notice { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 18px; background: var(--soft); }
.notice h2 { font-size: 14px; color: var(--accent-dark); margin-bottom: 4px; }

/* ---- ファイル一覧 ---- */
table.files { width: 100%; border-collapse: collapse; font-size: 14px; }
.files th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--soft); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.files td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.files tbody tr:last-child td { border-bottom: 0; }
.files tbody tr:hover td { background: #fffcf8; }
.c-no, .c-dl, .c-num { width: 56px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.files th.c-dl, .files th.c-no, .files th.c-num { text-align: right; }
.c-size { width: 96px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-date { width: 140px; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.c-user { width: 140px; }
.c-vis { width: 110px; }
.c-usage { width: 230px; }
.c-act { width: 1%; white-space: nowrap; text-align: right; }
.c-name { min-width: 0; }
.fname { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; max-width: 100%; }
.fname .name { overflow-wrap: anywhere; }
.fname:hover .name { color: var(--accent-dark); }
.ext { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 22px; border: 1px solid var(--line-strong); border-radius: 5px; font: 600 10px/1 var(--mono); text-transform: uppercase; color: var(--accent-dark); background: #fff; }
.ext-lg { width: 56px; height: 56px; font-size: 13px; border-radius: 10px; background: var(--soft); }
.lock { font-size: 12px; }
.ext-folder, .ext-up { position: relative; background: var(--soft-2); border-color: var(--line-strong); }
.ext-folder::before { content: ""; position: absolute; left: 11px; top: 6px; width: 18px; height: 11px; border-radius: 2px 3px 3px 3px; background: var(--accent); }
.ext-folder::after { content: ""; position: absolute; left: 11px; top: 4px; width: 8px; height: 4px; border-radius: 2px 2px 0 0; background: var(--accent); }
.ext-up::before { content: ""; position: absolute; left: 16px; top: 8px; width: 7px; height: 7px; border: 2px solid var(--accent); border-right: 0; border-bottom: 0; transform: rotate(45deg); }
.folder-row .fname .name { color: var(--text); }
.folder-row td { background: #fffdfa; }
.path { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 15px; min-width: 0; }
.path a { font-weight: 600; }
.path b { overflow-wrap: anywhere; }
.path .sep { color: var(--line-strong); }
.path h2 { margin-right: 2px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dz-dest { margin-top: 10px; font-size: 13px; color: var(--text); }
.dz-dest b { color: var(--accent-dark); overflow-wrap: anywhere; }
.comment { margin-top: 3px; padding-left: 50px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--accent-dark); background: #fff; margin-left: 4px; white-space: nowrap; }
.badge-0 { border-color: #bfe3cc; color: var(--ok); }
.badge-2 { border-color: #d8d2cc; color: var(--muted); }
.row-actions { display: inline-flex; gap: 6px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---- 使用量メーター ---- */
.meter { min-width: 220px; }
.meter-bar, .meter-bar-js { display: block; width: 100%; height: 8px; border-radius: 99px; overflow: hidden; background: var(--soft-2); border: 0; appearance: none; -webkit-appearance: none; }
.meter-bar::-webkit-progress-bar { background: var(--soft-2); }
.meter-bar::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
.meter-bar::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
.meter-bar-js span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .3s; }
.meter-bar-js.warn span { background: var(--danger); }
.meter-text { margin-top: 6px; font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.meter-text b { color: var(--text); }
.meter-lg { min-width: 280px; }

/* ---- 公開ページ ---- */
.uploader-head, .my-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.desc { margin-top: 8px; color: #5a524b; }
.uploader-meta { display: flex; align-items: center; gap: 16px; }

/* ---- ファイルページ ---- */
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs span:last-child { overflow-wrap: anywhere; }
.file-card { display: grid; grid-template-columns: 1fr 320px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.file-main { padding: 28px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.file-title { display: flex; gap: 16px; align-items: center; }
.file-title h1 { font-size: 22px; overflow-wrap: anywhere; }
.file-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.file-comment { border-left: 3px solid var(--line-strong); padding: 4px 14px; color: #4a433d; overflow-wrap: anywhere; }
.preview { border: 1px solid var(--line); border-radius: 10px; background: var(--soft); padding: 10px; text-align: center; }
.preview img, .preview video { max-height: 520px; border-radius: 6px; display: block; margin: 0 auto; }
.preview audio { width: 100%; }
.dl-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dl-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.dl-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; flex: 1; min-width: 200px; max-width: 320px; }
.file-info { margin: 0; padding: 24px; background: var(--soft); border-left: 1px solid var(--line); display: grid; grid-template-columns: 1fr; gap: 4px 0; align-content: start; }
.file-info dt { font-size: 12px; color: var(--muted); margin-top: 10px; }
.file-info dt:first-child { margin-top: 0; }
.file-info dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }

/* ---- ログイン ---- */
.auth { width: 100%; max-width: 420px; margin: 24px auto 0; border: 1px solid var(--line); border-radius: 14px; padding: 32px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.auth-foot { text-align: center; font-size: 14px; color: var(--muted); }
.error-page { text-align: center; padding: 60px 0; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.error-code { font-size: 56px; font-weight: 700; color: var(--line-strong); line-height: 1; }

/* ---- マイページ ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 16px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.tab.active { color: var(--accent-dark); border-bottom-color: var(--accent); }
[data-pane] { display: flex; flex-direction: column; gap: 20px; }

.dropzone { border: 2px dashed var(--line-strong); border-radius: 14px; background: var(--soft); padding: 30px 24px 22px; text-align: center; transition: background .15s, border-color .15s; outline: none; }
.dropzone.over, .dropzone:focus-visible { background: var(--soft-2); border-color: var(--accent); }
.dz-icon { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line-strong); position: relative; }
.dz-icon::before { content: ""; position: absolute; left: 50%; top: 12px; width: 2px; height: 20px; margin-left: -1px; background: var(--accent); }
.dz-icon::after { content: ""; position: absolute; left: 50%; top: 12px; width: 10px; height: 10px; margin-left: -6px; border: 2px solid var(--accent); border-right: 0; border-bottom: 0; transform: rotate(45deg); }
.dz-title { font-weight: 700; font-size: 16px; }
.dz-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.touch-only { display: none; }
@media (hover: none) and (pointer: coarse) { .touch-only { display: inline; } .mouse-only { display: none; } }
.dz-options { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); text-align: left; }
.dz-options label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #4a433d; }
.dz-options input, .dz-options select { min-height: 36px; padding: 5px 10px; font-size: 14px; }

.queue { border: 1px solid var(--line); border-radius: var(--radius); }
.queue ul { list-style: none; margin: 0; padding: 0; }
.qitem { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); align-items: center; }
.qitem:last-child { border-bottom: 0; }
.qname { font-weight: 600; overflow-wrap: anywhere; font-size: 14px; }
.qstatus { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qitem.done .qstatus { color: var(--ok); }
.qitem.error .qstatus { color: var(--danger); }
.qbar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--soft-2); overflow: hidden; }
.qbar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.qitem.hashing .qbar span { background: var(--line-strong); }
.qitem.done .qbar span { background: var(--ok); }
.qitem.error .qbar span { background: var(--danger); }
.qactions { display: flex; gap: 10px; font-size: 13px; }

/* ---- 管理 ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { border: 1px solid var(--line); border-top: 3px solid var(--line-strong); border-radius: var(--radius); padding: 14px 18px; background: #fff; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat-sub { font-size: 12px; color: var(--muted); }
.hero-setting { display: grid; grid-template-columns: 1fr 170px; gap: 16px; align-items: start; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--soft); }
.field-label { font-size: 13px; font-weight: 600; color: #4a433d; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.opt-adv summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent-dark); margin-bottom: 10px; }
.usage-summary { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.usage-line { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.usage-summary .meter-bar-js { height: 10px; }
.quota-all-row { display: grid; grid-template-columns: 160px 1fr auto; gap: 12px; align-items: end; }
.hero-note { font-size: 13px; color: #8a5a2b; background: #fff; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 8px 12px; }
.hero-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-url summary { font-size: 13px; color: var(--accent-dark); cursor: pointer; }
.hero-url label { margin-top: 8px; }
.hero-preview { height: 220px; border-radius: 8px; background: #fff; border: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.hero-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.usage { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.usage .meter-bar-js { height: 6px; }
.tag-admin { color: var(--accent-dark); border-color: var(--line-strong); }
.tag-off { color: var(--danger); border-color: #efc0bc; }
.ok { color: var(--ok); }
.ng { color: var(--danger); }

/* ---- ダイアログ・トースト ---- */
.dialog { border: 1px solid var(--line); border-radius: 14px; padding: 26px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(80, 40, 10, .18); color: var(--text); }
.dialog::backdrop { background: rgba(60, 40, 20, .28); }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 4px; }
.copy-help { margin: 0; font-size: 14px; line-height: 1.7; }
#copy-text { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.spacer { flex: 1; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #2a2622; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); z-index: 50; max-width: calc(100vw - 32px); }

/* ---- スマホ ---- */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .main { padding-top: 20px; gap: 18px; }
  h1 { font-size: 21px; }
  .nav { gap: 12px; font-size: 13px; }
  .nav button.link { font-size: 13px; }
  .logo { font-size: 15px; gap: 8px; }
  .nav-opt { display: none; }
  .hero { grid-template-columns: 1fr; padding: 0 20px 26px; gap: 0; min-height: 0; border-radius: 16px; }
  .hero-art { order: -1; min-height: 0; height: 300px; justify-content: flex-end; }
  .chara { width: 232px; max-height: 300px; margin-right: -6px; }
  .bubble { top: 26px; left: 0; font-size: 13px; max-width: 140px; padding: 8px 12px; }
  .bubble::after { right: auto; left: 70%; }
  .deco-1 { display: none; }
  .deco-2 { display: none; }
  .deco-3 { left: 30px; right: auto; bottom: 70px; }
  .hero-text { padding: 18px 0 0; }
  .hero h1 { font-size: 27px; }
  .lead { font-size: 14px; }
  .hero-actions .btn { flex: 1; }
  .features { grid-template-columns: 1fr; gap: 10px; }
  .hero-setting { grid-template-columns: 1fr; }
  .opt-grid, .quota-all-row { grid-template-columns: 1fr; }
  .doc-body { padding: 18px; }
  .pc-only { display: none; }
  .sp-only { display: inline; }
  .file-card { grid-template-columns: 1fr; }
  .file-main { padding: 20px; }
  .file-info { border-left: 0; border-top: 1px solid var(--line); padding: 18px 20px; }
  .dz-options { grid-template-columns: 1fr; }
  .search, .search input { width: 100%; }
  .head-actions { width: 100%; }
  .head-actions .search { flex: 1; }
  .panel-head { padding: 12px 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .meter, .meter-lg { min-width: 0; width: 100%; }
  .uploader-meta { width: 100%; }
  .uploader-meta .meter { flex: 1; }
  /* 表はカード状に並べる */
  table.files thead { display: none; }
  table.files, .files tbody, .files tr, .files td { display: block; width: 100%; }
  .files tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .files tbody tr:last-child { border-bottom: 0; }
  .files td { padding: 0; border: 0; text-align: left !important; width: auto !important; }
  .files td.c-name { margin-bottom: 4px; }
  .files td.c-no { display: none; }
  .files td.c-size, .files td.c-date, .files td.c-dl, .files td.c-user, .files td.c-vis, .files td.c-num { display: inline-block; font-size: 12px; color: var(--muted); margin-right: 12px; }
  .files td.c-dl::after { content: " DL"; }
  .files td.c-act { display: block; margin-top: 8px; }
  .files td.c-usage { margin: 6px 0; }
  .comment { padding-left: 0; }
}

/* =====================================================================
   テーマ「ほんわか」: 丸め・やさしい色・画像なし (管理画面 → サイト設定で切り替え)
   ===================================================================== */
.theme-soft {
  --bg: #fffdfa;
  --soft: #fff6ee;
  --soft-2: #ffeedd;
  --line: #f6e3d3;
  --line-strong: #f2c9a8;
  --accent: #f0915a;
  --accent-dark: #d4713c;
  --text: #4b3f3a;
  --muted: #8f817a;
  --ok: #4fa27a;
  --danger: #dc6b63;
  --radius: 22px;
  --shadow: 0 2px 6px rgba(190, 120, 70, .05), 0 10px 30px rgba(190, 120, 70, .07);
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "M PLUS Rounded 1c", "Kosugi Maru", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  border-top: 0;
  background:
    radial-gradient(900px 420px at 10% -10%, #fff1e4 0, rgba(255, 241, 228, 0) 70%),
    radial-gradient(800px 380px at 100% 0%, #fdeef0 0, rgba(253, 238, 240, 0) 70%),
    var(--bg);
  background-repeat: no-repeat;
  letter-spacing: .03em;
}
.theme-soft h1, .theme-soft h2, .theme-soft .logo, .theme-soft .btn, .theme-soft .tab, .theme-soft .stat-value { font-weight: 700; }
.theme-soft .site-header { background: rgba(255, 253, 250, .85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px dashed var(--line-strong); }
.theme-soft .logo-mark { border-radius: 50%; }
.theme-soft .btn { border-radius: 999px; padding: 0 22px; box-shadow: 0 3px 0 rgba(212, 113, 60, .18); }
.theme-soft .btn:active { transform: translateY(1px); box-shadow: 0 2px 0 rgba(212, 113, 60, .18); }
.theme-soft .btn-line { box-shadow: none; border-width: 1.5px; }
.theme-soft .btn-sm { padding: 0 14px; }
.theme-soft .btn-lg { height: 52px; padding: 0 32px; }
.theme-soft input, .theme-soft select, .theme-soft textarea { border-radius: 14px; border-color: var(--line-strong); background: #fffefc; }
.theme-soft input:focus, .theme-soft select:focus, .theme-soft textarea:focus { box-shadow: 0 0 0 4px rgba(240, 145, 90, .16); }
.theme-soft .panel, .theme-soft .auth, .theme-soft .file-card, .theme-soft .queue, .theme-soft .stat, .theme-soft .feature, .theme-soft .doc-body, .theme-soft .notice { border-radius: var(--radius); border-color: var(--line); }
.theme-soft .panel { box-shadow: var(--shadow); }
.theme-soft .stat, .theme-soft .feature { border-top: 1px solid var(--line); box-shadow: var(--shadow); }
.theme-soft .panel-head { border-bottom-style: dashed; }
.theme-soft .files th { background: transparent; border-bottom: 1px dashed var(--line-strong); }
.theme-soft .files td { border-bottom: 1px dashed var(--line); }
.theme-soft .files tbody tr:hover td { background: #fff8f2; }
.theme-soft .ext { border-radius: 999px; width: 44px; background: var(--soft); border-color: var(--line); }
.theme-soft .ext-lg { width: 60px; height: 60px; border-radius: 50%; }
.theme-soft .badge, .theme-soft .count { border-radius: 999px; }
.theme-soft .dropzone { border-radius: 28px; border: 2px dashed var(--line-strong); background: #fffaf5; }
.theme-soft .dz-icon { border-radius: 50%; }
.theme-soft .tabs { border-bottom-style: dashed; }
.theme-soft .tab { border-radius: 999px 999px 0 0; }
.theme-soft .tab.active { border-bottom-width: 3px; }
.theme-soft .meter-bar, .theme-soft .meter-bar-js, .theme-soft .qbar { height: 10px; }
.theme-soft .dialog { border-radius: 26px; }
.theme-soft .toast { border-radius: 999px; background: #5a4a42; }
.theme-soft .alert { border-radius: 16px; }
.theme-soft .preview, .theme-soft .file-comment { border-radius: 18px; }
.theme-soft .file-comment { border-left: 0; background: var(--soft); padding: 12px 16px; }
.theme-soft .file-info { background: #fffaf5; }
.theme-soft .site-footer { border-top: 1px dashed var(--line-strong); background: transparent; }
.theme-soft .notice { background: #fff8f1; border-style: dashed; }
.theme-soft .error-code { color: var(--line-strong); }

/* トップ (画像なしの見出し) */
.hero-soft {
  position: relative; overflow: hidden; text-align: center;
  padding: 72px 24px 64px; border-radius: 36px;
  background:
    radial-gradient(260px 200px at 12% 20%, rgba(255, 214, 186, .55) 0, rgba(255, 214, 186, 0) 100%),
    radial-gradient(300px 220px at 90% 85%, rgba(252, 208, 214, .45) 0, rgba(252, 208, 214, 0) 100%),
    radial-gradient(240px 180px at 85% 15%, rgba(255, 236, 190, .5) 0, rgba(255, 236, 190, 0) 100%),
    #fffaf4;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-soft h1 { font-size: 38px; line-height: 1.45; letter-spacing: .05em; word-break: auto-phrase; }
.hero-soft .hero-tag { display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent-dark); background: #fff; border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 4px 16px; margin-bottom: 18px; }
.hero-soft .lead { margin: 18px auto 0; max-width: 560px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.hero-soft .hero-actions { justify-content: center; margin-top: 30px; }
.theme-soft .features .feature { text-align: center; padding: 20px 18px; }
@media (max-width: 760px) {
  .hero-soft { padding: 48px 18px 40px; border-radius: 28px; }
  .hero-soft h1 { font-size: 26px; }
  .hero-soft .lead { font-size: 14px; }
  .theme-soft .files td { border-bottom: 0; }
  .theme-soft .files tr { border-bottom: 1px dashed var(--line); }
}

/* ---- 確認コード ---- */
.code-input { font: 600 24px/1.2 var(--mono); letter-spacing: .4em; text-align: center; }
.code-links { margin: 0; }
.code-links .link { font-size: inherit; }

/* ---- ステータス ---- */
.status-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.status-head h2 { margin: 0; }
.status-actions { display: flex; align-items: center; gap: 12px; }
.status-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; background: #fff; }
.status-list { display: flex; flex-direction: column; gap: 18px; }
.status-group h3 { font-size: 13px; color: var(--muted); margin: 0 0 8px; font-weight: 700; }
.status-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.status-item summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.status-item summary::-webkit-details-marker { display: none; }
.status-item .s-name { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.status-item .s-ms { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.status-item .s-label { font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-item .s-msg { padding: 0 14px 10px 34px; font-size: 13px; margin: 0; }
.status-item .s-msg.ng { color: var(--danger); }
.status-item .s-msg.warn { color: #a86400; }
.status-item dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; padding: 0 14px 12px 34px; font-size: 13px; }
.status-item dt { color: var(--muted); }
.status-item dd { margin: 0; overflow-wrap: anywhere; }
.status-item pre { margin: 0; font: 12px/1.5 var(--mono); white-space: pre-wrap; background: #fbf7f3; border-radius: 6px; padding: 6px 8px; max-height: 220px; overflow: auto; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: #bbb; }
.status-dot.ok { background: #2fa36b; }
.status-dot.warn { background: #e0a020; }
.status-dot.ng { background: #d9473f; }
.status-dot.off { background: #c8c2bc; }
.status-dot.wait { background: #ddd; animation: status-blink 1s infinite; }
@keyframes status-blink { 50% { opacity: .35; } }
.s-label.ok { color: #2fa36b; } .s-label.warn { color: #a86400; } .s-label.ng { color: var(--danger); } .s-label.off { color: var(--muted); }
.status-item .s-at { padding: 0 14px 6px 34px; margin: 0; font-size: 12px; color: var(--muted); }
.s-stats { padding: 0 14px 10px 34px; display: flex; flex-direction: column; gap: 6px; }
.s-nums { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.s-nums span { display: flex; flex-direction: column; }
.s-nums small { font-size: 11px; color: var(--muted); }
.s-nums b { font-size: 15px; font-variant-numeric: tabular-nums; }
.s-bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 22px; max-width: 520px; }
.s-bar { border-radius: 2px; background: #e8e2dc; }
.s-bar.ok { background: #2fa36b; } .s-bar.warn { background: #e0a020; } .s-bar.ng { background: #d9473f; }
.s-bars-label { display: flex; justify-content: space-between; max-width: 520px; font-size: 11px; color: var(--muted); }

/* ---- OGP 画像の設定 ---- */
.ogp-setting { display: flex; flex-direction: column; gap: 8px; }
.ogp-preview { max-width: 480px; aspect-ratio: 1200 / 630; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.ogp-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
