/* 碩士班課程 master.html ／ 碩士班招生 admission-master.html（搭配 labs.css） */
.ms-page [hidden] { display: none !important; }
.ms-sec { margin-top: 88px; scroll-margin-top: 90px; }
.ms-page .labs-marquee { margin-bottom: 0; }
.ms-foot { margin: 16px 0 0; font-size: 14px; color: var(--ink-3); }
.ms-foot a { color: var(--brand); font-weight: 700; border-bottom: 1.5px solid currentColor; }

/* 特色 */
.ms-feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ms-feat > div { background: var(--paper); border-radius: 20px; padding: 26px 24px; box-shadow: 0 1px 0 var(--line), 0 20px 40px -34px rgba(18,19,22,.45); }
.ms-feat i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--ink); color: #ffd24d; font-size: 21px; }
.ms-feat h4 { margin: 16px 0 8px; font-size: 20px; font-weight: 900; }
.ms-feat p { margin: 0; font-size: 15px; line-height: 1.8; color: var(--ink-2); }

/* 研究方向 */
.ms-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ms-fields > div { position: relative; overflow: hidden; border-radius: 20px; padding: 24px 20px; background: var(--c); color: #fff; min-height: 190px; }
.ms-fields > div::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.16); }
.ms-fields i { font-size: 24px; opacity: .9; }
.ms-fields h4 { margin: 14px 0 8px; font-size: 19px; font-weight: 900; line-height: 1.35; }
.ms-fields p { position: relative; z-index: 1; margin: 0; font-size: 13.5px; line-height: 1.7; opacity: .92; }

