@charset "UTF-8";

.heic-converter-page {
  --heic-ink: #213547;
  --heic-muted: #677b8b;
  --heic-line: #dce5e9;
  --heic-soft: #f7faf9;
  --heic-accent: #d97706;
  --heic-accent-dark: #b45309;
  --heic-accent-soft: #fff7ed;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 0 44px;
}

.heic-converter-page .utility-top {
  padding: 34px 24px 30px;
  text-align: center;
}

.heic-converter-page .utility-label {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 7px 14px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: var(--heic-accent-soft);
  color: var(--heic-accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.heic-converter-page .utility-title {
  margin: 0;
  color: var(--heic-ink);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: -0.045em;
}

.heic-converter-page .utility-desc {
  max-width: 800px;
  margin: 17px auto 0;
  color: var(--heic-muted);
  font-size: 15px;
  line-height: 1.85;
  word-break: keep-all;
}

.heic-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.heic-summary-item {
  min-height: 150px;
  padding: 24px;
  border: 1px solid rgba(217, 119, 6, 0.15);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 146, 60, 0.14), transparent 42%),
    #ffffff;
  box-shadow: 0 16px 38px rgba(54, 75, 86, 0.07);
}

.heic-summary-item .summary-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--heic-ink);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.heic-summary-item strong {
  display: block;
  margin-bottom: 7px;
  color: var(--heic-ink);
  font-size: 16px;
  font-weight: 900;
}

.heic-summary-item > span:last-child {
  display: block;
  color: var(--heic-muted);
  font-size: 13px;
  line-height: 1.65;
}

.heic-upload-card,
.heic-workspace-card {
  padding: 30px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.15);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(54, 75, 86, 0.08);
}

.heic-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.section-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--heic-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.heic-card-head h2 {
  margin: 0 0 8px;
  color: var(--heic-ink);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.heic-card-head p {
  margin: 0;
  color: var(--heic-muted);
  font-size: 14px;
  line-height: 1.7;
}

.heic-head-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 10px;
}

.upload-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.upload-dropzone {
  display: flex;
  min-height: 230px;
  padding: 34px 24px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 2px dashed #d6b995;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.95), rgba(255, 251, 235, 0.78)),
    #fffdfa;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-visible,
.upload-dropzone.is-dragover {
  border-color: var(--heic-accent);
  outline: none;
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.13);
  transform: translateY(-2px);
}

.upload-icon {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: #ffffff;
  color: var(--heic-accent);
  box-shadow: 0 10px 26px rgba(54, 75, 86, 0.12);
}

