:root{
  --bg: #f7f8fc;
  --card: rgba(255,255,255,.85);
  --text: #1e2535;
  --muted: #6b7280;
  --line: rgba(0,0,0,.09);
  --shadow: 0 4px 24px rgba(0,0,0,.09);

  --brand1:#7c3aed;  /* violet */
  --brand2:#06b6d4;  /* cyan */
  --brand3:#22c55e;  /* green */
  --radius: 16px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 0% 0%, rgba(124,58,237,.06), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(6,182,212,.05), transparent 55%),
    radial-gradient(900px 500px at 80% 120%, rgba(34,197,94,.04), transparent 55%),
    var(--bg);
}
a{ color:inherit; text-decoration:none; }

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px;
  border-bottom:1px solid var(--line);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar__brand{
  display:flex; align-items:center; gap:10px;
  font-weight:800;
}
.brand-dot{
  width:10px; height:10px;
  border-radius:999px;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  box-shadow: 0 0 0 4px rgba(124,58,237,.12);
}
.topbar__right{ display:flex; align-items:center; gap:12px; }
.topbar__user{ font-size:13px; color: var(--muted); }

.container{ max-width: 1100px; margin: 18px auto; padding: 0 16px; }

input, select, textarea{
  width:100%;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.9);
  color: var(--text);
}
input:focus, select:focus, textarea:focus{
  outline:none;
  box-shadow: 0 0 0 4px rgba(6,182,212,.14);
  border-color: rgba(6,182,212,.5);
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.7);
  color: var(--text);
  cursor:pointer;
}
.btn--primary{
  border:0;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  color:#fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.btn--ghost{
  background: transparent;
  border:1px solid var(--line);
}
.btn:hover{ filter: brightness(.97); }
.w-full{ width:100%; }

.alert{
  background: rgba(220,38,38,.08);
  border:1px solid rgba(220,38,38,.25);
  color: #991b1b;
  padding:10px 12px;
  border-radius: 14px;
  margin-top: 12px;
}

.link{ color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.muted{ color: var(--muted); }

/* ===== Mobile optimize ===== */
@media (max-width: 600px){
  .container{ margin: 12px auto; padding: 0 12px; }

  /* topbarが詰まるのを防ぐ */
  .topbar{ flex-wrap: wrap; gap: 8px; }
  .topbar__brand{ font-size: 16px; line-height: 1.2; }
  .topbar__right{ width: 100%; justify-content: flex-end; gap: 8px; }
  .topbar__user{
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* タップしやすく */
  .btn{ min-height: 44px; padding: 10px 14px; }

  /* iOSで入力時にズームしない */
  input, select, textarea{ font-size: 16px; }
}