/* 課程 */
.ms-credit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 20px; }
.ms-credit > div { display: flex; align-items: baseline; gap: 8px; background: var(--paper); border-radius: 16px; padding: 12px 20px; box-shadow: 0 1px 0 var(--line); }
.ms-credit > div b { font-size: 34px; font-weight: 900; line-height: 1; font-family: var(--serif-title, serif); }
.ms-credit > div span { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.ms-credit > div.t { background: var(--ink); color: #fff; }
.ms-credit > div.t span { color: rgba(255,255,255,.75); }
.ms-credit i { font-style: normal; font-size: 24px; font-weight: 900; color: var(--ink-3); }
.ms-credit p { flex-basis: 100%; margin: 4px 0 0; font-size: 14px; color: var(--ink-3); }
.ms-sems { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ms-sem { background: var(--paper); border-radius: 20px; padding: 20px 18px; box-shadow: 0 1px 0 var(--line); border-top: 5px solid #ffd24d; }
.ms-sem h5 { margin: 0 0 12px; font-size: 18px; font-weight: 900; }
.ms-sem ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ms-sem li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: var(--bg); border-left: 4px solid #ccd0d6; }
.ms-sem li.req { background: #fdecec; border-left-color: #D7141E; }
.ms-sem li span { font-size: 14.5px; font-weight: 700; line-height: 1.45; }
.ms-sem li b { flex: none; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.ms-notes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.ms-notes li::before { content: "・"; color: var(--ink-3); }
.ms-notes b { display: inline-block; margin-right: 4px; font-size: 12px; color: #fff; background: #D7141E; border-radius: 4px; padding: 0 5px; }

/* 流程 */
.ms-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: f; }
.ms-flow li { position: relative; background: var(--paper); border-radius: 18px; padding: 20px 18px; box-shadow: 0 1px 0 var(--line); }
.ms-flow li:not(:last-child)::after { content: "→"; position: absolute; right: -12px; top: 22px; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: #ffd24d; font-size: 13px; font-weight: 900; display: grid; place-items: center; }
.ms-flow span { font: 700 11.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .1em; color: #D7141E; }
.ms-flow h4 { margin: 10px 0 8px; font-size: 17px; font-weight: 900; }
.ms-flow p { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.ms-flow p b { color: var(--ink); background: linear-gradient(transparent 60%, #ffd24d 60%); }

/* 師資 */
.ms-fac { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.ms-fac a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px; border-radius: 18px; background: var(--paper); color: var(--ink) !important; box-shadow: 0 1px 0 var(--line); transition: transform .25s; }
.ms-fac a:hover { transform: translateY(-4px); }
.ms-fac img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; background: #ddd; }
.ms-fac b { font-size: 16px; font-weight: 900; }
.ms-fac span { font-size: 12px; color: var(--ink-3); line-height: 1.4; }

/* 下載 */
.ms-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ms-dl a { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 48px 18px 18px; border-radius: 16px; background: var(--paper); color: var(--ink) !important; box-shadow: 0 1px 0 var(--line); transition: background .2s; }
.ms-dl a:hover { background: #fff4cc; }
.ms-dl .ty { align-self: flex-start; font: 700 11px/1 ui-monospace, Menlo, monospace; padding: 4px 7px; border-radius: 6px; background: var(--ink); color: #fff; }
.ms-dl b { font-size: 15.5px; font-weight: 900; line-height: 1.4; }
.ms-dl small { font-size: 12.5px; color: var(--ink-3); }
.ms-dl i { position: absolute; right: 18px; top: 50%; margin-top: -8px; color: var(--ink-3); }

/* 集錦 */
.ms-gal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ms-gal a { display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; }
.ms-gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.ms-gal a:hover img { transform: scale(1.05); }

/* CTA */
.ms-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 88px; padding: 32px 36px; border-radius: 24px; background: var(--ink); color: #fff; }
.ms-cta .labs-mono { color: #ffd24d; }
.ms-cta h3 { margin: 8px 0 6px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 900; color: #fff; font-family: var(--serif-title, serif); }
.ms-cta p { margin: 0; color: rgba(255,255,255,.75); font-size: 15px; line-height: 1.7; }
.ms-cta > a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 999px; background: #D7141E; color: #fff !important; font-weight: 700; transition: background .2s, color .2s; }
.ms-cta > a:hover { background: #ffd24d; color: var(--ink) !important; }

/* ================= 碩士班招生 ================= */
.ma-hl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ma-hl > div { background: var(--paper); border-radius: 20px; padding: 22px 20px; box-shadow: 0 1px 0 var(--line); }
.ma-hl b { display: block; font-size: 38px; font-weight: 900; line-height: 1; font-family: var(--serif-title, serif); color: #D7141E; }
.ma-hl h4 { margin: 12px 0 6px; font-size: 17px; font-weight: 900; }
.ma-hl p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.ma-routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ma-route { position: relative; overflow: hidden; border-radius: 24px; padding: 28px; background: var(--ink); color: #fff; }
.ma-route.b { background: #1F74D6; }
.ma-route .labs-mono { color: #ffd24d; }
.ma-route h4 { margin: 10px 0 4px; font-size: 26px; font-weight: 900; color: #fff; font-family: var(--serif-title, serif); }
.ma-route .sub { margin: 0 0 16px; font-size: 14px; color: rgba(255,255,255,.75); }
.ma-quota { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.ma-quota div { background: rgba(255,255,255,.1); border-radius: 16px; padding: 12px 16px; }
.ma-quota b { font-size: 40px; font-weight: 900; line-height: 1; font-family: var(--serif-title, serif); }
.ma-quota b small { font-size: 14px; margin-left: 3px; font-family: "Noto Sans TC", sans-serif; }
.ma-quota span { display: block; margin-top: 4px; font-size: 13px; color: rgba(255,255,255,.75); }
.ma-route dl { margin: 0; display: grid; gap: 0; }
.ma-route dl div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px dashed rgba(255,255,255,.2); font-size: 14.5px; line-height: 1.6; }
.ma-route dt { color: rgba(255,255,255,.6); font-weight: 700; font-size: 13px; }
.ma-route dd { margin: 0; }
.ma-route .go { display: inline-flex; margin-top: 16px; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; background: #ffd24d; color: var(--ink) !important; font-weight: 700; }
.ma-route .go:hover { background: #fff; }
.ma-note { margin: 16px 0 0; padding: 14px 18px; border-radius: 14px; background: #fff4cc; font-size: 14.5px; line-height: 1.7; color: var(--ink); }
.ma-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ma-steps li { background: var(--paper); border-radius: 18px; padding: 20px 18px; box-shadow: 0 1px 0 var(--line); }
.ma-steps li > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #ffd24d; font-weight: 900; }
.ma-steps h4 { margin: 12px 0 6px; font-size: 16.5px; font-weight: 900; }
.ma-steps p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.ma-schol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ma-schol > div { display: flex; gap: 18px; align-items: center; background: var(--paper); border-radius: 20px; padding: 22px; box-shadow: 0 1px 0 var(--line); border-left: 6px solid #D7141E; }
.ma-schol b { flex: none; font-size: 34px; font-weight: 900; font-family: var(--serif-title, serif); color: #D7141E; }
.ma-schol b small { font-size: 14px; font-family: "Noto Sans TC", sans-serif; }
.ma-schol h4 { margin: 0 0 4px; font-size: 17px; font-weight: 900; }
.ma-schol p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.ma-alumni { display: flex; flex-wrap: wrap; gap: 10px; }
.ma-alumni span { display: inline-flex; flex-direction: column; padding: 12px 16px; border-radius: 16px; background: var(--paper); box-shadow: 0 1px 0 var(--line); font-size: 15px; font-weight: 900; }
.ma-alumni small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.ma-cross { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ma-cross a, .ma-cross div { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 16px; background: var(--paper); color: var(--ink) !important; box-shadow: 0 1px 0 var(--line); }
.ma-cross b { font-size: 16px; font-weight: 900; }
.ma-cross small { font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.ma-cross a:hover { background: #fff4cc; }
.ma-contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ma-contact a { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 18px; background: var(--paper); color: var(--ink) !important; box-shadow: 0 1px 0 var(--line); }
.ma-contact small { font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.ma-contact b { font-size: 18px; font-weight: 900; }
.ma-contact span { font-size: 13.5px; color: var(--ink-2); }
.ma-contact a:hover { background: #fff4cc; }
.ma-news { display: grid; gap: 10px; }
.ma-news a { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 16px 20px; border-radius: 16px; background: var(--paper); color: var(--ink) !important; box-shadow: 0 1px 0 var(--line); font-weight: 700; font-size: 15px; line-height: 1.5; }
.ma-news a small { flex: none; font-size: 12.5px; color: var(--ink-3); }
.ma-news a:hover { background: #fff4cc; }

@media (max-width: 1100px) {
	.ms-fields, .ms-sems, .ma-hl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ms-flow, .ma-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ms-flow li::after { display: none; }
	.ms-fac { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.ms-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.ms-sec { margin-top: 64px; }
	.ms-feat, .ms-fields, .ms-sems, .ms-flow, .ms-dl, .ma-routes, .ma-steps, .ma-schol, .ma-cross, .ma-contact { grid-template-columns: 1fr; }
	.ma-hl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ma-hl b { font-size: 30px; }
	.ms-fields > div { min-height: 0; }
	.ms-fac { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.ms-fac img { width: 64px; height: 64px; }
	.ms-fac b { font-size: 14.5px; }
	.ms-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ms-cta { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
	.ma-route { padding: 22px 20px; }
	.ma-route dl div { grid-template-columns: 76px minmax(0, 1fr); }
	.ma-news a { flex-direction: column; align-items: flex-start; gap: 4px; }
}