.upload-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.upload-main-text {
  color: var(--heic-ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.5;
}

.upload-mobile-text {
  display: none;
}

.upload-file-chip {
  display: inline-flex;
  margin-left: 5px;
  padding: 8px 15px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--heic-ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.upload-sub-text,
.upload-limit-text {
  color: var(--heic-muted);
  font-size: 13px;
  line-height: 1.55;
}

.upload-limit-text {
  color: #8c9aa5;
  font-size: 12px;
}

.upload-message {
  margin: 0;
  padding: 12px 15px;
  border: 1px solid #fecaca;
  border-radius: 13px;
  background: #fff7f7;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.notice-strip {
  display: flex;
  gap: 10px;
  padding: 14px 17px;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  background: var(--heic-accent-soft);
  color: var(--heic-accent-dark);
  font-size: 13px;
  line-height: 1.75;
}

.notice-strip strong {
  color: var(--heic-ink);
  white-space: nowrap;
}

.heic-tool-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.heic-tool-sidebar,
.heic-tool-main {
  min-width: 0;
}

.heic-tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.heic-control-box {
  padding: 18px;
  border: 1px solid var(--heic-line);
  border-radius: 18px;
  background: var(--heic-soft);
}

.heic-control-box .utility-field-label {
  display: block;
  margin: 0;
  color: var(--heic-ink);
  font-size: 14px;
  font-weight: 900;
}

.heic-control-box .utility-input {
  width: 100%;
  min-height: 48px;
  margin-top: 11px;
  padding: 0 13px;
  border: 1px solid #becbd1;
  border-radius: 13px;
  background: #ffffff;
  color: var(--heic-ink);
  font-size: 14px;
  font-weight: 700;
}

.heic-control-box .utility-input:focus {
  border-color: var(--heic-accent);
  outline: none;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.1);
}

.control-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-heading-row output {
  color: var(--heic-accent-dark);
  font-size: 14px;
  font-weight: 900;
}

.heic-control-box input[type="range"] {
  width: 100%;
  margin-top: 13px;
  accent-color: var(--heic-accent);
}

.toggle-help {
  margin: 10px 0 0;
  color: var(--heic-muted);
  font-size: 12px;
  line-height: 1.7;
}

.color-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.color-input-row input[type="color"] {
  width: 54px;
  height: 38px;
  padding: 3px;
  border: 1px solid #becbd1;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
}

.color-input-row output {
  color: var(--heic-ink);
  font-size: 12px;
  font-weight: 900;
}

.privacy-option-box {
  display: flex;
  gap: 12px;
  background: var(--heic-accent-soft);
}

.privacy-option-icon {
  display: inline-flex;
  width: 45px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--heic-accent-dark);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.privacy-option-box strong {
  display: block;
  margin-bottom: 5px;
  color: var(--heic-ink);
  font-size: 13px;
  font-weight: 900;
}

.privacy-option-box p {
  margin: 0;
  color: var(--heic-muted);
  font-size: 11px;
  line-height: 1.65;
}

.original-info-box dl {
  display: grid;
  gap: 9px;
  margin: 13px 0 0;
}

.original-info-box dl > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.original-info-box dt {
  color: var(--heic-muted);
  font-size: 12px;
}

.original-info-box dd {
  max-width: 175px;
  margin: 0;
  overflow: hidden;
  color: var(--heic-ink);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heic-converter-page .utility-btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 13px;
  font-weight: 900;
}

.heic-converter-page .utility-btn-primary {
  border-color: var(--heic-accent);
  background: linear-gradient(135deg, #ea8a0a, var(--heic-accent-dark));
  color: #ffffff;
}

.heic-converter-page .utility-btn-primary:hover {
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.2);
  transform: translateY(-1px);
}

.heic-converter-page .utility-btn:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.preview-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--heic-line);
  border-radius: 21px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(54, 75, 86, 0.055);
}

.preview-result-card {
  border-color: #fed7aa;
}

.preview-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.preview-card h3 {
  margin: 0;
  color: var(--heic-ink);
  font-size: 16px;
  font-weight: 900;
}

.preview-badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf0f2;
  color: #586d7d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.preview-badge-accent {
  background: var(--heic-accent-soft);
  color: var(--heic-accent-dark);
}

.heic-file-preview,
.preview-image-wrap {
  position: relative;
  display: flex;
  height: 330px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--heic-line);
  border-radius: 17px;
  background:
    linear-gradient(135deg, #f7faf9, #fff7ed);
}

.heic-file-preview {
  flex-direction: column;
  gap: 13px;
  padding: 25px;
  text-align: center;
}

.heic-file-icon {
  display: inline-flex;
  width: 92px;
  height: 108px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fed7aa;
  border-radius: 17px 17px 17px 6px;
  background: #ffffff;
  color: var(--heic-accent-dark);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0.06em;
  box-shadow: 0 14px 30px rgba(54, 75, 86, 0.09);
}

.heic-file-preview strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--heic-ink);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heic-file-preview > span:last-child {
  color: var(--heic-muted);
  font-size: 12px;
}

