*, *:before, *:after {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	-o-box-sizing: border-box;
	-ms-box-sizing: border-box;
	box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
	font-weight: normal;
}

body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
	margin: 0;
	padding: 0;
}

html {
	-ms-text-size-adjust: 100%;
	-webkit-text-size-adjust: 100%;
}

body {
	background-color: var(--bg-body);
	color: var(--text-primary);
	transition: background-color 0.3s, color 0.3s;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

textarea {
	padding: 4px;
	resize: none;
	color: var(--text-primary);
}

td {
	width: 50%;
}

input[type="text"] {
	height: 32px;
	background-color: var(--bg-input);
	color: var(--text-primary);
	border: 1px solid var(--border-input);
}

#main {
	padding: 6px 4px 0 4px;
}

.login {
	float: right;
}

.login a {
	display: inline-block;
	cursor: pointer;
	font-family: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
	border: solid 1px var(--border-login);
	border-radius: 4px;
	text-decoration: none;
	padding: 4px;
	color: var(--text-login);
	background-color: var(--bg-login);
	font-size: 16px;
	min-width: 80px;
	text-align: center;
	transition: background-color 0.3s;
}

.logout a {
	background-color: var(--bg-logout);
	border: solid 1px var(--border-logout);
	color: var(--text-logout);
}

.login a:hover {
	background-color: var(--bg-login-hover);
}

.flashbg {
	-webkit-animation: flash-pat1 0.5s;
	animation: flash-pat1 0.5s;
}

@-webkit-keyframes flash-pat1 {
	0% {
		background-color: var(--flash-color);
	}
}

@keyframes flash-pat1 {
	0% {
		background-color: var(--flash-color);
	}
}

.alertbg {
	-webkit-animation: flash-pat2 0.5s;
	animation: flash-pat2 0.5s;
	-webkit-animation-iteration-count: infinite;
	animation-iteration-count: infinite;
}

@-webkit-keyframes flash-pat2 {
	50% {
		background-color: var(--alert-flash);
	}
	100% {
		background-color: var(--alert-flash-end);
	}
}

@keyframes flash-pat2 {
	50% {
		background-color: var(--alert-flash);
	}
	100% {
		background-color: var(--alert-flash-end);
	}
}

form {
	display: block;
	vertical-align: middle;
}

.inputbox {
	font-size: 20px;
	width: calc(100% - 150px);
	max-width: 360px;
	min-width: 150px;
	vertical-align: middle;
}

.inputbutton {
	height: 32px;
	font-size: 16px;
	width: 100px;
	border: none;
	background-color: var(--bg-button);
	color: var(--text-primary);
	cursor: pointer;
	display: inline-block;
	vertical-align: middle;
	transition: background-color 0.3s, opacity 0.3s;
}

.inputbutton:hover {
	opacity: 0.8;
}

#btn-google-ja {
	background-color: var(--bg-button-ja);
}

#btn-translate {
	background-color: var(--bg-button-translate);
}

#search {
	text-align: center;
}

@media (max-width: 640px) {
	#search {
		width: calc(100% - 20px);
	}
}

#time1 {
	font-size: 24px;
}

#timeutc, #ipinfo {
	color: var(--text-secondary);
}

#news {
	position: relative;
	width: 100%;
	height: 600px;
}

.bookmark ul {
	list-style-type: none;
	display: flex;
	flex-wrap: wrap;
	line-height: 1;
}

.bookmark li {
	margin: 2px;
}

.bookmark a {
	font-family: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
	padding: 6px;
	border-radius: 2px;
	font-size: 14px;
	text-decoration: none;
	background-color: var(--bg-bookmark);
	color: var(--text-link);
	min-width: 60px;
	display: inline-block;
	line-height: 1;
	text-align: center;
	user-select: none;
	transition: background-color 0.3s, color 0.3s;
}

.bookmark a:hover {
	background-color: var(--bg-bookmark-hover);
	color: var(--text-link-hover);
}

#memoarea {
	width: 100%;
	border-collapse: collapse;
	margin-top: 2px;
}

#memoarea:after {
	clear: both;
}

#memoarea td {
	font-size: 12px;
	text-align: center;
	color: var(--text-secondary);
}

#memo {
	width: 100%;
	background-color: var(--bg-memo-local);
	border: 1px solid var(--border-input);
	font-size: 16px;
	line-height: 1.3;
}

#memos {
	width: 100%;
	background-color: var(--bg-memo-remote);
	border: 1px solid var(--border-input);
	font-size: 16px;
	line-height: 1.3;
}

.wanen {
	font-size: 16px;
	color: var(--text-secondary);
}

#DuckDuckGo {
	width: 100%;
	max-width: 460px;
}

/* テーマ切り替えスイッチ */
.theme-switch {
	position: fixed;
	bottom: 10px;
	right: 10px;
	z-index: 1000;
}

.theme-switch-btn {
	background: var(--bg-bookmark);
	border: 1px solid var(--border-input);
	border-radius: 20px;
	padding: 6px 12px;
	cursor: pointer;
	font-size: 14px;
	color: var(--text-primary);
	transition: background-color 0.3s, transform 0.2s;
	display: flex;
	align-items: center;
	gap: 6px;
}

.theme-switch-btn:hover {
	background: var(--bg-bookmark-hover);
	color: var(--text-link-hover);
	transform: scale(1.05);
}

.theme-switch-btn .icon {
	font-size: 16px;
}

/* Portrait */
@media only screen
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2)
and (orientation: portrait) {
	#bookmark {
		display: none;
	}

	#DuckDuckGo {
		width: calc(100% - 16px);
	}

	#time1 {
		font-size: 16px;
	}

	#header {
		line-height: 1;
	}

	#header a {
		padding: 0;
	}
}
