feat: hobby project landing page (PWA + SPA) with admin backoffice

- landing page: welcome hero, live search, project card grid (10 projects from owner list)
- warm brown/white theme (fastwork-inspired layout), embedded K2D Thai font
- PWA: manifest, PIL-generated icons, versioned service worker with auto-update
- backoffice at #/admin: edit name/description/url, reorder, delete, publish
- server/publish.mjs: zero-dependency static server + PUT api/projects with
  validation, JSON write, git commit and push; loopback-only unless ADMIN_TOKEN
- docs: README, DESIGN.md (color/type contract), AGENTS.md
This commit is contained in:
Bkk1234 committed 2026-11-19 01:03:13 +07:00
1 parent e55b193644
commit c00bc62272
35 files changed
+3432 -2

No files matched your search

+312
View File
@@ -0,0 +1,312 @@
/* ==========================================================================
admin.css — หน้าจัดการข้อมูล (หลังบ้าน)
========================================================================== */
.admin-head {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
gap: var(--space-4);
padding-bottom: var(--space-5);
border-bottom: 1px solid var(--border);
}
.admin-head__title {
font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.75rem);
}
.admin-head__sub {
margin-top: 6px;
color: var(--muted-foreground);
font-size: 14.5px;
max-width: 52ch;
}
.admin-head__actions {
display: flex;
flex-wrap: wrap;
gap: var(--space-2);
}
.panel {
margin-top: var(--space-6);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
background: var(--surface);
overflow: hidden;
}
.panel__head {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
padding: var(--space-4) var(--space-5);
background: var(--surface-2);
border-bottom: 1px solid var(--border);
}
.panel__title {
font-size: 1rem;
font-weight: 700;
color: var(--brand-900);
}
.panel__body {
padding: var(--space-5);
}
/* ------------------------------------------------------------- fields */
.field {
display: flex;
flex-direction: column;
gap: 6px;
}
.field + .field {
margin-top: var(--space-4);
}
.field__label {
font-size: 14px;
font-weight: 500;
color: var(--brand-800);
}
.field__hint {
font-size: 12.5px;
color: var(--muted-foreground);
}
.field input[type="text"],
.field input[type="url"],
.field input[type="email"],
.field textarea,
.field select {
width: 100%;
min-height: 44px;
padding: 10px 14px;
border: 1px solid var(--border-strong);
border-radius: var(--radius-md);
background: #fff;
font-size: 15px;
transition:
border-color 150ms var(--ease),
box-shadow 150ms var(--ease);
}
.field textarea {
min-height: 84px;
resize: vertical;
line-height: 1.55;
}
.field input:hover,
.field textarea:hover {
border-color: var(--brand-300);
}
.field input:focus,
.field textarea:focus {
outline: none;
border-color: var(--brand-500);
box-shadow: 0 0 0 4px rgba(196, 112, 60, 0.15);
}
.field--error input,
.field--error textarea {
border-color: #b3391f;
box-shadow: 0 0 0 4px rgba(179, 57, 31, 0.12);
}
.field__error {
font-size: 12.5px;
color: #8f2c19;
font-weight: 500;
}
.field__error:empty {
display: none;
}
/* ------------------------------------------------------------- rows */
.admin-list {
display: flex;
flex-direction: column;
gap: var(--space-4);
}
.admin-item {
border: 1px solid var(--border);
border-radius: var(--radius-md);
background: var(--surface);
padding: var(--space-4);
}
.admin-item__head {
display: flex;
align-items: center;
gap: var(--space-3);
padding-bottom: var(--space-3);
border-bottom: 1px solid var(--brand-50);
margin-bottom: var(--space-4);
}
.admin-item__index {
flex: none;
display: grid;
place-items: center;
width: 30px;
height: 30px;
border-radius: 9px;
background: var(--brand-100);
color: var(--brand-800);
font-size: 13px;
font-weight: 700;
}
.admin-item__label {
flex: 1 1 auto;
min-width: 0;
font-weight: 500;
color: var(--brand-900);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.admin-item__tools {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.admin-item__tools .btn {
min-height: 36px;
padding: 6px 10px;
font-size: 13px;
border-radius: var(--radius-sm);
}
.admin-item__tools .btn svg {
width: 16px;
height: 16px;
}
.admin-grid-2 {
display: grid;
gap: var(--space-4);
margin-top: var(--space-4);
}
.admin-item .admin-grid-2:first-of-type {
margin-top: 0;
}
.admin-item .field + .field {
margin-top: var(--space-4);
}
/* ------------------------------------------------------------- publish */
.publish-status {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px 14px;
padding: 12px 16px;
border-radius: var(--radius-md);
background: var(--brand-50);
border: 1px solid var(--brand-200);
color: var(--brand-800);
font-size: 14px;
}
.publish-status__dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--brand-500);
}
.publish-status[data-state="ok"] .publish-status__dot {
background: #2f7a44;
}
.publish-status[data-state="warn"] {
background: #fdf3e7;
border-color: #f0cfa8;
color: #7c4a13;
}
.publish-status[data-state="error"] {
background: #fdf1ee;
border-color: #e7c4bb;
color: #8f2c19;
}
.admin-hint {
margin-top: var(--space-3);
font-size: 13px;
color: var(--muted-foreground);
}
.admin-hint code {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12.5px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 6px;
padding: 1px 6px;
}
.dirty-bar {
position: sticky;
bottom: 12px;
margin-top: var(--space-5);
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
padding: 12px 16px;
border-radius: var(--radius-lg);
background: rgba(61, 36, 26, 0.96);
color: #fff;
box-shadow: var(--shadow-lg);
}
.dirty-bar[hidden] {
display: none;
}
.dirty-bar__text {
font-size: 14px;
}
.dirty-bar__actions {
display: flex;
gap: 8px;
}
.dirty-bar .btn--ghost {
background: transparent;
border-color: rgba(255, 255, 255, 0.35);
color: #fff;
}
.dirty-bar .btn--ghost:hover {
background: rgba(255, 255, 255, 0.12);
}
.dirty-bar .btn--primary {
background: #fff;
color: var(--brand-800);
}
.dirty-bar .btn--primary:hover {
background: var(--brand-100);
}
/* ------------------------------------------------------------- dialog */
.dialog {
width: min(560px, calc(100vw - 32px));
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 0;
color: var(--foreground);
box-shadow: var(--shadow-lg);
}
.dialog::backdrop {
background: rgba(36, 26, 21, 0.45);
backdrop-filter: blur(2px);
}
.dialog__head {
padding: var(--space-5);
border-bottom: 1px solid var(--border);
}
.dialog__title {
font-size: 1.05rem;
}
.dialog__body {
padding: var(--space-5);
}
.dialog__foot {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: var(--space-2);
padding: var(--space-4) var(--space-5);
border-top: 1px solid var(--border);
background: var(--surface-2);
}
@media (min-width: 760px) {
.admin-grid-2 {
grid-template-columns: 1fr 1fr;
gap: var(--space-4) var(--space-5);
}
}
+470
View File
@@ -0,0 +1,470 @@
/* ==========================================================================
home.css — หน้าแรก: ฮีโร่ + ช่องค้นหา + การ์ดโปรเจค
========================================================================== */
.hero {
position: relative;
overflow: hidden;
border: 1px solid var(--border);
border-radius: var(--radius-xl);
background:
radial-gradient(120% 140% at 12% 0%, #fff 0%, var(--brand-50) 46%, var(--brand-100) 100%);
padding: var(--space-8) var(--space-5);
}
.hero__inner {
position: relative;
z-index: 1;
max-width: 46rem;
}
.hero__eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 6px 14px;
border-radius: var(--radius-pill);
background: #fff;
border: 1px solid var(--brand-200);
color: var(--brand-700);
font-size: 13px;
font-weight: 500;
}
.hero__eyebrow svg {
width: 15px;
height: 15px;
}
.hero__title {
margin-top: var(--space-4);
font-size: clamp(1.6rem, 1.15rem + 2.05vw, 2.5rem);
letter-spacing: -0.015em;
line-height: 1.35;
max-width: 24ch;
}
.hero__title em {
font-style: normal;
color: var(--brand-600);
}
.hero__lead {
margin-top: var(--space-3);
max-width: 44ch;
color: #4b3a30;
font-size: clamp(0.98rem, 0.94rem + 0.3vw, 1.08rem);
}
/* ------------------------------------------------------------- searchbar */
.searchbar {
margin-top: var(--space-6);
display: flex;
align-items: center;
gap: 8px;
padding: 8px;
border: 1px solid var(--border-strong);
border-radius: var(--radius-pill);
background: #fff;
box-shadow: var(--shadow-md);
max-width: 560px;
}
.searchbar:focus-within {
border-color: var(--brand-500);
box-shadow: 0 0 0 4px rgba(196, 112, 60, 0.16);
}
.searchbar__icon {
flex: none;
margin-left: 8px;
color: var(--brand-500);
}
.searchbar__icon svg {
width: 20px;
height: 20px;
}
.searchbar input {
flex: 1 1 auto;
min-width: 0;
border: 0;
background: transparent;
padding: 8px 0;
font-size: 15px;
}
.searchbar input:focus {
outline: none;
}
.searchbar input::placeholder {
color: #8d7d73;
}
.searchbar__clear {
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: 0;
border-radius: 50%;
background: var(--brand-50);
color: var(--brand-700);
cursor: pointer;
}
.searchbar__clear[hidden] {
display: none;
}
.searchbar__clear svg {
width: 16px;
height: 16px;
}
.hero__meta {
margin-top: var(--space-5);
display: flex;
flex-wrap: wrap;
gap: var(--space-3) var(--space-6);
font-size: 14px;
color: var(--muted-foreground);
}
.hero__meta span {
display: inline-flex;
align-items: center;
gap: 6px;
}
.hero__meta svg {
width: 16px;
height: 16px;
color: var(--brand-500);
}
/* --------------------------------------------------- ฮีโร่: การ์ดลอย (จอใหญ่) */
.hero__deco {
display: none;
}
@media (min-width: 1080px) {
.hero__deco {
display: flex;
flex-direction: column;
gap: 12px;
position: absolute;
top: 50%;
inset-inline-end: var(--space-10);
width: 302px;
transform: translateY(-50%);
pointer-events: none;
}
.hero__deco-card {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 16px;
border: 1px solid var(--border-strong);
border-radius: var(--radius-md);
background: #fff;
box-shadow: var(--shadow-md);
font-size: 14px;
font-weight: 500;
color: var(--brand-900);
transform: translateX(calc(var(--i) * 14px)) rotate(calc((var(--i) - 1) * -0.8deg));
opacity: 0.97;
}
.hero__deco-card:nth-child(2) {
border-color: var(--brand-300);
}
.hero__deco-icon {
flex: none;
display: grid;
place-items: center;
width: 30px;
height: 30px;
border-radius: 9px;
background: var(--brand-50);
border: 1px solid var(--brand-200);
color: var(--brand-700);
}
.hero__deco-icon svg {
width: 17px;
height: 17px;
}
.hero__deco-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
/* ---------------------------------------------------------------- chips */
.chips {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: var(--space-8);
}
.chip {
display: inline-flex;
align-items: center;
gap: 7px;
min-height: 40px;
padding: 8px 16px;
border: 1px solid var(--border);
border-radius: var(--radius-pill);
background: #fff;
color: var(--brand-800);
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition:
background 160ms var(--ease),
border-color 160ms var(--ease),
color 160ms var(--ease);
}
.chip:hover {
background: var(--brand-50);
border-color: var(--brand-300);
}
.chip[aria-pressed="true"] {
background: var(--brand-700);
border-color: var(--brand-700);
color: var(--on-brand);
}
.chip svg {
width: 16px;
height: 16px;
}
/* ------------------------------------------------------------- section */
.section-head {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: var(--space-4);
margin-top: var(--space-12);
margin-bottom: var(--space-5);
}
.section-head__title {
font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
}
.section-head__sub {
margin-top: 4px;
font-size: 14px;
color: var(--muted-foreground);
}
.section-head__count {
flex: none;
font-size: 13px;
color: var(--brand-700);
background: var(--brand-100);
border-radius: var(--radius-pill);
padding: 5px 12px;
font-weight: 500;
white-space: nowrap;
}
/* ---------------------------------------------------------------- grid */
.project-grid {
display: grid;
gap: var(--space-4);
grid-template-columns: 1fr;
}
.project-card {
position: relative;
display: flex;
flex-direction: column;
gap: var(--space-3);
padding: var(--space-5);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
background: var(--surface);
transition:
border-color 180ms var(--ease),
box-shadow 180ms var(--ease),
transform 180ms var(--ease);
}
.project-card:hover,
.project-card:focus-within {
border-color: var(--brand-300);
box-shadow: var(--shadow-md);
transform: translateY(-2px);
}
.project-card__top {
display: flex;
align-items: flex-start;
gap: var(--space-3);
}
.project-card__icon {
flex: none;
display: grid;
place-items: center;
width: 46px;
height: 46px;
border-radius: 13px;
background: var(--brand-50);
border: 1px solid var(--brand-200);
color: var(--brand-700);
}
.project-card__icon svg {
width: 24px;
height: 24px;
}
.project-card__heading {
min-width: 0;
flex: 1 1 auto;
}
.project-card__name {
font-size: 1.02rem;
font-weight: 700;
color: var(--brand-900);
line-height: 1.35;
}
.project-card__name a {
color: inherit;
text-decoration: none;
}
.project-card__name a::after {
/* ขยายพื้นที่คลิกให้ครอบการ์ดทั้งใบ */
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
}
.project-card__name a:hover {
text-decoration: none;
}
.project-card__desc {
margin-top: 6px;
color: var(--muted-foreground);
font-size: 14.5px;
line-height: 1.55;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.project-card__foot {
margin-top: auto;
padding-top: var(--space-3);
border-top: 1px solid var(--brand-50);
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
}
.project-card__host {
font-size: 13px;
color: var(--muted-foreground);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.project-card__go {
flex: none;
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 14px;
font-weight: 500;
color: var(--brand-700);
pointer-events: none;
}
.project-card__go svg {
width: 16px;
height: 16px;
transition: transform 160ms var(--ease);
}
.project-card:hover .project-card__go svg {
transform: translateX(3px);
}
.badge {
position: absolute;
top: var(--space-4);
inset-inline-end: var(--space-4);
padding: 3px 10px;
border-radius: var(--radius-pill);
background: var(--brand-100);
color: var(--brand-800);
font-size: 12px;
font-weight: 500;
}
.project-card[draggable="true"] {
cursor: grab;
}
/* ------------------------------------------------------------ empty state */
.empty {
margin-top: var(--space-4);
padding: var(--space-10) var(--space-5);
border: 1px dashed var(--border-strong);
border-radius: var(--radius-lg);
background: var(--surface-2);
text-align: center;
}
.empty__icon {
display: inline-grid;
place-items: center;
width: 48px;
height: 48px;
border-radius: 14px;
background: #fff;
border: 1px solid var(--brand-200);
color: var(--brand-600);
margin-bottom: var(--space-3);
}
.empty__icon svg {
width: 24px;
height: 24px;
}
.empty__title {
font-weight: 700;
color: var(--brand-900);
}
.empty__text {
margin-top: 6px;
color: var(--muted-foreground);
font-size: 14.5px;
}
/* -------------------------------------------------------- skeleton/loading */
.loading {
display: grid;
gap: var(--space-4);
grid-template-columns: 1fr;
margin-top: var(--space-4);
}
.skeleton {
height: 168px;
border-radius: var(--radius-lg);
border: 1px solid var(--border);
background: linear-gradient(100deg, var(--surface-2) 30%, #fff 50%, var(--surface-2) 70%);
background-size: 220% 100%;
animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer {
from {
background-position: 130% 0;
}
to {
background-position: -30% 0;
}
}
@media (min-width: 700px) {
.project-grid,
.loading {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hero {
padding: var(--space-12) var(--space-10);
}
}
@media (min-width: 1000px) {
.project-grid,
.loading {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (prefers-reduced-motion: reduce) {
.skeleton {
animation: none;
}
.project-card:hover,
.project-card:focus-within {
transform: none;
}
}
+503
View File
@@ -0,0 +1,503 @@
/* ==========================================================================
theme.css — โทเคนสี/ตัวอักษร/ส่วนประกอบที่ใช้ร่วมทุกหน้า
โทน: น้ำตาลโมก้า-คาราเมล + ขาว (ธีมอ้างอิงโครงจาก fastwork.com)
หมายเหตุ: สีน้ำตาลทุกตัวคุมให้ "สด-สว่าง" ไม่เป็นน้ำตาลซีเปีย/แก่
========================================================================== */
@font-face {
font-family: "K2D";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("../../fonts/k2d-400-thai.woff2") format("woff2");
unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
font-family: "K2D";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("../../fonts/k2d-400-latin-ext.woff2") format("woff2");
unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
font-family: "K2D";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("../../fonts/k2d-400-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+2010-2027;
}
@font-face {
font-family: "K2D";
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("../../fonts/k2d-500-thai.woff2") format("woff2");
unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
font-family: "K2D";
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("../../fonts/k2d-500-latin-ext.woff2") format("woff2");
unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
font-family: "K2D";
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("../../fonts/k2d-500-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+2010-2027;
}
@font-face {
font-family: "K2D";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("../../fonts/k2d-700-thai.woff2") format("woff2");
unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
font-family: "K2D";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("../../fonts/k2d-700-latin-ext.woff2") format("woff2");
unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
font-family: "K2D";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("../../fonts/k2d-700-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+2010-2027;
}
:root {
/* --- คู่สีหลัก (ตรวจคอนทราสต์บน #FFFFFF แล้ว) --- */
--brand-50: #fdf7f2;
--brand-100: #faeadf;
--brand-200: #f3d5c1;
--brand-300: #e8b695;
--brand-400: #d99368; /* 2.52:1 — ใช้เป็นกราฟิกเท่านั้น ห้ามใช้เป็นตัวอักษร */
--brand-500: #c4703c; /* 3.66:1 — เส้น/ไอคอน/พื้นการ์ด */
--brand-600: #a85a2c; /* 5.04:1 — ตัวอักษรบนขาวผ่าน AA */
--brand-700: #8a4722; /* 6.99:1 — ปุ่มหลัก/ลิงก์ */
--brand-800: #6b3620; /* 9.66:1 */
--brand-900: #3d241a; /* 14.33:1 — หัวข้อ */
--background: #ffffff;
--surface: #ffffff;
--surface-2: #fbf6f1;
--foreground: #241a15;
--muted-foreground: #6f6159; /* 5.95:1 */
--border: #eadfd6;
--border-strong: #dccaba;
--ring: #a85a2c;
--on-brand: #ffffff;
/* --- ระยะ/มุม --- */
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--space-8: 32px;
--space-10: 40px;
--space-12: 48px;
--space-16: 64px;
--space-20: 80px;
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--radius-xl: 22px;
--radius-pill: 999px;
--wrap: 1120px;
--header-h: 64px;
--shadow-sm: 0 1px 2px rgba(61, 36, 26, 0.06);
--shadow-md: 0 6px 18px -6px rgba(61, 36, 26, 0.18);
--shadow-lg: 0 18px 40px -18px rgba(61, 36, 26, 0.28);
--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
-webkit-text-size-adjust: 100%;
scroll-behavior: smooth;
}
body {
margin: 0;
min-height: 100dvh;
display: flex;
flex-direction: column;
background: var(--background);
color: var(--foreground);
font-family: "K2D", "Noto Sans Thai", "Sarabun", system-ui, -apple-system, sans-serif;
font-size: 16px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
p,
figure {
margin: 0;
}
h1,
h2,
h3,
h4 {
color: var(--brand-900);
font-weight: 700;
line-height: 1.25;
letter-spacing: -0.01em;
}
a {
color: var(--brand-700);
text-decoration: none;
}
a:hover {
text-decoration: underline;
text-underline-offset: 3px;
}
img,
svg {
display: block;
max-width: 100%;
}
button,
input,
textarea,
select {
font: inherit;
color: inherit;
}
:focus-visible {
outline: 3px solid var(--brand-600);
outline-offset: 2px;
border-radius: var(--radius-sm);
}
.wrap {
width: 100%;
max-width: var(--wrap);
margin-inline: auto;
padding-inline: var(--space-5);
}
.site-main {
flex: 1 0 auto;
padding-block: var(--space-10) var(--space-16);
}
.site-main:focus {
outline: none;
}
.skip-link {
position: absolute;
left: 50%;
top: -100px;
transform: translateX(-50%);
z-index: 30;
padding: 10px 18px;
border-radius: var(--radius-pill);
background: var(--brand-700);
color: var(--on-brand);
font-weight: 500;
transition: top 160ms var(--ease);
}
.skip-link:focus {
top: 10px;
text-decoration: none;
}
/* ---------------------------------------------------------------- header */
.site-header {
position: sticky;
top: 0;
z-index: 20;
background: rgba(255, 255, 255, 0.92);
backdrop-filter: blur(10px);
border-bottom: 1px solid var(--border);
}
.site-header__inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-4);
min-height: var(--header-h);
}
.brand {
display: inline-flex;
align-items: center;
gap: 10px;
color: var(--brand-700);
text-decoration: none;
}
.brand:hover {
text-decoration: none;
}
.brand__mark svg {
color: var(--brand-700);
}
.brand__text {
display: flex;
flex-direction: column;
line-height: 1.15;
}
.brand__text strong {
font-size: 17px;
color: var(--brand-900);
letter-spacing: -0.01em;
}
.brand__text small {
font-size: 12px;
color: var(--muted-foreground);
letter-spacing: 0.02em;
}
.site-nav {
display: flex;
align-items: center;
gap: var(--space-2);
}
.site-nav__link {
display: none;
padding: 8px 12px;
border-radius: var(--radius-sm);
color: var(--muted-foreground);
font-weight: 500;
font-size: 15px;
}
.site-nav__link:hover {
color: var(--brand-800);
background: var(--brand-50);
text-decoration: none;
}
.site-nav__link[aria-current="page"] {
color: var(--brand-800);
background: var(--brand-100);
}
/* ---------------------------------------------------------------- buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-height: 44px;
padding: 10px 20px;
border: 1px solid transparent;
border-radius: var(--radius-pill);
background: transparent;
color: var(--foreground);
font-weight: 500;
font-size: 15px;
line-height: 1.2;
cursor: pointer;
transition:
background 160ms var(--ease),
border-color 160ms var(--ease),
color 160ms var(--ease),
transform 160ms var(--ease),
box-shadow 160ms var(--ease);
}
.btn:hover {
text-decoration: none;
}
.btn:active {
transform: translateY(1px);
}
.btn[disabled] {
opacity: 0.55;
cursor: not-allowed;
transform: none;
}
.btn--primary {
background: var(--brand-700);
color: var(--on-brand);
box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
background: var(--brand-800);
box-shadow: var(--shadow-md);
}
.btn--ghost {
background: #fff;
border-color: var(--border-strong);
color: var(--brand-800);
}
.btn--ghost:hover {
background: var(--brand-50);
border-color: var(--brand-300);
}
.btn--quiet {
background: var(--brand-50);
color: var(--brand-800);
}
.btn--quiet:hover {
background: var(--brand-100);
}
.btn--danger {
background: #fff;
border-color: #e7c4bb;
color: #8f2c19;
}
.btn--danger:hover {
background: #fdf1ee;
border-color: #d0a094;
}
.btn--sm {
min-height: 40px;
padding: 8px 14px;
font-size: 14px;
}
.btn--icon {
width: 40px;
min-height: 40px;
padding: 0;
border-radius: var(--radius-md);
}
.btn svg {
width: 18px;
height: 18px;
flex: none;
}
/* ---------------------------------------------------------------- footer */
.site-footer {
border-top: 1px solid var(--border);
background: var(--surface-2);
padding-block: var(--space-10);
font-size: 14px;
}
.site-footer__inner {
display: grid;
gap: var(--space-6);
}
.site-footer__brand {
font-weight: 700;
color: var(--brand-900);
font-size: 15px;
}
.site-footer__title {
font-weight: 500;
color: var(--brand-800);
margin-bottom: 2px;
}
.site-footer__note {
color: var(--muted-foreground);
max-width: 34ch;
}
/* ---------------------------------------------------------------- toast */
.toast-stack {
position: fixed;
inset-inline: 0;
bottom: 20px;
z-index: 40;
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding-inline: var(--space-4);
pointer-events: none;
}
.toast {
max-width: 92vw;
padding: 12px 18px;
border-radius: var(--radius-pill);
background: var(--brand-900);
color: #fff;
font-size: 14px;
box-shadow: var(--shadow-lg);
animation: toast-in 200ms var(--ease);
}
.toast--error {
background: #7d2617;
}
@keyframes toast-in {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: none;
}
}
.noscript {
padding-block: var(--space-10);
color: var(--brand-800);
}
/* ---------------------------------------------------------------- helpers */
.visually-hidden {
position: absolute !important;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
@media (min-width: 640px) {
.site-footer__inner {
grid-template-columns: 1.4fr 1fr 1fr;
gap: var(--space-8);
}
}
@media (min-width: 900px) {
:root {
--header-h: 72px;
}
.site-nav__link {
display: inline-flex;
}
.site-main {
padding-block: var(--space-12) var(--space-20);
}
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
*,
*::before,
*::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.001ms !important;
}
}