/* หน้าใส่กรอบรูปโปรไฟล์วันดินโลก (profile-frame.php) */
:root { font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; color: #203a2a; background: #f3f8ef; }
* { box-sizing: border-box; }
body { margin: 0; background: #f3f8ef; }
header { background: linear-gradient(115deg, #205c37, #438e42); color: #fff; text-align: center; padding: 30px 16px 26px; position: relative; }
header h1 { margin: 0; font-size: clamp(23px, 4vw, 36px); }
header p { margin: 8px 0 0; opacity: .92; }
.back { position: absolute; left: 16px; top: 14px; color: #fff; text-decoration: none; font-size: 14px; background: rgba(255,255,255,.16); padding: 6px 12px; border-radius: 999px; }
.back:hover, .back:focus { background: rgba(255,255,255,.28); }
.wrap { max-width: 1050px; margin: 24px auto; padding: 0 16px 40px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 22px; }
.panel { background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 6px 28px #1b512012; }
.panel h2 { font-size: 20px; margin: 0 0 14px; }
.preview { width: 100%; aspect-ratio: 1; background: #e5eee2; border-radius: 16px; overflow: hidden; touch-action: none; cursor: grab; position: relative; }
.preview:active { cursor: grabbing; }
.preview canvas { display: block; width: 100%; height: 100%; }
.hint { text-align: center; font-size: 13px; color: #59715f; margin: 10px 0 0; }
.frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.frame-btn { background: #f5f8f2; border: 2px solid #e2eadf; border-radius: 14px; padding: 8px; cursor: pointer; color: #285334; font: inherit; font-weight: 600; }
.frame-btn[aria-pressed=true] { border-color: #2c8a48; background: #e8f5e7; }
.frame-btn img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; margin-bottom: 5px; }
.field { margin-top: 18px; }
.field label { display: block; font-weight: 650; margin-bottom: 9px; }
.field label .limit { color: #d32f2f; font-weight: 700; }
.upload { display: block; border: 2px dashed #85b48b; background: #f4faf3; padding: 18px; text-align: center; border-radius: 14px; cursor: pointer; font-weight: 650; position: relative; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:focus-within { outline: 3px solid #7ecf90; }
input[type=range] { width: 100%; accent-color: #34894c; }
.buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
button.action { border: 0; border-radius: 12px; padding: 13px 16px; font: inherit; font-weight: 700; cursor: pointer; flex: 1; }
.primary { background: #267b43; color: #fff; }
.secondary { background: #e9f0e8; color: #29573b; }
.note { font-size: 13px; color: #617265; line-height: 1.6; }
.status { font-size: 13px; min-height: 22px; color: #a63c28; margin-top: 8px; }
footer { text-align: center; color: #617265; font-size: 13px; padding: 8px 16px 28px; }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .panel { padding: 15px; }
  .wrap { margin-top: 15px; }
  header { padding-top: 48px; }
}
