:root { color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: 'Inter', 'Sarabun', sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
.cloud-shell { width: min(100% - 32px, 720px); margin: 0 auto; padding: 32px 0 64px; }
.cloud-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 48px; }
.cloud-header img { width: 145px; height: auto; object-fit: contain; }
.cloud-label { color: var(--dim); font-size: 13px; }
.cloud-card { max-width: 480px; margin: 0 auto; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 8px 24px rgba(22,24,29,.05); }
.cloud-projects { max-width: none; }
h1 { margin: 0; font-size: clamp(24px, 4vw, 30px); line-height: 1.25; }
h2 { margin: 32px 0 12px; font-size: 18px; }
.cloud-intro, #loadingView p { margin: 8px 0 24px; color: var(--dim); line-height: 1.5; }
form { display: grid; gap: 10px; }
label { font-size: 14px; font-weight: 600; }
input { min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel); color: var(--ink); }
input:hover { border-color: var(--dim); }
form > label:not(:first-child) { margin-top: 8px; }
.cloud-primary, .cloud-secondary { min-height: 44px; padding: 10px 18px; border-radius: 8px; font-weight: 650; }
.cloud-primary { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.cloud-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.cloud-secondary { border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); }
.cloud-secondary:hover:not(:disabled) { background: var(--panel2); }
form > .cloud-primary { margin-top: 12px; }
.cloud-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; }
.cloud-links button, .cloud-back { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--accent); }
.cloud-links button:hover, .cloud-back:hover { text-decoration: underline; }
.cloud-back { margin-top: 16px; }
.cloud-projects-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cloud-projects-heading .cloud-intro { margin-bottom: 0; overflow-wrap: anywhere; }
.cloud-create { margin-top: 28px; }
.cloud-create-row { display: flex; gap: 12px; }
.cloud-create-row input { flex: 1; }
.cloud-create-row button { flex: none; }
.cloud-project-list { padding: 0; margin: 0; list-style: none; }
.cloud-project-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.cloud-project-list li span { min-width: 0; overflow-wrap: anywhere; }
.cloud-project-list time, .cloud-empty { color: var(--dim); font-size: 13px; }
.cloud-message { max-width: 720px; margin: 16px auto 0; padding: 12px 16px; border-radius: 8px; background: var(--panel2); color: var(--ink); line-height: 1.5; }
.cloud-message[data-kind="error"] { background: #fff1ee; color: #9f2d22; }
.cloud-message[data-kind="success"] { background: #eaf6ef; color: #17663f; }
:is(button, input):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 560px) {
  .cloud-shell { width: min(100% - 24px, 720px); padding-top: 20px; }
  .cloud-header { margin-bottom: 28px; }
  .cloud-card { padding: 24px 20px; }
  .cloud-projects-heading, .cloud-create-row { flex-direction: column; }
  .cloud-create-row button, .cloud-projects-heading button { width: 100%; }
  .cloud-project-list li { flex-direction: column; gap: 4px; }
}
