
:root{
  --bg:#f7f9fc;
  --surface:#ffffff;
  --surface-2:#f1f5f9;
  --text:#172033;
  --muted:#667085;
  --line:#e6eaf0;
  --primary:#2563eb;
  --primary-2:#1d4ed8;
  --primary-soft:#eef4ff;
  --success:#15803d;
  --warning:#a16207;
  --danger:#b42318;
  --radius:18px;
  --shadow:0 10px 30px rgba(15,23,42,.07);
  --shadow-sm:0 4px 14px rgba(15,23,42,.05);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;overflow-x:hidden}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;
  line-height:1.75;-webkit-font-smoothing:antialiased
}
body{overflow-x:hidden}
main,section,article,.wrap,.container,.card,.tool-box{min-width:0}
pre,code{max-width:100%;overflow-wrap:anywhere}
table{max-width:100%}
img{max-width:100%;height:auto}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3{line-height:1.35;letter-spacing:-.01em}
h1{font-size:clamp(1.9rem,4vw,3.1rem);margin:.2em 0 .35em}
h2{font-size:clamp(1.35rem,2.5vw,1.8rem);margin:0 0 18px}
h3{font-size:1.05rem;margin:.1em 0 .35em}
p{margin:.55em 0 1em}
.wrap,.container{width:min(1120px,calc(100% - 32px));margin-inline:auto}
.site-header{
  position:sticky;top:0;z-index:20;background:rgba(255,255,255,.94);
  backdrop-filter:blur(12px);border-bottom:1px solid rgba(230,234,240,.9)
}
.header-inner{min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:22px}
.brand,.site-logo{font-weight:900;font-size:1.15rem;color:var(--text);letter-spacing:.02em;display:flex;align-items:center;gap:10px}
.brand img,.site-logo img{width:28px;height:28px;border-radius:8px}
.brand:hover,.site-logo:hover{text-decoration:none}
.nav{display:flex;gap:16px;flex-wrap:wrap}
.nav a{color:#465066;font-size:.94rem;font-weight:700}
.hero{
  padding:56px 0 36px;
  background:linear-gradient(180deg,#fff 0%,#f7f9fc 100%);
  border-bottom:1px solid var(--line)
}
.hero p{max-width:760px;color:var(--muted);font-size:1.06rem}
.breadcrumbs{font-size:.9rem;color:var(--muted);margin:18px 0 8px;display:flex;align-items:center;gap:.5em;flex-wrap:wrap}
.breadcrumbs a{font-weight:700;text-decoration:underline;text-underline-offset:3px}
.section{padding:42px 0}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.card{
  display:block;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:20px;box-shadow:var(--shadow-sm);color:var(--text);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease
}
.card:hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:#cfd8e6;text-decoration:none}
.card p{color:var(--muted);margin-bottom:0}
.small{font-size:.88rem;color:var(--muted)}
.searchbox{margin-top:22px;max-width:660px}
.searchbox input{
  width:100%;border:1px solid #d7deea;background:#fff;border-radius:14px;
  padding:15px 16px;font:inherit;box-shadow:var(--shadow-sm)
}
.footer,.site-footer{margin-top:56px;padding:30px 0;border-top:1px solid var(--line);background:#fff}
.footer-links{display:flex;gap:18px;flex-wrap:wrap}
.footer-links a,.site-footer a{color:#586276;font-size:.92rem}
.download-grid{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.download-grid .button{margin:0}
.badge{display:inline-flex;align-items:center;gap:6px;background:var(--primary-soft);color:var(--primary-2);
  font-weight:800;font-size:.78rem;padding:5px 9px;border-radius:999px}
.notice{background:#f8fafc;border:1px solid var(--line);border-radius:14px;padding:14px 16px}
@media(max-width:900px){
  .grid{grid-template-columns:1fr}
  .nav{gap:10px}
}
@media(max-width:640px){
  .wrap,.container{width:min(100% - 20px,1120px)}
  .header-inner{min-height:58px;align-items:flex-start;padding:12px 0;flex-direction:column;gap:8px}
  .nav{overflow-x:auto;width:100%;padding-bottom:3px;flex-wrap:nowrap}
  .nav a{white-space:nowrap}
  .hero{padding:34px 0 26px}
  .grid{grid-template-columns:1fr}
  .section{padding:30px 0}
}

/* Narrow preview and mobile controls */
.actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}
.actions button,.actions .btn,.actions .button{
  flex:0 0 auto;
  width:auto;
  min-width:8rem;
  margin:0;
  white-space:normal;
  word-break:keep-all;
}
@media(max-width:700px){
  .actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .actions button,.actions .btn,.actions .button{
    width:100%;
    min-width:0;
    min-height:46px;
  }
}


/* v2: visual tool cards */
.tool-card{display:flex;gap:15px;align-items:flex-start;min-height:160px;height:100%}
.tool-card-body{min-width:0;flex:1}
.tool-card-icon,.category-card-icon{
  width:52px;height:52px;min-width:52px;border-radius:15px;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#eef4ff,#e9f8ff);border:1px solid #dbe8ff;color:#1d4ed8;
  font-size:1.45rem;font-weight:900;line-height:1;box-shadow:0 4px 12px rgba(37,99,235,.08);margin-bottom:12px
}
.category-card-icon{width:48px;height:48px;min-width:48px;font-size:1.35rem}
.card .tool-card-icon + h3{margin-top:10px}

/* v2: unified file drop areas */
.dropzone{
  border:2px dashed #b8c7df;border-radius:18px;background:#f8fbff;padding:24px;text-align:center;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease
}
.dropzone.drag,.dropzone.is-dragover{border-color:var(--primary);background:#eef5ff;box-shadow:0 0 0 4px rgba(37,99,235,.08)}
.dropzone input[type=file]{max-width:100%;margin:8px auto 0;font:inherit}
.dropzone-icon,.dropzone-arrow{font-size:1.65rem;color:var(--primary);font-weight:900}
.dropzone-action{margin:0 0 10px;color:var(--text)}
.universal-dropzone{cursor:pointer;margin:10px 0 18px}
.universal-dropzone input[type=file]{cursor:pointer}
@media(max-width:640px){
 .tool-card{min-height:auto}
 .tool-card-icon{width:46px;height:46px;min-width:46px}
 input,textarea,select,button{max-width:100%}
 .dropzone{padding:18px 12px}
}
