:root {
  --ink: #24302f;
  --muted: #687573;
  --paper: #f4f6f3;
  --surface: #fff;
  --line: #dce3df;
  --green: #2f674c;
  --green-soft: #deebe2;
  --blue: #315d7d;
  --blue-soft: #dfeaf2;
  --amber: #8b5a12;
  --amber-soft: #f6e8ca;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; }
a { color: inherit; }
.portal-shell { width: min(1080px, 100%); min-height: 100svh; margin: auto; padding: 34px 24px 24px; }
.portal-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.portal-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark { width: 108px; height: 70px; display: block; flex: 0 0 auto; object-fit: cover; object-position: center 67%; border-radius: 7px; background: #fff; }
.portal-head p { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.portal-head h1 { margin: 0; font-size: 32px; line-height: 1.2; letter-spacing: 0; }
.account-status { min-height: 34px; display: inline-flex; align-items: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; }

.app-list { display: grid; gap: 12px; padding: 24px 0; }
.app-entry { min-height: 176px; display: grid; grid-template-columns: 220px minmax(0, 1fr) 44px; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.app-entry:hover { border-color: #b8c9c1; box-shadow: 0 10px 24px rgba(31, 46, 40, .09); transform: translateY(-2px); }
.app-entry:focus-visible { outline: 3px solid rgba(49, 93, 125, .24); outline-offset: 3px; }
.entry-image { position: relative; align-self: stretch; min-height: 174px; overflow: hidden; background: #f8f7f2; }
.entry-image::after { content: "鑫德"; position: absolute; inset: 0; display: grid; place-items: center; color: #8b9692; font-size: 18px; font-weight: 800; }
.entry-image img { position: relative; z-index: 1; width: 100%; height: 100%; display: block; object-fit: cover; }
.entry-image img.image-error { display: none; }
.access-label { position: absolute; z-index: 2; left: 10px; top: 10px; min-height: 28px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 5px; font-size: 12px; font-weight: 800; }
.access-label.locked { background: var(--amber-soft); color: var(--amber); }
.access-label.open { background: var(--green-soft); color: var(--green); }
.entry-copy { min-width: 0; padding: 24px 28px; }
.entry-copy p { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.entry-copy h2 { margin: 0 0 9px; font-size: 24px; letter-spacing: 0; }
.entry-copy span { color: var(--muted); line-height: 1.6; }
.entry-arrow { color: #77837f; font-size: 36px; line-height: 1; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer a { color: var(--blue); font-weight: 700; text-decoration: none; }

@media (max-width: 700px) {
  .portal-shell { padding: 22px 14px 18px; }
  .portal-brand { gap: 10px; }
  .brand-mark { width: 86px; height: 56px; }
  .portal-head h1 { font-size: 27px; }
  .app-entry { min-height: 146px; grid-template-columns: 112px minmax(0, 1fr) 28px; }
  .entry-image { min-height: 144px; }
  .entry-image img { object-fit: contain; padding: 5px; background: #f8f7f2; }
  .entry-copy { padding: 18px 14px; }
  .entry-copy h2 { font-size: 20px; }
  .entry-copy span { font-size: 13px; }
  .entry-arrow { font-size: 30px; }
}

@media (max-width: 430px) {
  .portal-head { align-items: flex-start; }
  .account-status { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-entry { grid-template-columns: 92px minmax(0, 1fr) 24px; }
  .entry-copy { padding: 14px 10px; }
  .entry-copy span { display: none; }
  .access-label { left: 6px; top: 6px; padding: 0 6px; }
  footer { align-items: flex-start; }
}