.preview-image-wrap {
  background:
    linear-gradient(45deg, #edf2f3 25%, transparent 25%),
    linear-gradient(-45deg, #edf2f3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf2f3 75%),
    linear-gradient(-45deg, transparent 75%, #edf2f3 75%),
    #ffffff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.preview-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-empty {
  max-width: 240px;
  padding: 20px;
  color: var(--heic-muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.preview-meta {
  min-height: 43px;
  margin-top: 11px;
  color: #586d7d;
  font-size: 12px;
  line-height: 1.7;
}

.preview-download {
  display: flex;
  width: 100%;
  margin-top: 12px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.conversion-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.conversion-stats > div {
  padding: 14px;
  border: 1px solid var(--heic-line);
  border-radius: 15px;
  background: var(--heic-soft);
}

.conversion-stats span {
  display: block;
  margin-bottom: 6px;
  color: var(--heic-muted);
  font-size: 11px;
  font-weight: 800;
}

.conversion-stats strong {
  display: block;
  color: var(--heic-ink);
  font-size: 14px;
  font-weight: 900;
}

.conversion-stats strong.is-positive {
  color: #047857;
}

.conversion-stats strong.is-negative {
  color: #b42318;
}

.heic-result-box {
  min-height: 88px;
  margin-top: 16px;
  padding: 18px 19px;
  border: 1px solid #fed7aa;
  border-radius: 17px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  color: var(--heic-accent-dark);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-line;
}

.heic-converter-page .help-panel {
  margin-top: 34px;
}

.heic-converter-page .help-panel > h2 {
  margin: 0 0 18px;
  color: var(--heic-ink);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.heic-converter-page .help-box {
  border-radius: 21px;
}

.heic-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.heic-guide-card {
  padding: 20px;
  border: 1px solid var(--heic-line);
  border-radius: 19px;
  background: #ffffff;
}

.heic-guide-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--heic-ink);
  font-size: 15px;
  font-weight: 900;
}

.heic-guide-card p {
  margin: 0;
  color: var(--heic-muted);
  font-size: 13px;
  line-height: 1.75;
}

.heic-converter-page .help-toggle-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--heic-ink);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}

.heic-converter-page .help-toggle-box summary::-webkit-details-marker {
  display: none;
}

.heic-converter-page .help-toggle-box summary::after {
  color: var(--heic-muted);
  content: "+";
  font-size: 1.2rem;
  font-weight: 800;
}

.heic-converter-page .help-toggle-box[open] summary::after {
  content: "-";
}

.heic-converter-page .help-toggle-content {
  margin-top: 14px;
}

.heic-converter-page .help-toggle-content p {
  margin: 0;
  color: #435968;
  line-height: 1.8;
}

@media (max-width: 1060px) {
  .heic-tool-grid {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .heic-file-preview,
  .preview-image-wrap {
    height: 285px;
  }
}

@media (max-width: 900px) {
  .heic-tool-grid,
  .heic-card-head {
    grid-template-columns: 1fr;
  }

  .heic-head-actions {
    justify-content: flex-start;
  }

  .heic-tool-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .heic-converter-page {
    padding: 0 0 30px;
  }

  .heic-converter-page .utility-top {
    padding: 25px 14px 23px;
  }

  .heic-summary-card,
  .preview-grid,
  .heic-guide-grid {
    grid-template-columns: 1fr;
  }

  .heic-summary-item {
    min-height: 0;
  }

  .heic-upload-card,
  .heic-workspace-card {
    padding: 21px;
    border-radius: 21px;
  }

  .upload-dropzone {
    min-height: 190px;
    padding: 27px 18px;
    border-width: 1px;
    border-style: solid;
  }

  .upload-desktop-text {
    display: none;
  }

  .upload-mobile-text {
    display: block;
    font-size: 17px;
  }

  .notice-strip {
    flex-direction: column;
    gap: 4px;
  }

  .heic-tool-sidebar {
    display: flex;
  }

  .heic-head-actions,
  .heic-head-actions .utility-btn {
    width: 100%;
  }

  .conversion-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .heic-converter-page .utility-title {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .conversion-stats {
    grid-template-columns: 1fr;
  }

  .preview-card {
    padding: 14px;
  }

  .heic-file-preview,
  .preview-image-wrap {
    height: 245px;
  }

  .heic-head-actions {
    flex-direction: column;
  }
}
