/* cracsome.com / LPD — 会員画面の顔（編集画面は assets/app/lpd.css） */
:root {
  --bg: #f6f7f9; --surface: #fff; --text: #14171c; --muted: #5d6673; --border: #dfe3ea;
  --primary: #2f6bff; --on-primary: #fff; --danger: #d43d3d; --ok: #1f9d55; --radius: 10px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
code { background: #eef1f6; padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.site-nav { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.site-nav .brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; letter-spacing: .02em; color: var(--text); font-size: 1.15rem; }
.brand-mark { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, #2f6bff, #7c4dff); box-shadow: 0 4px 12px rgba(47,107,255,.35); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 6px; border-radius: 3px; background: #fff; opacity: .9; clip-path: polygon(0 0, 100% 0, 100% 35%, 45% 35%, 45% 100%, 0 100%); }
.site-nav nav { display: flex; gap: 1rem; align-items: center; }
.site-nav nav a { color: var(--text); }
.site-foot { display: flex; justify-content: space-between; padding: 1.5rem 1.25rem; color: var(--muted); font-size: .85rem; }
main.page { max-width: 960px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.form { display: flex; flex-direction: column; gap: .9rem; max-width: 640px; background: var(--surface); padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); }
.form label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; color: var(--muted); }
.form label.check { flex-direction: row; align-items: center; gap: .5rem; }
.form input:not([type=checkbox]):not([type=file]), .form textarea, .form select { font: inherit; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
.form fieldset { border: 1px solid var(--border); border-radius: 8px; padding: .75rem 1rem 1rem; display: flex; flex-direction: column; gap: .8rem; margin: 0; }
.form legend { color: var(--text); font-weight: 600; padding: 0 .3rem; }
.form table { width: 100%; border-collapse: collapse; }
.form table th { text-align: left; font-weight: 500; color: var(--muted); font-size: .85rem; padding: .2rem .3rem; }
.form table td { padding: .2rem .3rem; }
.form table input, .form table select { width: 100%; }
.form.links { max-width: 860px; }
.btn { display: inline-block; font: inherit; font-weight: 600; padding: .55rem 1.2rem; border-radius: 999px; border: 1px solid var(--primary); background: var(--primary); color: var(--on-primary); cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.big { padding: .8rem 1.5rem; font-size: 1.05rem; }
.btn.small { padding: .35rem .8rem; font-size: .9rem; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button.link { font: inherit; background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; }
form.inline { display: inline; }
.muted { color: var(--muted); font-size: .9rem; }
.flash { padding: .7rem 1rem; border-radius: 8px; }
.flash.ok { background: #e7f6ee; color: var(--ok); }
.flash.err { background: #fdeaea; color: var(--danger); }
.row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.tabs { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.tabs a { padding: .5rem .9rem; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--text); border-bottom-color: var(--primary); font-weight: 600; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card a { color: var(--text); display: block; }
.card img, .card .thumb-empty { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; background: #eef1f6; }
.card .thumb-empty { display: grid; place-items: center; color: var(--muted); }
.card strong { display: block; padding: .6rem .8rem 0; }
.card small { padding: 0 .8rem .6rem; color: var(--muted); }
.card .pub { margin: 0 .8rem .7rem; font-size: .85rem; }
.empty { color: var(--muted); padding: 2rem; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table.list th, table.list td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--border); font-size: .92rem; }
table.list th { color: var(--muted); font-weight: 500; }
.hero { text-align: center; padding: 3rem 1rem 2rem; }
.hero h1 { font-size: 1.8rem; line-height: 1.4; }
.hero p { color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.features > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.features p { color: var(--muted); margin: 0; font-size: .92rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.plan.on { border-color: var(--primary); box-shadow: 0 0 0 2px #2f6bff22; }
.plan .price { font-size: 1.4rem; font-weight: 700; margin: 0 0 .5rem; }
.plan ul { padding-left: 1.2rem; color: var(--muted); }
.stats { list-style: none; padding: 0; display: flex; gap: 1rem; }
.stats li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.5rem; }
.stats strong { display: block; font-size: 1.6rem; }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.err { color: var(--danger); }
@media (max-width: 600px) {
  .site-nav { flex-wrap: wrap; gap: .5rem; }
  .form table th:first-child, .form table td:first-child { width: 30%; }
}

/* ── 確認ダイアログ（assets/js/site.js の data-confirm） ── */
dialog.confirm { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; max-width: 420px; background: var(--surface); color: var(--text); box-shadow: 0 16px 48px rgba(0,0,0,.18); }
dialog.confirm::backdrop { background: rgba(20,23,28,.45); }
dialog.confirm .confirm__msg { margin: 0 0 1rem; font-size: 1rem; line-height: 1.6; }
dialog.confirm .confirm__row { display: flex; justify-content: flex-end; gap: .6rem; }

/* ── 一覧の行に載せると出るゴミ箱アイコン ── */
table.list td.actions { width: 1%; white-space: nowrap; text-align: right; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover, .icon-btn:focus-visible { background: #fdeaea; color: var(--danger); outline: none; }
table.list tr .icon-btn.reveal, .card .icon-btn.reveal { opacity: 0; transition: opacity .12s; }
table.list tr:hover .icon-btn.reveal, table.list tr:focus-within .icon-btn.reveal,
.card:hover .icon-btn.reveal, .card:focus-within .icon-btn.reveal { opacity: 1; }
@media (hover: none) { table.list tr .icon-btn.reveal, .card .icon-btn.reveal { opacity: 1; } }
/* カード（デザイン一覧）は右上に載せる */
.card { position: relative; }
.card .card-trash { position: absolute; top: .4rem; right: .4rem; margin: 0; }
.card .card-trash .icon-btn { background: rgba(255,255,255,.85); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.card .card-trash .icon-btn:hover, .card .card-trash .icon-btn:focus-visible { background: #fdeaea; }
table.list td.thumb-cell { width: 72px; padding: .3rem .5rem; }
table.list td.thumb-cell img { display: block; width: 64px; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: 4px; background: #eef1f6; }

/* ── 権限の状態（プラン画面の手掛かり） ── */
details.diag { margin-top: 1.5rem; font-size: .9rem; color: var(--muted); }
details.diag summary { cursor: pointer; }
details.diag .diag__list { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: .8rem 0 0; }
details.diag dt { color: var(--muted); }
details.diag dd { margin: 0; color: var(--text); }
