:root{
  color-scheme: light;
  --bg: #0b1020;
  --surface: rgba(255,255,255,.92);
  --surface-2: rgba(255,255,255,.72);
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .10);
  --shadow: 0 10px 30px rgba(2, 6, 23, .10);
  --shadow-sm: 0 6px 18px rgba(2, 6, 23, .08);
  --radius: 14px;
  --radius-sm: 12px;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --danger: #ef4444;
  --success: #16a34a;
}

*{ box-sizing: border-box; }

html, body{ min-height: 100%; }

body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", sans-serif;
  margin: 0;
  color: var(--text);
  /* non-repeating "mesh" background (no banding) */
  background:
    radial-gradient(900px 600px at 10% -10%, rgba(124,58,237,.22), transparent 65%),
    radial-gradient(900px 650px at 90% -10%, rgba(79,70,229,.20), transparent 65%),
    radial-gradient(1100px 700px at 50% 120%, rgba(15,23,42,.06), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #f3f4f6 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a{ color: inherit; }
a:hover{ text-decoration: none; }

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

.header {
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .2px;
}

.nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  opacity: .92;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav a:hover {
  opacity: 1;
  background: rgba(79,70,229,.08);
  border-color: rgba(79,70,229,.18);
}

.inline {
  display: inline;
}

.footer {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(10px);
  margin-top: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
}

input,
textarea {
  padding: 10px;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 12px;
  font-size: 14px;
  background: rgba(255,255,255,.9);
  transition: border-color .15s ease, box-shadow .15s ease, transform .02s ease;
}

input:focus,
textarea:focus,
select:focus{
  outline: none;
  border-color: rgba(79,70,229,.55);
  box-shadow: 0 0 0 4px rgba(79,70,229,.14);
}

.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.9);
  cursor: pointer;
  text-decoration: none;
  transition: transform .06s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.btn:hover {
  border-color: rgba(79,70,229,.35);
  box-shadow: 0 10px 24px rgba(2,6,23,.10);
  transform: translateY(-1px);
}

.btn.is-primary,
.btn-sm.is-primary{
  color: #fff;
  border-color: rgba(79,70,229,.55);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.btn.is-primary:hover,
.btn-sm.is-primary:hover{
  box-shadow: 0 14px 28px rgba(79,70,229,.25);
}

.btn-sm {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.9);
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  transition: transform .06s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.btn-sm:hover{
  border-color: rgba(79,70,229,.35);
  box-shadow: 0 10px 24px rgba(2,6,23,.10);
  transform: translateY(-1px);
}

.list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
}

.item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.name {
  font-weight: 700;
}

.meta {
  font-size: 12px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.alert {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.22);
  padding: 10px;
  border-radius: 12px;
}

.ok {
  background: rgba(22,163,74,.08);
  border: 1px solid rgba(22,163,74,.22);
  padding: 10px;
  border-radius: 12px;
}

.chat {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.bubble {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  max-width: 70%;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 20px rgba(2,6,23,.06);
}

.bubble.me {
  margin-left: auto;
  border-color: rgba(79,70,229,.20);
  background: rgba(79,70,229,.08);
}

.bubble .time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

/* === Search Card UI (Step2) === */
.list {
  gap: 12px;
}

.item {
  align-items: center;
}

.item-main {
  flex: 1;
  min-width: 0;
}

.item-main .name {
  font-size: 16px;
}

.item-main .muted {
  margin-top: 2px;
}

.item-main .meta {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255,255,255,.9);
}

.avatar48 {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  object-fit: cover;
  flex: 0 0 auto;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-sm.is-primary { font-weight: 700; }

/* Tables */
table{ width:100%; border-collapse: collapse; }
th, td{ padding: 10px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
thead th{ font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* Responsive header + hamburger */
.header .header-inner{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.nav-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.9);
  cursor:pointer;
  font-size: 18px;
}
.nav-toggle:hover{
  border-color: rgba(79,70,229,.35);
  box-shadow: 0 10px 24px rgba(2,6,23,.10);
  transform: translateY(-1px);
}
@media (max-width: 860px){
  .header .header-inner{ align-items:flex-start; flex-direction:column; }
  .nav-toggle{ display:inline-flex; }
  .nav{
    width:100%;
    display:none;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.75);
    box-shadow: var(--shadow-sm);
  }
  .nav.is-open{ display:flex; }
  .nav a{ padding: 10px 12px; }
}

/* Card grids (Shop / Products) */
.cards-grid{
  display:grid;
  gap: 14px;
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 720px){
  .cards-grid{ grid-template-columns: 1fr; }
}
.product-card{
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.86);
  box-shadow: 0 12px 26px rgba(2,6,23,.08);
  display:flex;
  flex-direction:column;
  min-height: 100%;
}
.product-card__img{
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  background: rgba(15,23,42,.04);
  border-bottom: 1px solid var(--line);
}
.product-card__body{
  padding: 14px 14px 12px;
  display:grid;
  gap: 8px;
}
.product-card__title{
  font-weight: 800;
  letter-spacing: .2px;
}
.product-card__meta{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.product-card__actions{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items:center;
  justify-content:flex-end;
  padding: 0 14px 14px;
}