/* Naresla shared design system — extracted from homepage */
:root{
  --bg: #FAFAF8;
  --bg-alt: #F4F2EE;
  --bg-soft: #F7F5F0;
  --ink: #1A1A1A;
  --body: #4A4A4A;
  --sub: #8A8A8A;
  --line: #E8E5DF;
  --line-soft: #EFECE6;
  --accent: #E07856;
  --accent-dark: #CC6845;
  --accent-soft: #F7E5DD;
  --teal: #2C5F5D;
  --teal-dark: #1E4948;
  --teal-soft: #DCE8E7;
  --warn: #C28A00;
  --warn-soft: #F8EFCE;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(26,26,26,0.04), 0 1px 1px rgba(26,26,26,0.03);
  --shadow: 0 4px 12px rgba(26,26,26,0.05), 0 1px 3px rgba(26,26,26,0.04);
  --shadow-lg: 0 20px 40px -12px rgba(26,26,26,0.10), 0 8px 16px -4px rgba(26,26,26,0.05);
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family: "Noto Sans JP", "Inter", system-ui, sans-serif;
  color: var(--body);
  background: var(--bg);
  line-height: 1.8;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5{
  font-weight:700;
  color:var(--ink);
  line-height:1.4;
  letter-spacing: -0.01em;
}
p{ text-wrap: pretty; }
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,textarea,select{font-family:inherit;color:inherit}

.en{ font-family: "Inter", sans-serif; font-feature-settings: "ss01"; }
.mono{ font-family: "JetBrains Mono", monospace; }

/* ===== App-style top bar (for tool sub-pages) ===== */
.app-top{
  position: sticky; top:0; z-index:50;
  background: rgba(250, 250, 248, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.app-top .inner{
  display:flex; align-items:center; justify-content:space-between;
  height: 56px;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  gap: 16px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:700; color:var(--ink); font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-mark{
  width: 28px; height:28px; border-radius: 50%;
  background: #fff;
  background-image: url("../../assets/naresla-logo-mark.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05);
}
.brand-tag{
  font-size: 11px;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-left: 4px;
}
.app-top-actions{
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
}
.app-top-actions a{
  color: var(--body);
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .15s ease;
}
.app-top-actions a:hover{ background: var(--bg-alt); color: var(--ink); }
.app-top-actions .return{
  display:inline-flex; align-items:center; gap:6px;
  font-size: 13px; color: var(--body);
}

/* ===== Buttons ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, border-color .15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary{
  background: var(--accent); color:#fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 4px 10px -3px rgba(224,120,86,0.4);
}
.btn-primary:hover{ background: var(--accent-dark); transform: translateY(-1px); }
.btn-ink{ background: var(--ink); color:#fff; }
.btn-ink:hover{ background:#000; transform: translateY(-1px); }
.btn-ghost{
  background: #fff; color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover{ border-color: #c8c2b6; }
.btn-soft{
  background: var(--bg-alt); color: var(--ink);
}
.btn-soft:hover{ background: var(--line); }
.btn-danger{
  background: #fff; color: #B5443A; border-color: #E8C8C4;
}
.btn-danger:hover{ background: #FBEDEB; }
.btn-sm{ padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-lg{ padding: 13px 20px; font-size: 14px; }
.btn-icon{ width: 32px; height: 32px; padding: 0; }

/* ===== Form controls ===== */
.field{ display:flex; flex-direction:column; gap: 6px; }
.field-label{
  font-size: 12px; font-weight: 600; color: var(--ink);
  letter-spacing: 0.01em;
  display:flex; align-items:center; gap: 6px;
}
.field-label .req{ color: var(--accent); font-weight: 700; }
.field-help{ font-size: 11px; color: var(--sub); line-height: 1.6; }
.input, .textarea, .select{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.input:focus, .textarea:focus, .select:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224,120,86,0.12);
}
.textarea{ min-height: 100px; line-height: 1.7; resize: vertical; }
.input::placeholder, .textarea::placeholder{ color: #B8B3A9; }

/* ===== Pills / tags ===== */
.pill{
  display:inline-flex; align-items:center; gap: 6px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bg-alt);
  color: var(--body);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
  font-weight: 500;
}
.pill:hover{ background: var(--line-soft); color: var(--ink); }
.pill.active{
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.pill .count{
  font-family: "Inter";
  font-size: 11px;
  color: var(--sub);
  font-weight: 500;
}
.pill.active .count{ color: rgba(255,255,255,0.7); }

.tag{
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 500;
}
.tag.accent{ background: var(--accent-soft); color: var(--accent-dark); }
.tag.muted{ background: var(--bg-alt); color: var(--body); }
.tag.warn{ background: var(--warn-soft); color: var(--warn); }

/* ===== Status dot ===== */
.dot{
  display:inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sub);
}
.dot.live{ background: #2BA84A; }
.dot.draft{ background: var(--warn); }

/* ===== SVG icons ===== */
svg.i{ width: 16px; height: 16px; stroke-width: 1.8; fill: none; stroke: currentColor; stroke-linecap:round; stroke-linejoin:round; flex-shrink: 0; }
svg.i-sm{ width: 13px; height: 13px; }
svg.i-lg{ width: 20px; height: 20px; }
svg.i-xl{ width: 24px; height: 24px; }

/* ===== Cards ===== */
.card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
