*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'YuGothic', sans-serif;
  background: #f5f5f3;
  color: #1a1a1a;
  font-size: 15px;
  line-height: 1.75;
  min-height: 100vh;
}

.page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.page-header { margin-bottom: 1.75rem; }
.page-header h1 { font-size: 22px; font-weight: 700; margin-bottom: .4rem; }
.page-header .lead { font-size: 14px; color: #555; line-height: 1.75; }

.site-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 20px;
  margin-bottom: 28px;
}
.site-logo {
  display: inline-block;
  line-height: 0;
}

.card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.card h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid #efefef;
}

#drop-zone {
  border: 2px dashed #c0c0c0;
  border-radius: 10px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: #fafafa;
  margin-bottom: 1.25rem;
}
#drop-zone.dragover {
  border-color: #1a73e8;
  background: #e8f0fe;
}
#drop-zone .drop-icon { font-size: 36px; display: block; margin-bottom: .5rem; }
#drop-zone p { font-size: 14px; color: #666; margin-bottom: .4rem; }
#drop-zone small { font-size: 13px; color: #999; }
#file-input { display: none; }

.resize-settings { margin-bottom: 1.25rem; }
.resize-settings label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: .4rem; }

.size-inputs {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.size-inputs input[type="number"] {
  width: 100px;
  padding: .45rem .6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s;
}
.size-inputs input[type="number"]:focus {
  outline: none;
  border-color: #1a73e8;
}
.size-inputs .sep { font-size: 14px; color: #888; }

.lock-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .6rem;
}
.lock-wrap input[type="checkbox"] { accent-color: #1a73e8; width: 15px; height: 15px; }
.lock-wrap label { font-size: 13px; color: #444; cursor: pointer; user-select: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border: none;
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-primary { background: #1a73e8; color: #fff; }
.btn-primary:hover:not(:disabled) { opacity: .88; }
.btn-success { background: #34a853; color: #fff; }
.btn-success:hover:not(:disabled) { opacity: .88; }
.btn-outline { background: #fff; color: #444; border: 1px solid #ccc; }
.btn-outline:hover:not(:disabled) { background: #f5f5f5; }
.btn-sm { padding: .35rem .75rem; font-size: 13px; }

.ctrl-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

#summary {
  display: none;
  background: #f0f7ff;
  border: 1px solid #c2dbf7;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: 14px;
  margin-bottom: 1rem;
  line-height: 1.6;
}
#summary strong { color: #1a73e8; }

#file-list { display: flex; flex-direction: column; gap: .75rem; }

.file-item {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.file-item-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem .9rem;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: wrap;
}
.file-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  flex-shrink: 0;
}
.file-name {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-badges { display: flex; gap: .4rem; align-items: center; flex-shrink: 0; flex-wrap: wrap; }

.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-gray  { background: #ebebeb; color: #555; }
.badge-green { background: #e6f4ea; color: #1e7e34; }
.badge-red   { background: #fce8e6; color: #c62828; }
.badge-blue  { background: #e8f0fe; color: #1a56db; }

.file-item-body { padding: .65rem .9rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.file-dim { font-size: 13px; color: #666; flex: 1; }

.section-title { font-size: 17px; font-weight: 700; margin-bottom: .75rem; }

.merit-list { display: flex; flex-direction: column; gap: .6rem; padding: 0; list-style: none; }
.merit-list li { display: flex; gap: .6rem; font-size: 14px; line-height: 1.7; }
.merit-list li .icon { font-size: 18px; flex-shrink: 0; margin-top: .05rem; }

.note-list { display: flex; flex-direction: column; gap: .5rem; padding: 0; list-style: none; }
.note-list li { display: flex; gap: .5rem; font-size: 14px; line-height: 1.7; }
.note-list li::before { content: '※'; flex-shrink: 0; color: #e0780a; font-weight: 700; }

footer {
  text-align: center;
  font-size: 13px;
  color: #999;
  padding: 2rem 1rem 1rem;
  border-top: 1px solid #e8e8e8;
  margin-top: 1rem;
}
footer a { color: #1a73e8; text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 1rem; justify-content: center; margin-bottom: .5rem; flex-wrap: wrap; }

@media (max-width: 500px) {
  .page-wrap { padding: 1rem .75rem 3rem; }
  .card { padding: 1.1rem; }
  .size-inputs input[type="number"] { width: 80px; }
  .btn { font-size: 13px; }
}

/* ---- リンクボタン ---- */
.related-tool-link {
margin: 20px 0;
text-align: center;
}

.related-tool-link a {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 9px 16px;
border: 1px solid #ccc;
border-radius: 6px;
background: #fff;
color: #555;
font-size: 14px;
text-decoration: none;
transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.related-tool-link a:hover {
border-color: #999;
color: #222;
background: #fafafa;
}

.related-tool-link a svg {
flex-shrink: 0;
opacity: 0.5;
}

.related-tool-link a:hover svg {
opacity: 0.8;
}