:root{
  --max: 920px;
  --bd: #e6e6e6;
  --txt: #111;
  --muted: #666;
  --bg: #fff;
  --btn: #111;
  --btnTxt: #fff;
  --radius: 14px;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; font-family: system-ui, -apple-system, "Microsoft JhengHei", Arial, sans-serif; color: var(--txt); background: #fafafa; }
a{ color:#0b57d0; text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{
  max-width: var(--max);
  margin: 18px auto;
  padding: 0 14px 44px;
}

.header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin: 8px 0 12px;
}

.title{
  font-size: 22px;
  font-weight: 800;
}

.nav{
  display:flex;
  gap:10px;
  font-size: 14px;
  flex-wrap: wrap;
}

.card{
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}

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

.grid{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px){
  .grid-2{ grid-template-columns: 1fr 1fr; }
  .title{ font-size: 26px; }
}

label{ font-size: 13px; color: var(--muted); display:block; margin-bottom: 6px; }
input, textarea, select{
  width: 100%;
  padding: 12px 12px;
  border: 1px solid var(--bd);
  border-radius: 12px;
  font-size: 16px;
  background: #fff;
  outline: none;
}
textarea{ resize: vertical; min-height: 92px; }

.row{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

button{
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--btn);
  font-size: 16px;
  cursor: pointer;
}

.btn-primary{
  background: var(--btn);
  color: var(--btnTxt);
  border: 1px solid var(--btn);
}

.btn-ghost{
  background: #fff;
  color: var(--txt);
}

@media (min-width: 720px){
  .row > button{
    width: auto;
    min-width: 160px;
  }
}

canvas{
  width: 100%;
  height: 180px;
  border: 1px solid var(--bd);
  border-radius: 12px;
  background: #fff;
  touch-action: none;
}

hr{ border: none; border-top: 1px solid var(--bd); margin: 12px 0; }

.msg{ margin-top: 10px; }
.ok{ color: #0a7; }
.err{ color: #c00; }

.table{
  width:100%;
  border-collapse: collapse;
}
.table td{
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 6px;
  vertical-align: top;
  font-size: 14px;
}
.table td:first-child{
  color: var(--muted);
  width: 38%;
}
.badge{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--bd);
  font-size: 12px;
  color: var(--muted);
  background:#fff;
}
