*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  background: #f0f2f0;
  color: #222;
}

.hidden {
  display: none !important;
}

.muted {
  color: #666;
}

.muted.small,
.small {
  font-size: 0.88em;
}

.error {
  color: #c62828;
  margin: 8px 0 0;
}

.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.login-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 40px 24px 32px;
}

.login-card h1 {
  margin: 0 0 8px;
  color: #1a7f37;
}

.links-row {
  margin-top: 20px;
  text-align: center;
}

.links-row a {
  color: #1a7f37;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.92em;
}

.field input,
.field select,
.url-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 16px;
}

.field-optional span {
  font-weight: 500;
  color: #666;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: #1a7f37;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: #1a7f37;
  border: 1px solid #1a7f37;
}

.btn-ghost {
  background: transparent;
  color: #1a7f37;
  border: 1px solid transparent;
}

.btn-lg {
  width: 100%;
  min-height: 48px;
  font-size: 17px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 12px 100px;
}

.hint-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: #e8f5e9;
  border-radius: 10px;
  font-size: 0.92em;
}

.section {
  padding: 18px 16px;
  margin-bottom: 12px;
}

.section h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: #1a7f37;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 15px;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-row input {
  flex: 1;
  min-width: 0;
}

.img-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: #f0f0f0;
}

.thumb.wide {
  width: 120px;
  height: 68px;
}

.time-row {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.time-row label {
  flex: 1;
}

.foot-note {
  text-align: center;
  padding: 8px 16px 24px;
}

.save-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(transparent, rgba(240, 242, 240, 0.95) 24%);
  max-width: 720px;
  margin: 0 auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 100;
  max-width: 90vw;
}

@media (min-width: 768px) {
  .login-card {
    margin-top: 48px;
  }
}
