/* SkyJoy — エクスプローラ風の控えめな見た目 */
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.6 -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; color: #1f2937; background: #f4f6fa; }
button { font: inherit; border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; color: #1f2937; }
button:hover { background: #eef2f8; }
button.primary { background: #2f6fd0; border-color: #2f6fd0; color: #fff; }
button.primary:hover { background: #255cb4; }
button.big { font-size: 16px; padding: 12px 28px; }
button.danger { color: #b91c1c; border-color: #fca5a5; }
.err { color: #b91c1c; margin-top: 12px; white-space: pre-wrap; }

/* ログイン */
#gate { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg,#eaf1fb,#f7fafc); }
.gate-box { background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(31,41,55,.12); padding: 40px 48px; text-align: center; max-width: 440px; }
.gate-logo { font-size: 30px; font-weight: 800; }
.gate-sub { color: #64748b; margin: 4px 0 24px; }
.gate-note { color: #64748b; font-size: 13px; margin-top: 14px; }

/* 本体 */
#app { display: flex; flex-direction: column; height: 100dvh; }
header { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #fff; border-bottom: 1px solid #e2e8f0; flex-wrap: wrap; }
.logo { font-weight: 800; margin-right: 6px; }
.spacer { flex: 1; }
#crumbs { display: flex; align-items: center; gap: 2px; overflow: hidden; white-space: nowrap; }
#crumbs a { color: #2f6fd0; text-decoration: none; padding: 2px 6px; border-radius: 6px; }
#crumbs a:hover { background: #eef2f8; }
#crumbs .sep { color: #94a3b8; }
main#list { flex: 1; overflow: auto; padding: 6px 10px 40px; outline: none; }

.row { display: grid; grid-template-columns: 30px 1fr 110px 150px 180px; gap: 8px; align-items: center;
  padding: 7px 10px; border-radius: 8px; cursor: default; user-select: none; }
.row:hover { background: #e9eff9; }
.row.sel { background: #d8e6fb; }
.row .ic { font-size: 18px; text-align: center; }
.row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { color: #64748b; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-head { display: grid; grid-template-columns: 30px 1fr 110px 150px 180px; gap: 8px; padding: 4px 10px; color: #94a3b8; font-size: 12px; border-bottom: 1px solid #e2e8f0; margin-bottom: 4px; }
.empty { color: #94a3b8; text-align: center; margin-top: 60px; }

footer#status { padding: 4px 14px; font-size: 12px; color: #64748b; background: #fff; border-top: 1px solid #e2e8f0; min-height: 26px; }

/* 右クリックメニュー */
.menu { position: fixed; z-index: 50; background: #fff; border: 1px solid #d7dbe6; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(31,41,55,.18); padding: 5px; min-width: 190px; }
.menu button { display: block; width: 100%; text-align: left; border: 0; border-radius: 7px; padding: 7px 12px; background: none; }
.menu button:hover { background: #eef2f8; }
.menu hr { border: 0; border-top: 1px solid #e8ecf3; margin: 5px 4px; }

/* モーダル */
#modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
#modal { background: #fff; border-radius: 14px; padding: 22px 24px; width: 100%; max-width: 640px; max-height: 86dvh; overflow: auto; box-shadow: 0 18px 50px rgba(0,0,0,.3); }
#modal h2 { margin: 0 0 14px; font-size: 17px; }
#modal table { width: 100%; border-collapse: collapse; font-size: 13px; }
#modal th, #modal td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #eef1f6; }
#modal th { color: #94a3b8; font-weight: 600; }
#modal input[type=text], #modal input[type=email] { font: inherit; border: 1px solid #cbd5e1; border-radius: 8px; padding: 7px 10px; width: 100%; }
.modal-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.copybox { display: flex; gap: 6px; margin-top: 8px; }
.copybox input { flex: 1; font-size: 12px; }
.badge { font-size: 11px; background: #e2e8f0; border-radius: 10px; padding: 1px 8px; color: #475569; }
.badge.adm { background: #2f6fd0; color: #fff; }

/* ドロップ表示・進捗 */
#drophint { position: fixed; inset: 60px 20px 40px; border: 3px dashed #2f6fd0; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; color: #2f6fd0;
  background: rgba(239,246,255,.9); z-index: 40; pointer-events: none; }
.prog { height: 5px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.prog > div { height: 100%; background: #2f6fd0; width: 0; transition: width .2s; }

@media (max-width: 640px) {
  .row, .list-head { grid-template-columns: 26px 1fr 80px; }
  .row .col-when, .row .col-who, .list-head .col-when, .list-head .col-who { display: none; }
  header button { padding: 6px 8px; }
}
