/* ── PPT to PPM Converter ───────────────────────────────────────── */

.ptp-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 840px;
  margin: 2rem auto;
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 32px rgba(194,65,12,0.10);
  color: #7c2d12;
  box-sizing: border-box;
}

/* Header */
.ptp__header {
  background: linear-gradient(135deg, #431407 0%, #7c2d12 35%, #c2410c 75%, #ea580c 100%);
  padding: clamp(1.4rem, 4vw, 2rem) clamp(1.2rem, 4vw, 2rem);
}
.ptp__header h2 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}
.ptp__header p {
  font-size: 0.9rem;
  color: #fed7aa;
  margin: 0;
}

/* Body */
.ptp__body {
  display: flex;
  align-items: flex-start;
}

.ptp__card {
  flex: 1;
  padding: clamp(1.2rem, 3vw, 1.75rem);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ptp__card-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c2410c;
  border-bottom: 2px solid #ffedd5;
  padding-bottom: 0.5rem;
}

.ptp__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #7c2d12;
  margin-bottom: 0.4rem;
}

.ptp__input-row {
  display: flex;
  align-items: center;
  border: 2px solid #fed7aa;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.ptp__input-row:focus-within {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234,88,12,0.15);
}

.ptp__input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.7rem 0.85rem;
  font-size: 1.05rem;
  color: #7c2d12;
  background: transparent;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
}
.ptp__input::placeholder { color: #94a3b8; font-weight: 400; }

.ptp__unit {
  background: #ffedd5;
  color: #c2410c;
  padding: 0.7rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.ptp__arrow {
  text-align: center;
  font-size: 1.4rem;
  color: #ea580c;
  line-height: 1;
}

/* Result box */
.ptp__result-box {
  background: #fff7ed;
  border: 2px solid #fed7aa;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-height: 54px;
}
.ptp__result-box.ptp--has-value {
  background: #ffedd5;
  border-color: #fb923c;
}
.ptp__result-val {
  font-size: 1.45rem;
  font-weight: 900;
  color: #7c2d12;
  line-height: 1;
  word-break: break-all;
}
.ptp__result-unit {
  font-size: 0.9rem;
  font-weight: 700;
  color: #c2410c;
}

/* Formula */
.ptp__formula {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.55;
  background: #f8fafc;
  border-left: 3px solid #fed7aa;
  padding: 0.5rem 0.75rem;
  border-radius: 0 6px 6px 0;
}

/* Clear */
.ptp__clear-btn {
  align-self: flex-start;
  background: none;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 600;
}
.ptp__clear-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fff5f5;
}

/* Divider */
.ptp__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  background: #fff7ed;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #c2410c;
  border-left: 1px solid #ffedd5;
  border-right: 1px solid #ffedd5;
}

/* Table */
.ptp__table-section {
  padding: clamp(1rem, 3vw, 1.5rem);
  background: #fff;
  border-top: 1.5px solid #ffedd5;
}
.ptp__table-title {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 800;
  color: #7c2d12;
  margin: 0 0 0.85rem;
}
.ptp__table-wrap { overflow-x: auto; }
.ptp__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.ptp__table thead tr {
  background: linear-gradient(90deg, #7c2d12, #c2410c);
}
.ptp__table thead th {
  color: #fff;
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.82rem;
}
.ptp__table tbody tr:nth-child(even) { background: #fff7ed; }
.ptp__table tbody tr:hover { background: #ffedd5; }
.ptp__table tbody td {
  padding: 0.5rem 1rem;
  color: #7c2d12;
  font-weight: 500;
  border-bottom: 1px solid #ffedd5;
}

/* Scale section */
.ptp__scale-section {
  padding: clamp(1rem, 3vw, 1.5rem);
  background: #fff7ed;
  border-top: 1.5px solid #ffedd5;
}
.ptp__scale-title {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 800;
  color: #7c2d12;
  margin: 0 0 0.85rem;
}
.ptp__scale-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ptp__scale-card {
  background: #fff;
  border: 1.5px solid #fed7aa;
  border-radius: 10px;
  padding: 0.85rem 0.75rem;
  text-align: center;
}
.ptp__scale-card--active {
  background: #c2410c;
  border-color: #c2410c;
}
.ptp__scale-card--active .ptp__scale-abbr,
.ptp__scale-card--active .ptp__scale-name,
.ptp__scale-card--active .ptp__scale-val,
.ptp__scale-card--active .ptp__scale-eg { color: #fff !important; }

.ptp__scale-abbr {
  font-size: 1.2rem;
  font-weight: 900;
  color: #c2410c;
  margin-bottom: 2px;
}
.ptp__scale-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #7c2d12;
  margin-bottom: 4px;
}
.ptp__scale-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ea580c;
  margin-bottom: 4px;
}
.ptp__scale-eg {
  font-size: 0.68rem;
  color: #92400e;
}

/* Note */
.ptp__note {
  background: #fff7ed;
  border-top: 1.5px solid #fed7aa;
  padding: 0.85rem clamp(1rem, 3vw, 1.5rem);
  font-size: 0.82rem;
  color: #7c2d12;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 620px) {
  .ptp__body { flex-direction: column; }
  .ptp__divider {
    width: 100%; min-width: unset; height: 36px;
    border-left: none; border-right: none;
    border-top: 1px solid #ffedd5; border-bottom: 1px solid #ffedd5;
  }
  .ptp__card { padding: 1rem; }
  .ptp__scale-grid { grid-template-columns: repeat(2, 1fr); }
}
