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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fff;
  color: #111;
  padding: 16px 14px 28px;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-container {
  width: 100%;
  max-width: 420px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  text-align: center;
}

.page-sub {
  font-size: 13px;
  color: #888;
  line-height: 1.45;
  margin-bottom: 28px;
  text-align: center;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-btn {
  width: 100%;
  background: #F5F5F5;
  border: 1.5px solid #E0E0E0;
  border-radius: 14px;
  padding: 18px 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #111;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.action-btn:active {
  background: #EBEBEB;
  border-color: #111;
}

.action-btn svg {
  width: 24px;
  height: 24px;
  stroke: #111;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.action-btn span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.action-btn .btn-title {
  font-size: 16px;
  font-weight: 600;
}

.action-btn .btn-hint {
  font-size: 12px;
  font-weight: 400;
  color: #999;
  margin-top: 1px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay.on {
  display: flex;
}

.modal-card {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 16px 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: #F2F2F2;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  color: #555;
}

.modal-close:active { background: #E0E0E0; }

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
  padding-right: 30px;
}

.sep {
  height: 1px;
  background: #F0F0F0;
  margin: 16px 0;
}

.lbl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.lbl .cnt {
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #BBB;
}

.lbl .cnt.warn { color: #E07800; }
.lbl .cnt.over { color: #E03030; }

input[type="text"],
input[type="url"],
input[type="email"],
textarea {
  width: 100%;
  border: 1.5px solid #E0E0E0;
  border-radius: 10px;
  padding: 12px 13px;
  font-family: inherit;
  font-size: 15px;
  color: #111;
  background: #FAFAFA;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
  resize: none;
  margin-bottom: 12px;
}

input:focus,
textarea:focus {
  border-color: #111;
  background: #fff;
}

textarea {
  min-height: 90px;
  line-height: 1.5;
}

.tab-wrap {
  display: flex;
  background: #F2F2F2;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 14px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 9px 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.tab-btn.active {
  background: #fff;
  color: #111;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.tab-btn.disabled-tab {
  background: #FFE0E0;
  color: #E03030;
  cursor: not-allowed;
  opacity: 0.8;
  font-weight: 600;
  border: 1px solid #E03030;
}

.panel { display: none; }
.panel.on { display: block; }

.upload-box {
  border: 1.5px dashed #DDD;
  border-radius: 10px;
  padding: 18px 14px;
  background: #FAFAFA;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  margin-bottom: 8px;
}

.coming-soon {
  text-align: center;
  padding: 30px 14px;
  background: #FFF5F5;
  border-radius: 10px;
  border: 1px solid #FFCCCC;
}

.coming-soon p {
  margin-top: 10px;
  color: #C00;
  font-weight: 500;
  font-size: 14px;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F5F5F5;
  border-radius: 8px;
  padding: 9px 11px;
}

.file-badge {
  width: 34px; height: 34px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700;
  flex-shrink: 0; letter-spacing: 0.2px;
}

.file-badge.img  { background: #E6F2FF; color: #1E6FBF; }
.file-badge.vid  { background: #FFF0E6; color: #C05018; }
.file-badge.other{ background: #EEE;    color: #555; }

.file-info b { font-size: 13px; font-weight: 500; }
.file-info small { font-size: 11px; color: #999; }
.file-rm { background: none; border: none; cursor: pointer; color: #CCC; padding: 4px; }
.file-rm:active { color: #E03030; }

.url-note {
  font-size: 12px;
  color: #999;
  margin-top: 6px;
  line-height: 1.4;
}

.bug-intro {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.4;
}

.err {
  background: #FFF0F0;
  border: 1px solid #FFCCCC;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13px;
  color: #C00;
  margin: 10px 0;
  display: none;
}
.err.on { display: block; }

.btn {
  width: 100%;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
}

.btn:active { opacity: 0.75; }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.spinner {
  width: 17px; height: 17px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: none;
}

.loading .spinner { display: block; }
.loading .btn-ic  { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.success-msg {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0 8px;
}

.success-msg.on { display: flex; }

.success-msg svg {
  width: 44px; height: 44px;
  stroke: #3A8A00;
  fill: none;
  stroke-width: 2.5;
  margin-bottom: 12px;
}

.success-msg h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.success-msg p  { font-size: 13px; color: #666; }