:root {
    --primary-blue: #4a90e2;
    --accent-blue: #357abd;
    --bg-light-blue: #f0f7ff;
    --card-bg: #ffffff;
    --text-color: #444;
    --border-blue: #b3d4fc;
}

body {
    background-color: var(--bg-light-blue);
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 40px 20px;
    -webkit-text-size-adjust: 100%;
}

h2 {
    display: flex;
    align-items: center;
    font-size: 21px;
    margin: 0 0 20px 0;
    color: #333;
    line-height: 1.4;
}

@media screen and (max-width: 450px) {
  h2 {
    font-size: 18px;
  }
}

/* AdSence */

.ad-spacer {
    margin: 40px auto;
    text-align: center;
    max-width: 900px;
    min-height: 100px;
    background: transparent;
    overflow: hidden;
}

.ad-spacer::before {
    content: "スポンサーリンク";
    display: block;
    font-size: 10px;
    color: #bbb;
    margin-bottom: 5px;
}

/* main */

.main-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-left: 10px;
}

.tool-header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--primary-blue);
    letter-spacing: -0.5px;
}

@media screen and (max-width: 450px) {
  .tool-header h1 {
    font-size: 15px;
  }
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 35px;
    margin-bottom: 45px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    font-size: 15px;
    margin-right: 12px;
    position: static;
    transform: translateY(-1px);
}

.drop-zone {
    border: 2px dashed var(--border-blue);
    background-color: #fafcfe;
    border-radius: 8px;
    padding: 50px;
    text-align: center;
    transition: background 0.3s;
}

.drop-zone.dragover {
    background-color: #e1efff;
}

.file-label {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 15px;
    box-shadow: 0 4px 0 var(--accent-blue);
}

.file-label input { 
    display: none; 
}

.settings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: flex-end;
    margin-bottom: 35px;
}

.input-group label {
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--primary-blue);
    font-size: 0.95rem;
}

.input-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-inline input {
    width: 100px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
}

.quality-buttons {
    display: flex;
    gap: 8px;
}

.q-btn {
    border: 1px solid var(--border-blue);
    padding: 10px 22px;
    background: #fff;
    color: var(--primary-blue);
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
}

.q-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.action-area {
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 45px;
    flex-wrap: wrap;
}

.exec-button {
    background: #dee2e6;
    color: white;
    border: none;
    padding: 15px 40px;
    min-width: 280px;
    border-radius: 35px;
    font-size: 1.1rem;
    cursor: not-allowed;
}

.exec-button.ready {
    background: var(--primary-blue);
    cursor: pointer;
    box-shadow: 0 4px 0 var(--accent-blue);
}

.button-note {
    margin-top: 30px;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 768px) {
    .button-note {
        font-size: 0.8rem;
        padding: 0 15px;
    }
}

.file-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.preview-item {
    position: relative;
    background: #fff;
    border: 1px solid var(--border-blue);
    border-radius: 8px;
    padding: 15px 10px 10px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.7rem;
}

.preview-item img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    margin-bottom: 8px;
}

.delete-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 22px;
    height: 22px;
    background: #ff5e5e;
    color: white;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.delete-btn:hover { 
    background: #d94545; 
}

/* content */

.content-section {
    line-height: 1.8;
    margin-top: 50px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

@media screen and (max-width: 450px) {
  .content-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

.info-box h3 {
    font-size: 1rem;
    color: var(--primary-blue);
    border-left: 4px solid var(--primary-blue);
    padding-left: 10px;
    margin-bottom: 10px;
}

/* system */

.system-section {
  padding: 10px 0;
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
}

@media screen and (max-width: 450px) {
  .system-section {
    padding: 1px 0;
  }
}

.system_service_title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
}

.system_service_title_en {
  text-align: center;
  font-size: 0.9rem;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.system-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 50px auto 0;
  padding: 0 20px;
}

@media screen and (max-width: 768px) {
  .system-gallery-grid {
    grid-template-columns: 1fr; 
  }
}

@media screen and (max-width: 450px) {
  .system-gallery-grid {
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
    padding: 0 10px;
    margin-top: 45px;
    margin-bottom: 80px;
  }
}

.system-card {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.system-card-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.system-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.system-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

@media screen and (max-width: 450px) {
  .system-card-title {
    font-size: 13px;
  }
}

.system-card-tags {
  font-size: 0.85rem;
  font-weight: 700;
  color: #666;
  margin-bottom: 20px;
}

@media screen and (max-width: 450px) {
  .system-card-tags {
    font-size: 12px;
  }
}

.system-card-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.system-detail-link {
  color: #0047ff;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
}

.system-favorite-btn {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 1.2rem;
}

/* tool */

.tool-footer {
    text-align: center;
    padding: 40px 0;
    font-size: 0.8rem;
}

.tool-footer a {
    color: var(--primary-blue);
    text-decoration: none;
}

/* copyright */

.copyright { 
    margin-top: 20px; 
    grid-row-start: 2; 
    grid-row-end: 3; 
    width: 100%; 
}

.copyright_text { 
    font-weight: 500; 
    font-size: 12px; 
    color: var(--text-gray-color); 
    margin-top: 16px; 
    text-align: center; 
    padding-bottom: 8px; 
    letter-spacing: 0.08em; 
}